Temporal preconditions of recursive procedures

  • Wim H. Hesselink
  • Ronald Reinds
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 666)


The meaning of an imperative program is defined to be the precondition of the executions as a function of proposed behaviour. In the case of Dijkstra's weakest precondition, the proposed behaviour is termination in a state with a given postcondition. For the temporal predicate transformers of Lukkien, the proposed behaviour is specified in terms of predicates on the intermediate states. For example, for a command c and predicates p, q and r, the predicate wto.p.q.c.r is the precondition such that, for every execution sequence of c, a state in which p holds is eventually followed by a state in which q holds or by termination in a state in which r holds.

We present these precondition functions for a language with operators for sequential composition, unbounded demonic choice and recursive procedures. Recursion is interpreted by means of extreme fixpoints. The treatment of “eventually” is a straightforward generalization of the ordinary wp-calculus. For the treatment of “leads-to”, the new concept of accumulator turns out to be useful. The proofs of Lukkien's healthiness laws lead to insights in fixpoint induction. Some of the laws require the recursion to be guarded. It is shown that unfolding of the declaration preserves the semantics.


weakest precondition recursive procedure leads-to eventually healthiness law guarded recursion unfolding 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [KW]
    R.J.R. Back, J. von Wright: Refinement calculus, Part I: Sequential Nondeterministic Programs. In: J.W. de Bakker, W.-P. de Roever, G. Rozenberg (eds.): Stepwise Refinement of Distributed Systems. Lecture Notes in Computer Science 430 (Springer, Berlin, 1990) pp. 42–66.Google Scholar
  2. [Bak]
    J.W. de Bakker: Mathematical theory of program correctness. Prentice-Hall, 1980. [CM] K.M. Chandy, J. Misra [1988]: Parallel Program Design, A Foundation (Addison-Wesley, 1988).Google Scholar
  3. [Di]
    E.W. Dijkstra: A discipline of programming. Prentice-Hall 1976.Google Scholar
  4. [DS]
    E.W. Dijkstra, C.S. Scholten: Predicate calculus and program semantics. Springer V. 1990.Google Scholar
  5. [H1]
    W.H. Hesselink: Programs, Recursion and Unbounded Choice, predicate transformation semantics and transformation rules. Cambridge University Press 1992.Google Scholar
  6. [H2]
    W.H. Hesselink: Nondeterminacy and recursion via stacks and queues. Computing Science Notes Groningen CS 9109.Google Scholar
  7. [Lu]
    J.J. Lukkien: Parallel Program Design and Generalized Weakest Preconditions. Thesis, Groningen, 1991.Google Scholar
  8. [LS]
    J.J. Lukkien, J.L.A. van de Snepscheut: Weakest preconditions for progress. Formal Aspects of Computing 4 (1992) 195–236.Google Scholar
  9. [Mrg]
    C. Morgan: Programming from Specifications. Prentice Hall, 1990.Google Scholar
  10. [MG]
    C. Morgan, P.H.B. Gardiner: Data refinement by calculation. Acta Informatica 27 (1990) 481–503.Google Scholar
  11. [Mo1]
    J.M. Morris: A theoretical basis for stepwise refinement and the programming calculus. Science of Comp. Programming 9 (1987) 287–306.Google Scholar
  12. [Mo2]
    J.M. Morris: Temporal predicate transformers and fair termination. Acta Informatica 27 (1990) 287–313.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Wim H. Hesselink
    • 1
  • Ronald Reinds
    • 1
  1. 1.Department of Computing ScienceRijksuniversiteit GroningenAV GroningenThe Netherlands

Personalised recommendations