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 programs simultaneously. This approach, which we call the intermittent-assertion method, involves documenting the program with assertions that must be true at some time when control is passing through the corresponding point, but that need not be true every time. The method, introduced by Knuth and further developed by Burstall, promises to provide a valuable complement to the more conventional methods. The technique is introduced and illustrated with a number of examples. It is then shown that a correctness proof using the invariant assertion method or the subgoal induction method can always be expressed using intermittent assertions instead, but that the reverse is not always the case. The method can also be used just to prove termination, and any proof of termination using the conventional well-founded sets approach can be rephrased as a proof using intermittent assertions. Finally, it is shown how the method can be applied to prove the validity of program transformations and the correctness of continuously operating programs.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Jun 16, 1976
Accession Number
ADA031406

Entities

People

  • Richard Waldinger
  • Zohar Manna

Organizations

  • Stanford University

Tags

Communities of Interest

  • Materials and Manufacturing Processes

DTIC Thesaurus Topics

  • Abstracts
  • Artificial Intelligence
  • Computations
  • Computer Science
  • Computers
  • Construction
  • Identities
  • Information Processing
  • New York
  • Operating Systems
  • Recursive Functions
  • Sequences
  • Specifications
  • Trees (Data Structures)
  • United States
  • Universities

Fields of Study

  • Computer science

Readers

  • Mathematical Modeling and Probability Theory.