Skip to main content

A calculus for predicative programming

  • Conference paper
  • First Online:
Mathematics of Program Construction (MPC 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 669))

Included in the following conference series:

Abstract

A calculus for developing programs from specifications written as predicates that describe the relationship between the initial and final state is proposed. Such specifications are well known from the specification language Z. All elements of a simple sequential programming notation are defined in terms of predicates. Hence programs form a subset of specifications. In particular, sequential composition is defined by ‘demonic composition’, non-deterministic choice by ‘demonic disjunction’, and iteration by fixed points. Laws are derived which allow proving equivalence and refinement of specifications and programs by a series of steps. The weakest precondition calculus is also included. The approach is compared to the predicative programming approach of E. Hehner and to other refinement calculi.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Back, R. J. R. A Calculus of Refinement for Program Derivations. Acta Informatica 23 (1988).

    Google Scholar 

  2. Dijkstra, E. W. A Discipline of Programming. Prentice Hall, 1976.

    Google Scholar 

  3. Dijkstra, E. W. and C. S. Scholten. Predicate Calculus and Program Semantics. Springer-Verlag, 1990.

    Google Scholar 

  4. Gravell, A. Constructive Refinement of First Order Specifications. to appear in Proceedings of the 5th Refinement Workshop, Springer-Verlag, 1992.

    Google Scholar 

  5. Hehner, E. C. R. Predicative Programming — Parts I and II. Communications of the ACM 27, 2 (1984).

    Google Scholar 

  6. Hehner, E. C. R., L. E. Gupta, and A. J. Malton. Predicative Methodology. Acta Informatica 23 (1986).

    Google Scholar 

  7. Hehner, E. C. R. Termination is Timing. In J. L. A. van de Snepscheut (Ed.) Mathematics of Program Construction, Springer-Verlag, 1989.

    Google Scholar 

  8. Hoare, C. A. R. and He Jifeng. The weakest prespecification. Fundamenta Informaticae 9 (1986).

    Google Scholar 

  9. Hoare, C. A. R., I. J. Hayes, He Jifeng, C. C. Morgan, A. W. Roscoe, J. W. Sanders, I. H. Sorensen, J. M. Spivey, and B. A. Sufrin. Laws of Programming. Communications of the ACM 30, 8 (1987).

    Google Scholar 

  10. King, S. Z and the Refinement Calculus. In D. Bjorner, C. A. R. Hoare, J. Langmaack (Eds.) VDM '90: VDM and Z — Formal Methods in Software Development Springer-Verlag, 1990.

    Google Scholar 

  11. Morgan, C. The Specification Statement. ACM Transactions on Programming Languages and Systems 10, 3 (1988).

    Google Scholar 

  12. Morgan, C. Programming from Specifications. Prentice Hall, 1990.

    Google Scholar 

  13. Morris, J. M. Programs from Specifications. In Dijkstra, E. W. (Ed.) Formal Development of Programs and Proofs. Addison Wesley, 1990.

    Google Scholar 

  14. Nelson, G. A Generalization of Dijkstra's Calculus. ACM Transactions on Programming Languages and Systems 11, 4 (1989).

    Google Scholar 

  15. Spivey, J. M. The Z Reference Manual. Prentice Hall, 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

R. S. Bird C. C. Morgan J. C. P. Woodcock

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sekerinski, E. (1993). A calculus for predicative programming. In: Bird, R.S., Morgan, C.C., Woodcock, J.C.P. (eds) Mathematics of Program Construction. MPC 1992. Lecture Notes in Computer Science, vol 669. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56625-2_20

Download citation

  • DOI: https://doi.org/10.1007/3-540-56625-2_20

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-56625-0

  • Online ISBN: 978-3-540-47613-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics