Is "Sometime" Sometimes Better Than "Always"? Intermittent Assertions in Proving Program Correctness
Abstract
This paper explores a technique for proving the correctness and termination of computer programs simultaneously. This approach, which the authors call the intermittent-assertion method, involves documenting the program with assertions that must be true at some time when control passes through the corresponding point, but that need not be true every time. The method, introduced by Burstall, promises to provide a valuable complement to more conventional methods. The authors first introduce the intermittent-assertion method with a number of examples of correctness and termination proofs. Some of these proofs are markedly simpler than their conventional counterparts. On the other hand, they show that a proof of correctness or termination by any of the conventional techniques can be rephrased directly as a proof using intermittent assertions. Finally, they show how the intermittent-assertion method can be applied to prove the validity of program transformations and the correctness of continuously operating programs.
Document Details
- Document Type
- Technical Report
- Publication Date
- Mar 01, 1977
- Accession Number
- ADA461683
Entities
People
- Richard Waldinger
- Zohar Manna
Organizations
- SRI International