Unified Modeling Language Reference Manual, The, Second Edition
by James Rumbaugh, Ivar Jacobson, Grady Booch
substitutability principle
The principle that, given a declaration of a variable or parameter whose type is declared as X, any instance of an class that is a descendant of X may be used as the actual value without violating the semantics of the declaration and its use. In other words, an instance of a descendant element may be substituted for an instance of an ancestor element. (Attributed to MIT Professor Barbara Liskov.)
See also generalization, implementation inheritance, inheritance, polymorphic, procedure.
Discussion
The purpose is to ensure that polymorphic operations work freely. The generalization relationship supports substitutability provided overriding and redefinition of concrete features are avoided.
The consequence of the substitutability ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access