Formal Aspects of Computing

, Volume 5, Issue 6, pp 554–570 | Cite as

Proof rules for recursive procedures

  • Wim H. HesselinkEmail author


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.


Proof rule Recursive procedure Specification Weakest precondition Well-founded relation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [DiS90]
    Dijkstra, E. W. and Scholten, C. S.: Predicate calculus and program semantics. Springer V. 1990.Google Scholar
  2. [Gal87]
    Gallier, J.H.: Logic for Computer Science. Foundations of automatic theorem proving. Wiley & Sons 1987.Google Scholar
  3. [Gri8l]
    Gries, D.: The science of programming. Springer V. 1981.Google Scholar
  4. [Heh79]
    Hehner, E.C.R.:do Consideredod: a contribution to programming calculus. Acta Informatica11 (1979) 287–304.Google Scholar
  5. [Hes90]
    Hesselink, W.H.: Command algebras, recursion and program transformation. Formal Aspects of Computing2 (1990) 60–104.Google Scholar
  6. [Hes91]
    Hesselink, W.H.: Repetitions, known or unknown? Information Processing Letters40 (1991) 51–57.Google Scholar
  7. [Hes92]
    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).Google Scholar
  8. [Hoa71]
    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.Google Scholar
  9. [JeW85]
    Jensen, K. and Wirth, N.: Pascal User Manual and Report, third edition. Springer V. 1985.Google Scholar
  10. [Jon92]
    Jonker, J.E.: On-the-fly garbage collection for several mutators. Distr. Comput.5 (1992) 187–199.Google Scholar
  11. [Kal90]
    Kaldewaij, A.: Programming: the Derivation of Algrithms. Prentice Hall International, 1990.Google Scholar
  12. [Mar83]
    Martin, A.J.: A general proof rule for procedures in predicate transformer semantics. Acta Informatica20 (1983), 301–313.Google Scholar

Copyright information

© BCS 1993

Authors and Affiliations

  1. 1.Department of Computing ScienceRijksuniversiteit GroningenAV GroningenThe Netherlands

Personalised recommendations