Predicate transformers and higher order logic
Predicate transformers are formalized in higher order logic. This gives a basis for mechanized reasoning about total correctness and refinement of programs. The notions of program variables and logical variables are explicated in the formalization. We show how to describe common program constructs, such as assignment statements, sequential and conditional composition, iteration, recursion, blocks and procedures with parameters, are described as predicate transformers in this framework. We also describe some specification oriented constructs, such as assert statements, guards and nondeterministic assignments. The monotonicity of these constructs over the lattice of predicates is proved, as well as the monotonicity of the statement constructors with respect to the refinement ordering on predicate transformers.
Key wordsStepwise refinement weakest preconditions total correctness predicate transformers higher order logic HOL semantics of programming languages state spaces nondeterminism procedures
Unable to display preview. Download preview PDF.
- R. J. R. Back. Correctness Preserving Program Refinements: Proof Theory and Applications, volume 131 of Mathematical Center Tracts. Mathematical Centre, Amsterdam, 1980.Google Scholar
- R. J. R. Back. A calculus of refinements for program derivations. Acta Informatica, 25:593–624, 1988.Google Scholar
- R. J. R. Back and J. von Wright. Refinement calculus I: Sequential nondeterministic programs. In J. W. deBakker, W. P. deRoever, and G. Rozenberg, editors, Stepwise Refinement of Distributed Systems, Lecture Notes in Computer Science, pages 42–66. Springer-Verlag, 1990.Google Scholar
- R. J. R. Back and J. von Wright. Refinement concepts formalized in higher order logic. Formal Aspects of Computing, 1991.Google Scholar
- E. W. Dijkstra. A Discipline of Programming. Prentice-Hall International, 1976.Google Scholar
- M. J. Gordon. Hol: A proof generating system for higher order logic. In G. Birtwistle and P. Subrahmanyam, editors, VLSI Specification, Verification and Synthesis, pages 73–128. Kluwer Academic Publishers, 1988.Google Scholar
- I. A. Mason. Hoare's logic in the LF. Technical report 87-32, Laboratory for the Foundations of Computer Science, University of Edinburgh, 1987.Google Scholar
- C. C. Morgan. The specification statement. ACM Transactions on Programming Languages and Systems, 10(3):403–419, July 1988.Google Scholar
- J. von Wright, J. Hekanaho, T. Langbacka, and P. Luostarinen. Mechanizing some advanced refinement concepts. In L. Claesen and M. Gordon, editors, Proceedings of the 1992 International Workshop on Higher Order Logic, Theorem Proving and its Applications, pages 77–96. North-Holland, 1992.Google Scholar