Derivation of Invariant Assertions During Program Development by Transformation

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.

[1]  David Gries An Illustration of Current Ideas on the Derivation of Correctness Proofs and Correct Programs , 1976, IEEE Transactions on Software Engineering.

[2]  Zohar Manna,et al.  Logical analysis of programs , 1976, CACM.

[3]  Jayadev Misra,et al.  Proving loop programs , 1975, IEEE Transactions on Software Engineering.

[4]  Raymond T. Yeh,et al.  Induction as the Basis for Program Verification , 1976, IEEE Transactions on Software Engineering.

[5]  James H. Morris,et al.  Subgoal induction , 1977, CACM.

[6]  Susan L. Gerhart,et al.  Proof Theory of Partial Correctness Verification Systems , 1976, SIAM J. Comput..

[7]  Friedrich L. Bauer,et al.  Programming as an evolutionary process , 1975, ICSE '76.

[8]  John McCarthy,et al.  Towards a Mathematical Science of Computation , 1962, IFIP Congress.

[9]  Shmuel Katz Program Optimization Using Invariants , 1978, IEEE Trans. Software Eng..

[10]  H. R. Strong,et al.  Translating recursion equations into flow charts , 1970, J. Comput. Syst. Sci..

[11]  Shmuel Katz Program Optimization Using Invariants , 1978, IEEE Transactions on Software Engineering.

[12]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[13]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[14]  Robert S. Boyer,et al.  Primitive recursive program transformation , 1976, POPL '76.