Definitions for "Loop Invariant" Add To Word List
Login or Register  | Word Lists | Search History

A loop invariant is type of assertion that remains true from one repetition of the loop to the next. Usually, the invariant describes some non-trivial relationship between the variables changed by the loop. For example, if a program has a loop which adds one to inc and subtracts one from dec then the sum of inc and dec will be a constant. Loop invariants are a common type of invariant.
Helpful?           0
a boolean expression that is true each time the loop guard is evaluated
Helpful?           0
a condition that should be applicable at the end of each iteration of the loop
Helpful?           0
a constraint on the input to a loop that should be satisfied by every iteration of the loop
Helpful?           0
a constraint on the input to an iterative loop (e
Helpful?           0
a constraint that should be satisfied by everyiteration of a loop
Helpful?           0
a logical assertion about the state of the program at a key point in the loop, which is supposed to be always true
Helpful?           0
a property of, or relationship among, the values of the loop variables such that the property is true both initially and after each iteration of the loop; together with the termination condition, a loop invariant is useful in demonstrating the correctness of a loop
Helpful?           0
In computer science, a loop invariant is an invariant used to prove properties of loops.
Helpful?           0