Skip to main content
Log in

Proof rules for recursive procedures

  • Published:
Formal Aspects of Computing

Abstract

Four proof rules for recursive procedures in a Pascal-like language are presented. The main rule deals with total correctness and is based on results of Gries and Martin. The rule is easier to apply than Martin's. It is introduced as an extension of a specification format for Pascal-procedures, with its associated correctness and invocation rules. It uses well-founded recursion and is proved under the postulate that a procedure is semantically equal to its body.

This rule for total correctness is compared with Hoare's rule for partial correctness of recursive procedures, in which no well-founded relation is needed. Both rules serve to prove correctness, i.e. sufficiency of certain preconditions. There are also two rules for proving necessity of preconditions. These rules can be used to give formal proofs of nontermination and refinement. They seem to be completely new.

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. Dijkstra, E. W. and Scholten, C. S.: Predicate calculus and program semantics. Springer V. 1990.

  2. Gallier, J.H.: Logic for Computer Science. Foundations of automatic theorem proving. Wiley & Sons 1987.

  3. Gries, D.: The science of programming. Springer V. 1981.

  4. Hehner, E.C.R.:do Consideredod: a contribution to programming calculus. Acta Informatica11 (1979) 287–304.

    Google Scholar 

  5. Hesselink, W.H.: Command algebras, recursion and program transformation. Formal Aspects of Computing2 (1990) 60–104.

    Google Scholar 

  6. Hesselink, W.H.: Repetitions, known or unknown? Information Processing Letters40 (1991) 51–57.

    Google Scholar 

  7. Hesselink, W.H.: Programs, Recursion and Unbounded Choice, predicate transformation semantics and transformation rules. Cambridge University Press, 1992 (Cambridge Tracts in Theoretical Computer Science 27).

  8. Hoare, C.A.R.: Procedures and parameters: an axiomatic approach. In: Symposium on Semantics of Algorithmic Languages, (ed. E. Engeler), Springer V. (Lecture Notes in Math. 188) 1971, pp. 102–116.

  9. Jensen, K. and Wirth, N.: Pascal User Manual and Report, third edition. Springer V. 1985.

  10. Jonker, J.E.: On-the-fly garbage collection for several mutators. Distr. Comput.5 (1992) 187–199.

    Google Scholar 

  11. Kaldewaij, A.: Programming: the Derivation of Algrithms. Prentice Hall International, 1990.

  12. Martin, A.J.: A general proof rule for procedures in predicate transformer semantics. Acta Informatica20 (1983), 301–313.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wim H. Hesselink.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hesselink, W.H. Proof rules for recursive procedures. Formal Aspects of Computing 5, 554–570 (1993). https://doi.org/10.1007/BF01211249

Download citation

  • Received:

  • Accepted:

  • Issue Date:

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

Keywords

Navigation