Kleene under a Demonic Star
In relational semantics, the input-output semantics of a program is a relation on its set of states. We generalize this in considering elements of Kleene algebras as semantical values. In a nondeterministic context, the demonic semantics is calculated by considering the worst behavior of the program. In this paper, we concentrate on while loops. Calculating the semantics of a loop is difficult, but showing the correctness of any candidate abstraction is much easier. For deterministic programs, Mills has described a checking method known as the while statement verification rule. A corresponding programming theorem for nondeterministic iterative constructs is proposed, proved and applied to an example. This theorem can be considered as a generalization of the while statement verification rule to nondeterministic loops.
Keywordswhile loop demonic semantics relational abstraction verification Kleene algebra rule generalization
Unable to display preview. Download preview PDF.
- 1.C. J. Aarts. Galois connections presented calculationally. Eindhoven University of Technology, Dept. of Mathematics and Computer Science, July 1992.Google Scholar
- 2.R. Back and J. von Wright. Refinement Calculus — A Systematic Introduction. Springer, 1998.Google Scholar
- 7.C. Brink, W. Kahl, and G. Schmidt (eds). Relational Methods in Computer Science. Springer, 1997.Google Scholar
- 10.J. Desharnais and B. Möller. Characterizing functions in Kleene algebras. In J. Desharnais (ed.), Proc. 5th Seminar on Relational Methods in Computer Science (RelMiCS’5). Université Laval, Canada, pages 55–64, 2000.Google Scholar
- 11.D. Harel, D. Kozen, and J. Tiuryn. Dynamic Logic. Forthcoming book.Google Scholar
- 16.H. D. Mills, V. R. Basili, J. D. Gannon and R. G. Hamlet. Principles of Computer Programming. A Mathematical Approach. Allyn and Bacon, Inc., 1987.Google Scholar
- 17.B. Möller. Typed Kleene algebras. Universität Augsburg, Institut für Informatik, Report, 1999Google Scholar
- 18.T. S. Norvell. Predicative semantics of loops. In R. S. Bird and L. Meertens (eds), Algorithmic Languages and Calculi, Chapman & Hall, 1997, pages 415–437.Google Scholar
- 20.E. Sekerinski. A calculus for predicative programming. Second International Conf. on the Mathematics of Program Construction. R. S. Bird, C. C. Morgan and J. C. P. Woodcock (eds), Oxford, June 1992, Lect. Notes in Comput. Sci., Vol. 669, Springer-Verlag, 1993.Google Scholar
- 21.F. Tchier. Sémantiques relationelles demoniaques et vérification de boucles non-déterministes. Ph.D. Thesis, Département de Mathématiques, Université Laval, Canada, 1996.Google Scholar
- 22.F. Tchier and J. Desharnais. Applying a generalization of a theorem of Mills to generalized looping structures. Colloquium Science and Engineering for Software Development, organized in the memory of Dr. Harlan D. Mills, and affiliated to the 21st International Conference on Software Engineering, Los Angeles, 18 May 1999, pages 31–38.Google Scholar