Design by contract (
DbC), also known as
contract programming,
programming by contract and
design-by-contract programming, is an approach for designing
software. It prescribes that software designers should define
formal, precise and verifiable interface specifications for
software components, which extend the ordinary definition of
abstract data types with
preconditions,
postconditions and
invariants. These specifications are referred to as "contracts", in accordance with a
conceptual metaphor with the conditions and obligations of business contracts.