Semantics, orderings and recursion in the weakest precondition calculus

  • Marcello Bonsangue
  • Joost N. Kok
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 666)


An extension of Dijkstra's guarded command language is studied, including sequential composition, demonic choice and a backtrack operator. To guide the intuition about this language we give an operational semantic that relates the initial states with possible outcome of the computations. Next we consider three orderings on this language: a refinement ordering defined by Back, a new deadlock ordering, and an approximation ordering of Nelson. The deadlock ordering is in between the two other orderings. All operators are monotonic in Nelson's ordering, but backtracking is not monotonic in Back's ordering and sequential composition is not monotonic for the deadlock ordering. At first sight recursion can only be added using Nelson's ordering. By extending the fixed point theory we show that, under certain circumstances, least fixed points for non monotonic functions can be obtained by iteration from the least element. This permits us the addition of recursion even using Back's ordering or the deadlock ordering. Furthermore, we give a semantic characterization of the three orderings above by extending the well known duality theory between predicate transformers and Smyth's powerdomain.


weakest preconditions predicate transformers refinement deadlock backtracking recursion fixed points fixed point transformations Smyth powerdomain Egli-Milner powerdomain 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Abr91]
    S. Abramsky. A domain equation for bisimulation. Information and Computation, 92:161–218, 1991.Google Scholar
  2. [AP86]
    K. R. Apt and G. Plotkin. Countable nondeterminism and random assignment. Journal of the ACM, 33(4):724–767, October 1986.Google Scholar
  3. [Bac78]
    R.-J.R. Back. On the correctness of Refinement Steps in Program Development. PhD thesis, Department of Computer Science, University of Helsinki, 1978. Report A-1978-4.Google Scholar
  4. [Bac80]
    R.-J.R. Back. Correctness Preserving Program Refinements: Proof Theory and Applications, volume 131 of Mathematical Centre Tracts. Mathematical Centre, Amsterdam, 1980.Google Scholar
  5. [Bac90]
    R.-J.R. Back. Refinement calculus, part ii: Parallel and reactive programs. In J.W. de Bakker, W.-P. de Roever, and G. Rozenberg, editors, Stepwise Refinement of Distributed Systems: Models, Formalisms, Correctness, number 430 in Lecture Notes in Computer Science, pages 67–93, 1990.Google Scholar
  6. [Bak80]
    J. W. de Bakker. Mathematical Theory of Program Corretness. Prentice-Hall, 1980.Google Scholar
  7. [Bes83]
    E. Best. Relational semantic of concurrent programs (with some applications). In D. Bjorner, editor, Proc. of the IFIP Working Conference on on Formal Description of Programming Concepts-II, pages 431–452, Garmisch-Partenkirchen, FRG, 1983. North-Holland Publishing Company.Google Scholar
  8. [BK92]
    M. M. Bonsangue and J. N. Kok. Semantics, orderings and recursion in the weakest precondition calculus. Technical report, Centre for Mathematics and Computer Science, Amsterdam, 1992. To appear.Google Scholar
  9. [BvW90]
    R.-J.R. Back and J. von Wright. Refinement calculus, part i: Sequential nondeterministic programs. In J.W. de Bakker, W.-P. de Roever, and G. Rozenberg, editors, Stepwise Refinement of Distributed Systems: Models, Formalisms, Correctness, number 430 in Lecture Notes in Computer Science, pages 42–66, 1990.Google Scholar
  10. [Dij76]
    E.W. Dijkstra. A Discipline of Programming. Prentice-Hall, 1976.Google Scholar
  11. [Hes89]
    W.H. Hesselink. Predicate transformer semantics of general recursion. Acta Informatica, 26:309–332, 1989.Google Scholar
  12. [HP72]
    P. Hitchcock and D. Park. Induction rules and termination proofs. In International Conference on Automata, Languages and Programming, 1972.Google Scholar
  13. [HP79]
    M. Hennessy and G. D. Plotkin. Full abstraction for a simple parallel programming language. In J. Becvar, editor, Proc. 8th Int'l Symp. on Mathematical Foundations on Computer Science, volume 74 of Lecture Notes in Computer Science, pages 108–120. Springer-Verlag, Berlin, 1979.Google Scholar
  14. [MM79]
    G. Milne and R. Milner. Concurrent processes and their syntax. J. ACM, 26, 2:302–321, 1979.Google Scholar
  15. [Mor87]
    J. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9:287–306, 1987.Google Scholar
  16. [MRG88]
    C.C. Morgan, K.A. Robinson, and P.H.B. Gardiner. On the refinement calculus. Technical Report PRG-70, Programming Research Group, 1988.Google Scholar
  17. [Nel87]
    G. Nelson. A generalization of Dijkstra's calculus. Technical Report 16, Digital Systems Research Center, 1987.Google Scholar
  18. [Plo79]
    G. D. Plotkin. Dijkstra's predicate transformer and Smyth's powerdomain. In Proceedings of the Winter School on Abstract Software Specification, volume 86 of Lecture Notes in Computer Science, pages 527–553. Springer-Verlag, Berlin, 1979.Google Scholar
  19. [Plo81]
    G.D. Plotkin. Post-graduate lecture notes in advanced domain theory (incorporating the “Pisa Notes”). Department of Computer Science, Univ. of Edinburgh, 1981.Google Scholar
  20. [Smy78]
    M.B. Smyth. Power domains. J. Comput. Syst. Sci., 16, 1:23–36, 1978.Google Scholar
  21. [Smy83]
    M.B. Smyth. Power domains and predicate transformers: A topological view. In Proceeding of ICALP '83 (Barcelona), Volume 154 of Lecture Notes in Computer Science, pages 662–675. Springer-Verlag, Berlin, 1983.Google Scholar
  22. [Wan77]
    M. Wand. A characterisation of weakest preconditions. J. Comput. Syst. Sci., 15:209–212, 1977.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Marcello Bonsangue
    • 1
  • Joost N. Kok
    • 2
  1. 1.CWIAB AmsterdamThe Netherlands
  2. 2.Department of Computer ScienceUtrecht UniversityTB UtrechtThe Netherlands

Personalised recommendations