Application - Design By Contract model

> (Software|Application|System)

1 - About

A Design By Contract (DBC) model is based on the fact that a computation, given correct input, must terminated with a correct output. This assertion notion is central in a DBC design. If any assertion evaluates to false, the software system is considered as invalid.

Bertrand Meyer developed DBC as part of his Eiffel programming language.

Three roles collectively defines what is called the design-by-contract model of programming

  • Precondition: A condition that the caller of an operation agrees to satisfy. The user invoking the computation has the responsibility of providing the correct input.
  • Post-condition: A condition that the method itself promises to achieve. If the computation is successful, the computation has satisfied the post-condition.
  • Invariant: A condition that should always be true at a specified point of a program
Advertising

3 - Documentation / Reference

application/design-by-contract.txt · Last modified: 2017/09/17 17:36 by gerardnico