Slide 11.4: While-statements
Slide 11.6: Example I of program correctness
Home

Proofs of Program Correctness


A “correct” program is one that does exactly what its designers and users intend it to do—no more and no less.
“Testing can show the presence of errors, but not their absence.” E. W. Dijkstra
Modern software systems have millions of lines of code, representing thousands of semantic states and state transitions. This innate complexity requires that designers use robust tools for assuring that the system behaves properly in each of its states. Practical proofs of program correctness are evolved as follows: The theory of axiomatic semantics was developed as a tool for proving the correctness of programs and program fragments, and this continues to be its major application.