Signature compatible modifications

  • behavior is approximated by signature

Semantics preserving extensions

  • horizontal -- Person = Citizen + { age : 0..120 }
  • vertical -- Retiree = Person + { age : 65..120 }

Principle of substitutability

  • an instance of a subtype can always be used in any context in which an instance of a supertype can be used
Retiree \not < subtype Person

Read-only substitutability

  • subset subtypes, isomorphically embedded subtypes

slide: The principle of substitutability