Calculational semantics: Deriving programming theories from equations by functional predicate calculus

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.

[1]  Edward Cohen,et al.  Programming in the 1990s: An Introduction to the Calculation of Programs , 1990 .

[2]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[3]  Horst Herrlich,et al.  Galois Connections , 1985, Mathematical Foundations of Programming Semantics.

[4]  Wim H. Hesselink Programs, Recursion and Unbounded Choice , 1992 .

[5]  Bertrand Meyer,et al.  Introduction to the Theory of Programming Languages , 1990 .

[6]  Czeslaw Bylinski,et al.  Galois Connections , 1985, Mathematical Foundations of Programming Semantics.

[7]  Rutger M. Dijkstra,et al.  Computation calculus bridging a formalization gap , 1998, Sci. Comput. Program..

[8]  E. Wigner The Unreasonable Effectiveness of Mathematics in the Natural Sciences (reprint) , 1960 .

[9]  Lee,et al.  Engineering an Education for the Future , .

[10]  Edward A. Lee,et al.  Structure and interpretation of signals and systems , 2002 .

[11]  Eric C. R. Hehner,et al.  Specifications, Programs, and Total Correctness , 1999, Sci. Comput. Program..

[12]  Ralph-Johan Back,et al.  A Continuous Semantics for Unbounded Nondeterminism , 1983, Theor. Comput. Sci..

[13]  Edward A. Lee,et al.  Engineering and Education for the Future , 1998, Computer.

[14]  Carroll Morgan,et al.  Programming from specifications (2nd ed.) , 1994 .

[15]  Gordon D. Plotkin,et al.  Dijkstras Predicate Transformers & Smyth's Power Domaine , 1979, Abstract Software Specifications.

[16]  Raymond T. Boute,et al.  Concrete Generic Functionals , 2002, Generic Programming.

[17]  Glynn Winskel,et al.  The formal semantics of programming languages - an introduction , 1993, Foundation of computing series.

[18]  Raymond T. Boute,et al.  Functional declarative language design and predicate calculus: a practical approach , 2005, TOPL.

[19]  Wim H. Hesselink Predicate-Transformation Semantics with Recursion and Unbounded Choice , 1992 .

[20]  Raymond T. Boute,et al.  Systems semantics: principles, applications, and implementation , 1988, TOPL.

[21]  Greg Nelson,et al.  A generalization of Dijkstra's calculus , 1989, ACM Trans. Program. Lang. Syst..

[22]  Xi-Ren Cao,et al.  Structure and Interpretation of Signals and Systems—E. A. Lee , 2003 .

[23]  Jacques Loeckx,et al.  The Foundations of Program Verification, 2nd ed , 1987 .

[24]  Eric C. R. Hehner A Practical Theory of Programming , 1993, Texts and Monographs in Computer Science.

[25]  Edward J. McCluskey,et al.  Introduction to the theory of switching circuits , 1965 .

[26]  Carroll Morgan,et al.  Programming from specifications , 1990, Prentice Hall International Series in computer science.

[27]  Fred B. Schneider,et al.  A Logical Approach to Discrete Math , 1993, Texts and Monographs in Computer Science.

[28]  A. Jackson The Carnegie Initiative on the Doctorate : The Case of Mathematics Hyman Bass , 2003 .

[29]  Joseph M. Morris,et al.  A Theoretical Basis for Stepwise Refinement and the Programming Calculus , 1987, Sci. Comput. Program..

[30]  Patrick Suppes,et al.  Successful pedagogical applications of symbolic computation , 1998, Computer-Human Interaction in Symbolic Computation.

[31]  Edsger W. Dijkstra,et al.  Predicate Calculus and Program Semantics , 1989, Texts and Monographs in Computer Science.

[32]  Ralph-Johan Back,et al.  Refinement Calculus: A Systematic Introduction , 1998 .

[33]  C. Neville Dean,et al.  Teaching and learning formal methods , 1996 .

[34]  J. Back,et al.  Combining Angels, Demons and Miracles in Program Speciications , 1989 .

[35]  Jacques Loeckx,et al.  The Foundations of Program Verification , 1987 .

[36]  K. Rustan M. Leino,et al.  Joining Specification Statements , 1999, Theor. Comput. Sci..

[37]  J. W. de Bakker,et al.  Mathematical theory of program correctness , 1980, Prentice-Hall international series in computer science.

[38]  Raymond T. Boute,et al.  Concrete generic functionals - Principles, design and applications , 2003 .

[39]  Rutger M. Dijkstra Computation calculus bridging a formalization gap , 2000, Sci. Comput. Program..

[40]  Edsger W. Dijkstra,et al.  Under the spell of Leibniz's dream , 2001, Inf. Process. Lett..