Abstract
The objects of programming semantics, namely, programs and languages, are inherently formal, but the derivation of semantic theories is all too often informal, deprived of the benefits of formal calculation “guided by the shape of the formulas.” Therefore, the main goal of this article is to provide for the study of semantics an approach with the same convenience and power of discovery that calculus has given for many years to applied mathematics, physics, and engineering. The approach uses functional predicate calculus and concrete generic functionals; in fact, a small part suffices. Application to a semantic theory proceeds by describing program behavior in the simplest possible way, namely by program equations, and discovering the axioms of the theory as theorems by calculation. This is shown in outline for a few theories, and in detail for axiomatic semantics, fulfilling a second goal of this article. Indeed, a chafing problem with classical axiomatic semantics is that some axioms are unintuitive at first, and that justifications via denotational semantics are too elaborate to be satisfactory. Derivation provides more transparency. Calculation of formulas for ante- and postconditions is shown in general, and for the major language constructs in particular. A basic problem reported in the literature, whereby relations are inadequate for handling nondeterminacy and termination, is solved here through appropriately defined program equations. Several variants and an example in mathematical analysis are also presented. One conclusion is that formal calculation with quantifiers is one of the most important elements for unifying continuous and discrete mathematics in general, and traditional engineering with computing science, in particular.
- Back, R.-J. 1983. A continuous semantics for unbounded nondeterminism. Theor. Comput. Sci. 23, 2, 187--210.Google Scholar
Cross Ref
- Back, R.-J. and von Wright, J. 1992. Combining angels, demons and miracles in program specifications. Theor. Comput. Sci. 100, 2, 365--383. Google Scholar
Digital Library
- Back, R.-J. and von Wright, J. 1998. Refinement Calculus: A Systematic Introduction. Springer, New York. Google Scholar
Cross Ref
- Backhouse, R. 2002. Galois Connections. Number 7 in Programming Algebra. Univ. of Nottingham. http://www.cs.nott.ac.uk/~rcb/G53PAL/G53PAL.html.Google Scholar
- Bass, H. 2003. The Carnegie initiative on the doctorate: The case of mathematics. Notices of the AMS 50, 7 (Aug.), 767--776.Google Scholar
- Boiten, E. and Möller, B. 2002. 6th international conference on mathematics of program construction. Conference announcement: http://www.cs.kent.ac.uk/events/conf/2002/mpc2002. Google Scholar
Digital Library
- Boute, R. 1988. Systems semantics: Principles, applications and implementation. ACM Trans. Program. Languages Syst. 10, 1 (Jan.), 118--155. Google Scholar
Digital Library
- Boute, R. 1993. Funmath illustrated: A declarative formalism and application examples. Declarative Systems Series 1, Computing Science Institute, University of Nijmegen.Google Scholar
- Boute, R. 2002. Functional mathematics: A unifying declarative and calculational approach to systems, circuits and programs---Part I. Ghent University. Course notes.Google Scholar
- Boute, R. 2003. Concrete generic functionals: Principles, design and applications. In Generic Programming, J. Gibbons and J. Jeuring, eds. Kluwer Academic, Hingham, Mass, 89--119. Google Scholar
Digital Library
- Boute, R. 2005. Functional declarative language design and predicate calculus: A practical approach. ACM Trans. Program. Languages Syst. 27, 5 (Sept.) 988--1047. Google Scholar
Digital Library
- Cohen, E. 1990. Programming in the 1990's: An Introduction to the Calculation of Programs. Springer, New York. Google Scholar
Digital Library
- De Bakker, J. W. 1980. Mathematical Theory of Program Correctness. Prentice-Hall, Upper Saddle River, N. J. Google Scholar
Digital Library
- Dean, C. N. and Hinchey, M. G. 1996. Teaching and Learning Formal Methods. Academic Press, London.Google Scholar
- Dijkstra, E. W. 1976. A Discipline of Programming. Prentice-Hall, Upper Saddle River, N. J. Google Scholar
Digital Library
- Dijkstra, E. W. 2000. Under the spell of Lcibniz's dream. Technical Note EWD1298. http://www.cs.utexas.edu/users/EWD/ewd12xx/EWD1298.pdf. Google Scholar
Digital Library
- Dijkstra, E. W. and Scholten, C. S. 1990. Predicate Calculus and Program Semantics. Springer, New York. Google Scholar
Digital Library
- Dijkstra, R. M. 1994. Relational calculus and relational program semantics. Computing Science Reports CS-R9408, Dept. of Computer Science, University of Groningen.Google Scholar
- Dijkstra, R. M. 1998. Computation calculus: Bridging a formalization gap. In Proceedings of the Conference Mathematics of Program Construction. LNCS, vol. 1422. Springer, New York, 151--174. Google Scholar
Digital Library
- Gordon, M. 2003. Specification and Verification I. University of Cambridge. http://www.cl.cam.ac.uk/Teaching/mjcg/Lectures/SpecVer1/Notes03/Notes.pdf.Google Scholar
- Gries, D. 1996. The need for education in useful formal logic. IEEE Computer 29, 4 (Apr.), 29--30. Google Scholar
Digital Library
- Gries, D. and Schneider, F. B. 1993. A Logical Approach to Discrete Math. Springer, New York. Google Scholar
Digital Library
- Hancock, P. 2004. Refinement calculus: Some references and pointers. Technical note. http://homepages.inf.ed.ac.uk/v1phanc1/RC-bib.pdf.Google Scholar
- Hehner, E. 1999. Specifications, programs and total correctness. Sci. Comput. Program. 34, 3 (July), 191--205. Original version (1998) also on the web: http://www.cs.toronto.edu/~hehner/SPTC.pdf. Google Scholar
Digital Library
- Hehner, E. 2004. A Practical Theory of Programming, 2nd ed. Springer, New York. http://www.cs.toronto.edu/~hehner/aPToP/. Google Scholar
Digital Library
- Hesselink, W. H. 1992. Programs, Recursion, and Unbounded Choice. Cambridge, New York. Google Scholar
Digital Library
- Hoare, C. A. R. 1969. An axiomatic basis for computer programming. Comm. ACM 12, 10 (Oct.), 576--580, 583. Google Scholar
Digital Library
- Hoare, C. A. R. and Jifeng, H. 1998. Unifying Theories of Programming. Prentice-Hall, Upper Saddle River, N. J.Google Scholar
- Lamport, L. 2002. Specifying Systems. Addison-Wesley, Reading, Mass.Google Scholar
- Lamport, L. 2004. All I really need to know I learned in high school. Proceedings of the 2004 CoLogNET/FME Symposium on Teaching Formal Methods. http://www.intec.UGent.be/groupsites/formal/Sympos2004/Sympos2004.htm.Google Scholar
- Lang, S. 1983. Undergraduate Analysis. Springer, Berlin.Google Scholar
- Leavens, G. 1995. Weakest preconditions. Course notes Semantics Program. Languages (Com S 641). http://www.cs.iastate.edu/~leavens/ComS641-Hesselink.html.Google Scholar
- Lee, E. A. and Messerschmitt, D. G. 1998. Engineering---An education for the future. IEEE Computer 31, 1 (Jan.), 77--85. http://www.gigascale.org/pubs/5/computermag.pdf. Google Scholar
Digital Library
- Lee, E. A. and Varaiya, P. 2003. Structure and Interpretation of Signals and Systems. Addison-Wesley, Reading, Mass.Google Scholar
- Leino, K. R. M. and Manohar, R. 1999. Joining specification statements. Theor. Comput. Sci. 216, 1--2 (Mar.), 375--394. Google Scholar
Digital Library
- Loeckx, J. and Sieber, K. 1984. The Foundations of Program Verification. Wiley-Teubner. Google Scholar
Digital Library
- McCluskey, E. J. 1965. Introduction to the Theory of Switching Circuits. McGraw Hill, New York.Google Scholar
- Meyer, B. 1991. Introduction to the Theory of Programming Languages. Prentice Hall, Upper Saddle River, N. J. Google Scholar
Digital Library
- Morgan, C. 1994. Programming from Specifications, 2nd ed. Prentice Hall, Upper Saddle River, N. J. Google Scholar
Digital Library
- Morris, J. M. 1987. A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Program. 9, 3 (Dec.), 287--306. Google Scholar
Digital Library
- Nelson, G. 1989. A generalization of Dijkstra's calculus. ACM Trans. Prog. Lang. Syst. 11, 4 (Oct.), 517--561. Google Scholar
Digital Library
- Plotkin, G. D. 1980. Dijkstra's predicate transformers and Smyth's powerdomains. In Abstract Software Specifications, D. Björner, ed. LNCS, vol. 86. Springer, New York, 527--583. Google Scholar
Digital Library
- Ravaglia, R., Alper, T., Rozenfeld, M., and Suppes, P. 1999. Successful pedagogical applications of symbolic computation. In Computer-Human Interaction in Symbolic Computation, N. Kajler, ed. Springer, New York. http://www-epgy.stanford.edu/research/chapter4.pdf.Google Scholar
- Recorde, R. 1557. The Whetstone of Witte. http://www-gap.dcs.st-and.ac.uk/~history/Mathematicians/Recorde.html.Google Scholar
- Taylor, P. 2000. Practical Foundations of Mathematics, 2nd printing. Cambridge Studies in Advanced Mathematics, no. 59. Cambridge University Press, New York. Comment about chapter 1 of this book on http://www.dcs.qmul.ac.uk/~pt/Practical_Foundations/html/s10.html.Google Scholar
- Wigner, E. 1960. The unreasonable effectiveness of mathematics in the natural sciences. Comm. Pure Appl. Math. 13, I (Feb.), 1--14. http://nedwww.ipac.caltech.edu/level5/March02/Wigner/Wigner.html.Google Scholar
Cross Ref
- Winskel, G. 1993. The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge, Mass. Google Scholar
Digital Library
Index Terms
Calculational semantics: Deriving programming theories from equations by functional predicate calculus
Recommendations
Functional declarative language design and predicate calculus: a practical approach
In programming language and software engineering, the main mathematical tool is de facto some form of predicate logic. Yet, as elsewhere in applied mathematics, it is used mostly far below its potential, due to its traditional formulation as just a ...
Three-Valued Constructive Logic and Logic Programs
ISMVL '95: Proceedings of the 25th International Symposium on Multiple-Valued LogicAbstract: We propose three valued constructive logic with strong negation 3N by describing both proof and model theory. We relate the proposed three valued system to J. Lukasiewicz's (1920) three valued logic. We demonstrate that 3N is very useful to ...
Using domain-independent problems for introducing formal methods
FM'06: Proceedings of the 14th international conference on Formal MethodsThe key to the integration of formal methods into engineering practice is education. In teaching, domain-independent problems —i.e., not requiring prior engineering background— offer many advantages.
Such problems are widely available, but this paper ...








Comments