Derivation of Invariant Assertions During Program Development by Transformation

  • Authors:
  • Manfred Broy;Bernd Krieg-Bruckner

  • Affiliations:
  • Institut für Informatik, Technische Universität München, Postfach 202420, 8000 München 2, West Germany;Computer Science Division--EECS, University of California at Berkeley, Berkeley, CA

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 1980

Quantified Score

Hi-index 0.00

Visualization

Abstract

Two approaches to the development of efficient and correct iterative programs are contrasted: the construction of an iterative program and a proof of its correctness using invariant assertions of loops, and the construction and proof of a recursive program with a subsequent transformation into an iterative version by schematically applying suitable recursion removal rules. The connection between the approaches is demonstrated by augmenting such transformation rules by inductive assertions. It is argued that the latter approach to program development is superior since the correctness proof of a recursive program is easier in most cases. Considerable verification overhead can be avoided this way, in particular, some difficulties with the interaction of successive loops and their associated invariants.