Abstract
We present a new approach to adding state and state-changing commands to a term language. As a formal semantics it can be seen as a generalization of predicate transformer semantics, but beyond that it brings additional opportunities for specifying and verifying programs. It is based on a construct called a phrase, which is a term of the form C ▹ t, where C stands for a command and t stands for a term of any type. If R is boolean, C ▹ R is closely related to the weakest precondition wp(C,R). The new theory draws together functional and imperative programming in a simple way. In particular, imperative procedures and functions are seen to be governed by the same laws as classical functions. We get new techniques for reasoning about programs, including the ability to dispense with logical variables and their attendant complexities. The theory covers both programming and specification languages, and supports unbounded demonic and angelic nondeterminacy in both commands and terms.
- Back, R.-J. and von Wright, J. 1998. Refinement Calculus: a Systematic Introduction. Springer-Verlag, New York. Google Scholar
Digital Library
- Back, R.-J. R. 1980. Correctness preserving program refinements: Proof theory and applications. Tract 131, Mathematisch Centrum, Amsterdam.Google Scholar
- Back, R.-J. R. and von Wright, J. 1990. Duality in specification languages: A lattice-theoretical approach. Acta Inf. 27, 7, 583--625. Google Scholar
Digital Library
- Backhouse, R. C. 2003. Program Construction: Calculating Implementations from Specifications. Wiley, New York. Google Scholar
Digital Library
- Bijlsma, L. and Nederpelt, R. 1998. Dijkstra-Scholten predicate calculus: Concepts and misconceptions. Acta Inf. 35, 1007--1036.Google Scholar
Cross Ref
- Böhme, S., Leino, K. R. M., and Wolff, B. 2008. HOL-Boogie—An interactive prover for the Boogie program-verifier. In Proceedings of the 21st International Conference on Theorem Proving in Higher Order Logics, O. A. Mohamed, et al., Eds. Lecture Notes in Computer Science, vol. 5170. Springer-Verlag, New York, 150--166. Google Scholar
Digital Library
- Boom, H. J. 1982. A weaker precondition for loops. ACM Trans. Program. Lang. Syst. 4, 4, 668--677. Google Scholar
Digital Library
- Boute, R. T. 2005. Functional declarative language design and predicate calculus: A practical approach. ACM Trans. Program. Lang. Syst. 27, 5, 988--1047. Google Scholar
Digital Library
- Bunkenburg, A. 1997. Expression refinement. Ph.D. thesis, Computing Science Department, University of Glasgow.Google Scholar
- Cohen, E. 1990. Programming in the 1990s: An Introduction to the Calculation of Programs. Springer-Verlag, New York. Google Scholar
Digital Library
- Detlefs, D., Nelson, G., and Saxe, J. B. 2005. Simplify: A theorem prover for program checking. J. ACM 52, 3, 365--473. Google Scholar
Digital Library
- Dijkstra, E. W. 1976. A Discipline of Programming. Prentice Hall, Englewood Cliffs, NJ. Google Scholar
Digital Library
- Dijkstra, E. W. 1982. The equivalence of bounded nondeterminacy and continuity. In Selected Writings on Computing: A Personal Perspective. Springer-Verlag, New York. Google Scholar
Digital Library
- Dijkstra, E. W. and Scholten, C. S. 1990. Predicate Calculus and Program Semantics. Springer-Verlag, New York. Google Scholar
Digital Library
- Dijkstra, E. W. and van Gasteren, A. J. M. 1986. A simple fixpoint argument without the restriction to continuity. Acta Inf. 23, 1, 1--7. Google Scholar
Digital Library
- Floyd, R. W. 1967. Nondeterministic algorithms. J. ACM 14, 4, 636--644. Google Scholar
Digital Library
- Gardiner, P. H. B. and Morgan, C. C. 1991. Data refinement of predicate transformers. Theor. Comput. Sci. 87, 143--162. Google Scholar
Digital Library
- Gries, D. 1981. The Science of Programming. Texts and Monographs in Computer Science. Springer-Verlag, New York. Google Scholar
Digital Library
- Gries, D. and Schneider, F. B. 1993. A Logical Approach to Discrete Math. Springer-Verlag, New York. Google Scholar
Digital Library
- Hehner, E. C. R. 1984. The Logic of Programming. Prentice Hall, Englewood Cliffs, NJ. Google Scholar
Digital Library
- Hehner, E. C. R. 1993. A Practical Theory of Programming. Springer-Verlag, New York. 2nd ed. 2004 at http://www.cs.toronto.edu/~hehner/aPToP/. Google Scholar
Digital Library
- Hitchcock, P. and Park, D. 1972. Induction rules and termination proofs. In IRIA Conference on Automata, Languages, and Programming Theory. North-Holland, Amsterdam, 225--251.Google Scholar
- Hoare, C. A. R. 1969. An axiomatic basis for computer programming. Commun. ACM 12, 10, 576--580. Google Scholar
Digital Library
- Kaldewaij, A. 1990. Programming: the Derivation of Algorithms. Prentice-Hall, New York. Google Scholar
Digital Library
- Kleymann, T. 1999. Hoare logic and auxiliary variables. Formal Aspects Comput. 11, 5, 541--566.Google Scholar
Digital Library
- Launchbury, J. and Peyton Jones, S. 1994. Lazy functional state threads. In Proceedings of the ACM SIGPLAN Conference on Programming Languages Design and Implementation. ACM, New York. Google Scholar
Digital Library
- Moggi, E. 1989. Computational lambda-calculus and monads. In Proceedings of the 4th Annual Symposium on Logic in Computer Science. IEEE Press, Piscataway, NJ., 14--23. Google Scholar
Digital Library
- Morgan, C. 1988. Auxiliary variables in data refinement. Inf. Process. Lett. 29, 6, 293--296. Google Scholar
Digital Library
- Morgan, C. 1994. Programming from Specifications, 2nd ed. Prentice Hall, New York. Google Scholar
Digital Library
- Morris, J. M. 1987. A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Program. 9, 287--306. Google Scholar
Digital Library
- Morris, J. M. and Tyrrell, M. 2007. Dual unbounded nondeterminacy, recursion, and fixpoints. Acta Inf. 44, 5, 323--344. Google Scholar
Digital Library
- Morris, J. M. and Tyrrell, M. 2008. Dually nondeterministic functions. ACM Trans. Program. Lang. Syst. 30, 6, 1--34. Google Scholar
Digital Library
- Naumann, D. A. 2001a. Calculating sharp adaptation rules. Inf. Process. Lett. 77, 2-4, 201--208. Google Scholar
Digital Library
- Naumann, D. A. 2001b. Ideal models for pointwise relational and state-free imperative programming. In Proceedings of the 3rd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming. ACM, New York, 4--15. Google Scholar
Digital Library
- Naumann, D. A. 2001c. Predicate transformer semantics of a higher-order imperative language with record subtyping. Sci. Comput. Program. 41, 1, 1--51. Google Scholar
Digital Library
- Nelson, G. 1989. A generalization of Dijkstra's calculus. ACM Trans. Program. Lang. Syst. 11, 4, 517--561. Google Scholar
Digital Library
- Nelson, G. 1992. Some generalizations and applications of Dijkstra's guarded commands. In Programming and Mathematical Methods, M. Broy, Ed. NATO ASI Series F: Computer and Systems Sciences, vol. 88. Springer-Verlag, New York.Google Scholar
- Partsch, H. A. 1990. Specification and Transformation of Programs. Springer-Verlag, New York. Google Scholar
Digital Library
- Pierik, C. and de Boer, F. S. 2004. Modularity and the rule of adaptation. In Algebraic Methodology and Software Technology, 10th International Conference, C. Rattray, et al., Eds. Lecture Notes in Computer Science, vol. 3116. Springer-Verlag, New York, 394--408.Google Scholar
- Spivey, J. 1988. Understanding Z: A Specification Language and its Formal Semantics. Cambridge University Press, New York. Google Scholar
Digital Library
- Tarski, A. 1955. A lattice-theoretical fixpoint theorem and its applications. Pacific J. Math. 5, 285--309.Google Scholar
Cross Ref
- Tunnicliffe, W. R. 1985. The free completely distributive lattice over a poset. Algebra Universalis 21, 133--135.Google Scholar
Cross Ref
- von Wright, J. 1994. The lattice of data refinement. Acta Inf. 31, 105--135. Google Scholar
Digital Library
- Wadler, P. 1992. The essence of functional programming. In Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, 1--14. Google Scholar
Digital Library
- Woodcock, J. and Loomes, M. 1988. Software Engineering Mathematics. Addison-Wesley Longman, Boston, MA. Google Scholar
Digital Library
Index Terms
Term transformers: A new approach to state
Recommendations
Alternating states for dual nondeterminism in imperative programming
The refinement calculus of Back, Morgan, Morris, and others is based on monotone predicate transformers (weakest preconditions) where conjunctions stand for demonic choices between commands and disjunctions for angelic choices. Arbitrary monotone ...
Probabilistic predicate transformers
Probabilistic predicates generalize standard predicates over a state space; with probabilistic predicate transformers one thus reasons about imperative programs in terms of probabilistic pre- and postconditions. Probabilistic healthiness conditions ...
The existence of states based on Glivenko semihoops
AbstractIn this paper, we mainly investigate the existence of states based on the Glivenko theorem in bounded semihoops, which are building blocks for the algebraic semantics for relevant fuzzy logics. First, we extend algebraic formulations of the ...








Comments