Go to the first, previous, next, last section, table of contents.


7.9.3.1 Strong vs. Weak Behavioral Subtyping

The distinction between strong [Liskov-Wing93b] [Liskov-Wing94] and weak [Dhara-Leavens94b] behavioral subtyping only affects the inheritance of history constraints. Recall that a weak behavioral subtype is specified by using weakly in a simulates-clause that names the supertype. If this is not done, then strong behavioral subtyping is assumed.

For a strong behavioral subtype, all of the subtype's member functions must satisfy the supertype's history constraint; that is, unless weakly is used, the history constraints are inherited unchanged by the subtype and apply to all member functions in the subtype, even new ones. Because of this, instances of the subtype can be manipulated through aliases using the interface of both its supertype and its own type [Liskov-Wing93b] [Liskov-Wing94].

In a weak behavioral subtype, the history constraint is only applied to the member functions inherited from the supertype. See section 7.9.2 Inheritance with Explicitly-Given Traits and Weak Subtyping above for an example.


Go to the first, previous, next, last section, table of contents.