Liskov Substitution Principle
LSP
Kind: principle
Layer: Structural Core
Aliases: LSP, Liskov Substitution Principle, Behavioral Subtyping
Record: architecture:liskov-substitution
Severity: mandatory
Scope: class, interface, type hierarchy
Canonical: Ontology
A design rule that a subtype can replace its base type anywhere, because it keeps the base type's preconditions, postconditions and invariants.
Listed in Architecture principles, after Open/Closed Principle (OCP) and before Polymorphism.