Skip to main content

Semantics, orderings and recursion in the weakest precondition calculus

  • Conference paper
  • First Online:
Semantics: Foundations and Applications (REX 1992)

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

Abstract

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.

The research of this author was supported by a grant of the Universita' degli Studi di Milano, Italy.

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. S. Abramsky. A domain equation for bisimulation. Information and Computation, 92:161–218, 1991.

    Google Scholar 

  2. K. R. Apt and G. Plotkin. Countable nondeterminism and random assignment. Journal of the ACM, 33(4):724–767, October 1986.

    Google Scholar 

  3. 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. 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. 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. J. W. de Bakker. Mathematical Theory of Program Corretness. Prentice-Hall, 1980.

    Google Scholar 

  7. 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. 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. 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. E.W. Dijkstra. A Discipline of Programming. Prentice-Hall, 1976.

    Google Scholar 

  11. W.H. Hesselink. Predicate transformer semantics of general recursion. Acta Informatica, 26:309–332, 1989.

    Google Scholar 

  12. P. Hitchcock and D. Park. Induction rules and termination proofs. In International Conference on Automata, Languages and Programming, 1972.

    Google Scholar 

  13. 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. G. Milne and R. Milner. Concurrent processes and their syntax. J. ACM, 26, 2:302–321, 1979.

    Google Scholar 

  15. J. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9:287–306, 1987.

    Google Scholar 

  16. 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. G. Nelson. A generalization of Dijkstra's calculus. Technical Report 16, Digital Systems Research Center, 1987.

    Google Scholar 

  18. 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. 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. M.B. Smyth. Power domains. J. Comput. Syst. Sci., 16, 1:23–36, 1978.

    Google Scholar 

  21. 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. M. Wand. A characterisation of weakest preconditions. J. Comput. Syst. Sci., 15:209–212, 1977.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

J. W. de Bakker W. -P. de Roever G. Rozenberg

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bonsangue, M., Kok, J.N. (1993). Semantics, orderings and recursion in the weakest precondition calculus. In: de Bakker, J.W., de Roever, W.P., Rozenberg, G. (eds) Semantics: Foundations and Applications. REX 1992. Lecture Notes in Computer Science, vol 666. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56596-5_30

Download citation

  • DOI: https://doi.org/10.1007/3-540-56596-5_30

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-56596-3

  • Online ISBN: 978-3-540-47595-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics