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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. Abramsky. A domain equation for bisimulation. Information and Computation, 92:161–218, 1991.
K. R. Apt and G. Plotkin. Countable nondeterminism and random assignment. Journal of the ACM, 33(4):724–767, October 1986.
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.
R.-J.R. Back. Correctness Preserving Program Refinements: Proof Theory and Applications, volume 131 of Mathematical Centre Tracts. Mathematical Centre, Amsterdam, 1980.
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.
J. W. de Bakker. Mathematical Theory of Program Corretness. Prentice-Hall, 1980.
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.
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.
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.
E.W. Dijkstra. A Discipline of Programming. Prentice-Hall, 1976.
W.H. Hesselink. Predicate transformer semantics of general recursion. Acta Informatica, 26:309–332, 1989.
P. Hitchcock and D. Park. Induction rules and termination proofs. In International Conference on Automata, Languages and Programming, 1972.
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.
G. Milne and R. Milner. Concurrent processes and their syntax. J. ACM, 26, 2:302–321, 1979.
J. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9:287–306, 1987.
C.C. Morgan, K.A. Robinson, and P.H.B. Gardiner. On the refinement calculus. Technical Report PRG-70, Programming Research Group, 1988.
G. Nelson. A generalization of Dijkstra's calculus. Technical Report 16, Digital Systems Research Center, 1987.
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.
G.D. Plotkin. Post-graduate lecture notes in advanced domain theory (incorporating the “Pisa Notes”). Department of Computer Science, Univ. of Edinburgh, 1981.
M.B. Smyth. Power domains. J. Comput. Syst. Sci., 16, 1:23–36, 1978.
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.
M. Wand. A characterisation of weakest preconditions. J. Comput. Syst. Sci., 15:209–212, 1977.
Author information
Authors and Affiliations
Editor information
Rights 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