np hard
1969 United Kingdom meta
04

An Axiomatic Basis for Computer Programming

Tony Hoare, 1969 — programs can be reasoned about with mathematical precision. The first technique that makes maintenance survivable.

Tony Hoare, then at the Queen's University of Belfast, published a system of inference rules for proving the correctness of computer programs. The central object is the Hoare triple: a precondition, a program fragment, and a postcondition, denoted {P} S {Q}. The triple asserts that if P holds before S runs, then Q holds after. Hoare gave axioms for assignment, sequencing, conditionals, and loops, with a separate rule for each. Together these rules let a programmer construct a proof, alongside the code, that the code does what it claims. This is the technical foundation of every later formal-methods system in this book — Dijkstra's weakest preconditions, separation logic, SPARK, Coq, Isabelle, Dafny, the proofs of seL4 and CompCert. It is the only technique humans have invented that beats Rice's theorem on a per-program basis.

Hoare, C. A. R. (1969). An Axiomatic Basis for Computer Programming. Communications of the ACM, 12(10), 576–580. Source →