Computer science Semantics and logic in computer science Concept
Weakest precondition
Builds on Hoare logic
Summary
The weakest precondition of a command and a postcondition is a condition on the starting state. It is the most general condition that guarantees that terminates in a state satisfying . Edsger W. Dijkstra introduced it in 1975, with his language of guarded commands. He used it to define the meaning of programs and to derive programs from their specifications. The map is a predicate transformer, and it can be computed by structural rules for every construct except loops. It is the backward-reasoning counterpart of Hoare logic and the basis of many verification tools.
Reading path
To understand this page from the ground up, read these 13 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Binary relation concept
- Proposition concept
- Operational semantics concept
- Conjunction definition
- Disjunction definition
- Implication definition
- Negation definition
- Predicate definition
- Biconditional definition
- Propositional logic concept
- Predicate logic concept
- Hoare logic concept
- Weakest precondition concept
Further reading
About this page
| Tag | DRWV1K987X |
|---|---|
| URI | m2://DRWV1K987X |
| Kind | concept |
| Writing | W0 stub |
| MSC | 68Q60, 03B70 |
| Uses | Hoare logic |
| Changed | 3 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.