Skip to main content
Log in

Program invariants as fixedpoints

Programminvarianten als Fixpunkte

  • Published:
Computing Aims and scope Submit manuscript

Abstract

We argue that soundness and relative completeness theorems for Floyd-Hoare Axiom Systems ([3], [5], [18]) are really fixedpoint theorems. We give a characterization of program invariants as fixedpoints of functionals which may be obtained in a natural manner from the text of a program. We show that within the framework of this fixedpoint theory, soundness and relative completeness results have a particularly simple interpretation. Completeness of a Floyd-Hoare Axiom System is equivalent to the existence of a fixedpoint for an appropriate functional, and soundness follows from the maximality of this fixedpoint. The functionals associated with regular procedure declarations are similar to thepredicate transformers of Dijkstra; for nonregular recursions it is necessary to use a generalization of the predicate transformer concept which we call arelational transformer.

Zusammenfassung

Es wird dargelegt, daß die Sätze für Widerspruchsfreiheit und Vollständigkeit für Systeme, die auf Floyd-Hoare-Axiomen basieren ([3], [5], [18]), tatsächlich Fixpunktsätze sind. Die Programminvarianten werden als Fixpunkt-Funktionale charakterisiert, die man auf natürliche Weise vom Programmtext herleiten kann. Es wird gezeigt, daß innerhalb des Rahmen dieser Fixpunkttheorie die Ergebnisse bezüglich Widerspruchsfreiheit und Vollständigkeit eine besonders einfache Interpretation besitzen. Die Vollständigkeit eines Floyd-Hoare-Axiomensystems ist äquivalent zur Existenz eines Fixpunktes für eine geeignetes Funktional. Die Widerspruchsfreiheit folgt aus der Maximalität dieses Fixpunktes. Die Funktionale für reguläre Prozedurdeklarationen ähneln Dijkstras Prädikat-Transformern. Für nichtreguläre Rekursionen braucht man eine Verallgemeinerung des Prädikat-Transformer-Konzepts, das hier relationaler Transformer genannt wird.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Cherniavsky, J., Kamin, S.: A complete and consistent Hoare axiomatics for a simple programming language. Proceedings of the 4th POPL, 1977.

  2. Clarke, E. M.: Programming language constructs for which it is impossible to obtain good Hoare-like axiom systems. Proceedings of the 4th POPL, 1977.

  3. Cook, S. A.: Axiomatic and interpretative semantics for an algol fragment. Technical Report 79, Department of Computer Science, University of Toronto, 1975 (to be published in SCICOMP).

  4. Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of Programs by construction or approximation of Fixpoints. Proceedings of the 4th POPL, 1977.

  5. deBakker, J. W., Meertens, L. G. L. Th.: On the completeness of the induction assertion method. Mathematical Centre, December 1973.

  6. de Bakker, J. W.: Fixed point semantics and Dijkstra's fundamental invariance theorem. Mathematical Centre, January 1975.

  7. deBakker, J. W.: Flow of control in the proof theory of structured programming. Mathematical Centre, 1975.

  8. Dijkstra, E. E.: A simple axiomatic basis for programming language constructs. Lecture notes from the International Summer School on Structured Programming and Programmed Structures, Munich, Germany, 1973.

  9. Donahue, J.: Mathematical semantics as a complementary definition for axiomatically defined programming language constructs. Technical Report CSRG-45, Computer Systems Research Group, University of Toronto, December 1974.

  10. Floyd, R. W.: Assigning meaning to programs. In: Mathematical Aspects of Computer Science Proc. Symposia in Applied Mathematics (Schwartz, J. T., ed.), Vol. 19, pp. 19–32. Amer. Math. Soc. 1967.

  11. Fokkinga, M. C.: Inductive assertion patterns for recursive procedures. Techn. University Delft Report, 1973.

  12. Gerhart, S. L.: Proof theory of partial correctness verification systems. SIAM J. Comput.5 (1976).

  13. Gorelick, G.: A complete axiomatic system for proving assertions about recursive and nonrecursive programs. Technical Report No. 75, Department of Computer Science, University of Toronto, January 1975.

  14. Hoare, C. A. R.: An axiomatic approach to computer programming. CACM12, 322–329 (1969).

    Google Scholar 

  15. Hoare, C. A. R.: Procedures and parameters: An axiomatic approach. Symposium on Semantics of Algorithmic Languages (Engeler, E., ed.), pp. 102–116. Berlin-Heidelberg-New York: Springer 1971.

    Google Scholar 

  16. Hoare, C. A. R., Lauer, P. E.: Consistent and complementary formal theories of the semantics of programming languages. Acta Informatica3, 135–154 (1974).

    Google Scholar 

  17. Lipton, R.: A necessary and sufficient condition for the existence of Hoare Logics. 18 Annual Symposium on Foundations of Computer Science, 1977.

  18. Manna, Z., Pnueli, A.: Formalization of properties of functional programs. JACM17, 555–569 (1970).

    Google Scholar 

  19. McGowan, C., Misra, J.: A mathematical basis for Dijkstra-Hoare semantics. Technical Report No. 73-73, Center for Computer and Information Sciences, Brown University, November 1973.

  20. Park, D.: Fixpoint induction and proofs of program properties. Machine Intelligence5, 59–78 (1970).

    Google Scholar 

  21. Owicki, S.: A consistent and complete deductive system for the verification of parallel programs. 8th Annual Symposium on Theory of Computing, 1976.

  22. Scott, D.: Outline of a mathematical theory of computation. Proceeding of Fourth Annual Princeton Conference on Information Science and Systems. Princeton, pp. 169–176, 1970.

  23. Scott D.: The lattice of flow diagrams. Semantics of Algorithmic Languages (Springer Notes in Mathematics, Vol. 188), (Engeler, E., ed.), pp. 311–366. Berlin-Heidelberg-New York: Springer 1971.

    Google Scholar 

  24. Suzuki, N., Ishihata, K.: Implementation of an array bound checker. Proceedings of the 4th POPL, 1977.

  25. Wand, M.: A new incompleteness result for Hoare's system. 8th Annual Symposium on Theory of Computing, 1976.

  26. Yeh, R. T., Reynolds, C.: Induction as the basis for program verification. IEEE Transactions on Software Engineering, SE-2(4), 244–252 (1976).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Clarke, E.M. Program invariants as fixedpoints. Computing 21, 273–294 (1979). https://doi.org/10.1007/BF02248730

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02248730

Keywords

Navigation