Loop Variant - Rule of Inference For Total Correctness

Rule of Inference For Total Correctness

In order to formally state the rule of inference for the termination of a while loop we have demonstrated above, recall that in Floyd–Hoare logic, the rule for expressing the partial correctness of a while loop is:

where I is the invariant, C is the condition, and S is the body of the loop. To express total correctness, we write instead:

\frac{< \textrm{\ is\ well-founded},\;\;S\;} {\;\mathbf{while}\;C\; \mathbf{do}\; S \;},

where, in addition, V is the variant, and by convention the unbound symbol z is taken to be universally quantified.

Read more about this topic:  Loop Variant

Famous quotes containing the words rule of, rule, inference, total and/or correctness:

    Rule of religion: purpose breathes even in dirt and stones.
    Mason Cooley (b. 1927)

    The one thing that doesn’t abide by majority rule is a person’s conscience.
    Harper Lee (b. 1926)

    I have heard that whoever loves is in no condition old. I have heard that whenever the name of man is spoken, the doctrine of immortality is announced; it cleaves to his constitution. The mode of it baffles our wit, and no whisper comes to us from the other side. But the inference from the working of intellect, hiving knowledge, hiving skill,—at the end of life just ready to be born,—affirms the inspirations of affection and of the moral sentiment.
    Ralph Waldo Emerson (1803–1882)

    ... one of the blind spots of most Negroes is their failure to realize that small overtures from whites have a large significance ... I now realize that this feeling inevitably takes possession of one in the bitter struggle for equality. Indeed, I share it. Yet I wonder how we can expect total acceptance to step full grown from the womb of prejudice, with no embryo or infancy or childhood stages.
    Sarah Patton Boyle, U.S. civil rights activist and author. The Desegregated Heart, part 1, ch. 10 (1962)

    The surest guide to the correctness of the path that women take is joy in the struggle. Revolution is the festival of the oppressed.
    Germaine Greer (b. 1939)