Invariant (computer science)

An invariant is a statement that is true about the execution of specific program commands away. It is thus before and after these commands true, it is therefore not changeable, so invariant. Invariants can be used to prove the correctness of algorithms and play a major role in the Design By Contract. Here are described in their flow for a method of an interface whose pre-and postconditions and invariants all. By means of so-called assertions ( assurances ) you can implement this concept, if it supports the programming language or API used.

415465
de