automatic subtyping/intensions

Laurent Martelli
09 Feb 1999 00:43:52 +0100

>>>>> "Tril" == Tril  <> writes:

    Tril> Mozzie is still not an intensional language, because it uses
    Tril> traditional data structures for objects (but it is still
    Tril> very interesting).  What I mean by intensional is that if
    Tril> two objects have the same semantics, they are equivalent.
    Tril> That is, they are treated exactly the same by the system no
    Tril> matter what implementation they have.  The data structure or
    Tril> functions used to access and manipulate information related
    Tril> to this object is irrelevant, only the meaning is important.
    Tril> This meaning is encoded by declarative statements in a logic
    Tril> language, a specification.  In my ideal system, as long as
    Tril> the statements are true of an implementation, the
    Tril> implementation (automatically) "is a" subtype of the set of
    Tril> all objects with the specification.  TMF: Does this help
    Tril> clarify?  All others: please flame if you have no idea what
    Tril> I am talking about, especially if you disagree or have a
    Tril> better idea :)

I agree that semantics is what matters. Rather than relying on having
methods or attributes with the same name or signature  la Smalltalk.

But I think that it is wrong to talk about subtyping between a
specification and an implementation. I think that subtyping is a
behavioral notion (and so do Liskov and Wing in [1]).

1 - B. Liskov and J. Wing: "A Behavioral Notion of Subtyping", ACM
Transactions on Programming Languages and Systems, Number 16(6),
pp. 1811-1841, ACM Press, 1994.