[Grace-core] Multiple inheritance & module inheritance

Andrew P Black andrew.p.black at gmail.com
Mon Mar 16 14:06:30 PDT 2015


Kim,

What you are observing is that just because module m is correct, and can be proved so by a fairly simple type system, does not mean that every possible module m' that inherits from m and overrides arbitrary parts of m is also correct and type-safe.  

If you want to do static checks for this, it's always seemed to me that m needs two quite different types.  The first is the user's type, or the interface type, which provides information about the external interface of m — which is what existing Grace types do.

The second is the heir's type, which provides information about the internal structure of m.  In your example, it provides the information that a.new -> Alpha and Alpha <: type {x -> Number} (which is in the confidential interface type), but also that b.new uses a internally, with that type. 

Figuring out what's in an heirs type seems like a good thesis project.

	Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150316/f03970d9/attachment.html>


More information about the Grace-core mailing list