DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

ExtendingPython > LexicalClosures > Closures > ClojureOnDotNet > MetaProgramming > PSPad2Wordpress > GoogleChartsAPI > CurriculumVitae > MarketingPython > AndersHejlsberg > FunctionObjects > Functor > TrampolineStyle > MaintainableCode > AbstractDataType > OopVsAdt > DesignByContractClear Trail
Main /

Design By Contract

LetzteInformatikPruefungen

CoVarianten
Exceptions
Assertions

LiskovSubstitutionPrinciple

LooseCoupling

The idea of DBC is to specify that part of the behaviour which must remain unchanged (by means of assertions and suchlike). This leads to a more precise notion of subtype. [1]



The use of pre and post conditions allows the development of software to be thought of as an implicit, or explicit, contract between the calling environment and the called subprogram. The calling environment fulfils its part of the contract by ensuring that it only ever calls the subprogram with a set of actual parameters which comply with the pre-condition. The subprogram in its turn fulfils the contract by ensuring that if it is supplied with acceptable input parameters it will always provide results which comply with its post-condition. That is to say that it will fulfil its advertised specification to transform its input data into the output data.


Spezifikation von erwarteten Eingabewerten und den dann zu erwartenden Ausgabewerten. +Invarianten:
  1. Preconditions
  2. Postconditions
  3. Invarianten



Use UnitTests to specify the contract of a unit. The invariants cannot be checked during execution but before- and afterwards. Maybe fair enough.

Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 26.11.2006 20:17 Uhr und seit 7. April 2005 2358 aufgerufen.