出典:Wikipedia
出典:『Wikipedia』 (2011/05/14 11:24 UTC 版)
In computer science, a loop variant is a mathematical function defined on the state space of a computer program whose value is monotonically decreased with respect to a well-founded relation by the iteration of a while loop under some invariant conditions, thereby ensuring its termination. A loop variant whose range is restricted to the non-negative integers is also known as a bound function, because in this case it provides a trivial upper bound on the number of iterations of a loop before it terminates. In general, however, the smallest set sufficient to represent the range of any loop variant that might be useful in a termination proof is an ordinal number at least ω1CK, but no more than ω1.