Math 2.0

Computer science Semantics and logic in computer science Concept

Hoare logic

Builds on Predicate logicOperational semantics

Summary

Hoare logic is a formal system for proving that imperative programs are correct. C. A. R. Hoare introduced it in 1969, building on earlier work of Robert W. Floyd. Its statements are Hoare triples {P} C {Q}\set{P}\, C\, \set{Q}: if the precondition PP holds before the command CC runs and CC terminates, then the postcondition QQ holds afterwards. It has one axiom or rule for each construct of the language, so a proof follows the structure of the program. It is sound for the operational semantics of the language, and it is the ancestor of most program verification methods.

Reading path

To understand this page from the ground up, read these 12 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Binary relation concept
  2. Proposition concept
  3. Operational semantics concept
  4. Conjunction definition
  5. Disjunction definition
  6. Implication definition
  7. Negation definition
  8. Predicate definition
  9. Biconditional definition
  10. Propositional logic concept
  11. Predicate logic concept
  12. Hoare logic concept

Where this leads

4 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Hoare_logic
About this page
TagH1M6RSBJ5H
URIm2://H1M6RSBJ5H
Kindconcept
WritingW0 stub
MSC68Q60, 03B70
UsesPredicate logic, Operational semantics
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Definitions

Used by