Hoare Logic - Partial and Total Correctness

Partial and Total Correctness

Standard Hoare logic proves only partial correctness, while termination needs to be proved separately. Thus the intuitive reading of a Hoare triple is: Whenever P holds of the state before the execution of C, then Q will hold afterwards, or C does not terminate. Note that if C does not terminate, then there is no "after", so Q can be any statement at all. Indeed, one can choose Q to be false to express that C does not terminate.

Total correctness can also be proven with an extended version of the While rule.

Read more about this topic:  Hoare Logic

Famous quotes containing the words partial and, partial, total and/or correctness:

    There is no luck in literary reputation. They who make up the final verdict upon every book are not the partial and noisy readers of the hour when it appears; but a court as of angels, a public not to be bribed, not to be entreated, and not to be overawed, decides upon every man’s title to fame. Only those books come down which deserve to last.
    Ralph Waldo Emerson (1803–1882)

    The one-eyed man will be King in the country of the blind only if he arrives there in full possession of his partial faculties—that is, providing he is perfectly aware of the precise nature of sight and does not confuse it with second sight ... nor with madness.
    Angela Carter (1940–1992)

    Luxury, or a refinement on the pleasures and conveniences of life, had long been supposed the source of every corruption in government, and the immediate cause of faction, sedition, civil wars, and the total loss of liberty. It was, therefore, universally regarded as a vice, and was an object of declamation to all satyrists, and severe moralists.
    David Hume (1711–1776)

    Rather would I have the love songs of romantic ages, rather Don Juan and Madame Venus, rather an elopement by ladder and rope on a moonlight night, followed by the father’s curse, mother’s moans, and the moral comments of neighbors, than correctness and propriety measured by yardsticks.
    Emma Goldman (1869–1940)