Science Fair Project Encyclopedia
Invariant (computer science)
In computer science, optimising compilers and the methodology of design by contract pay close attention to invariant quantities in computer programs, where the set of transformations involved is the execution of the steps of the computer program.
A loop invariant is a constraint on the input to a loop that should be satisfied by every iteration of the loop.
A class invariant is a constraint on the state of an object that should be satisfied by every method of the class.
Const correctness is another form of invariance in computer science.
09-23-2007 01:00:40
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details


