From SOS rules to proof principles: an operational metatheory for functional languages

Structural Operational Semantics (SOS) is a widely used formalism for specifying the computational meaning of programs, and is commonly used in specifying the semantics of functional languages. Despite this widespread use there has been relatively little work on the "metatheory" for such semantics. As a consequence the operational approach to reasoning is considered ad hoc since the same basic proof techniques and reasoning tools are reestablished over and over, once for each operational semantics specification. This paper develops some metatheory for a certain class of SOS language specifications for functional languages. We define a rule format, Globally Deterministic SOS (GDSOS), and establish some proof principles for reasoning about equivalence which are sound for all languages which can be expressed in this format. More specifically, if the SOS rules for the operators of a language conform to the syntax of the GDSOS format, then ¿ a syntactic analogy of continuity holds, which relates a recursive function to its finite unwindings, and forms the basis of a Scott-style fixed-point induction technique; ¿ a powerful induction principle called improvement induction holds for a certain class of instrumented GDSOS semantics; the Improvement Theorem from [Sands, POPL'95] is a simple corollary; ¿ a useful bisimulation-based coinductive proof technique for operational approximation (and its "instrumented" variants) is sound.

[1]  Carolyn L. Taylor The Essence of Rum: A Theory of the Intensional and Extensional Aspects of Lisp-Type Computation, , 1985 .

[2]  Davide Sangiorgi,et al.  Locality and Interleaving Semantics in Calculi for Mobile Processes , 1996, Theor. Comput. Sci..

[3]  Martin Odersky,et al.  The call-by-need lambda calculus , 1998, Journal of Functional Programming.

[4]  Bengt Nordström,et al.  Programming in Martin-Lo¨f's type theory: an introduction , 1990 .

[5]  David Sands,et al.  Higher-order expression procedures , 1995, PEPM '95.

[6]  Douglas J. Howe Proving Congruence of Bisimulation in Functional Programming Languages , 1996, Inf. Comput..

[7]  Scott F. Smith From Operational to Denotational Semantics , 1991, MFPS.

[8]  Douglas J. Howe Equality in lazy computation systems , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[9]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[10]  Douglas J. Gurr Semantic frameworks for complexity , 1990 .

[11]  Robert Cartwright Recursive Programs as Definitions in First Order Logic , 1984, SIAM J. Comput..

[12]  Valérie Gouranton,et al.  Derivation of Static Analysers of Functional Programs from Path Properties of a Natural Semantics , 1994 .

[13]  Wan Fokkink,et al.  A conservative look at term deduction systems with variable binding , 1995 .

[14]  David A. Schmidt Natural-Semantics-Based Abstract Interpretation (Preliminary Version) , 1995, SAS.

[15]  Patrick Cousot,et al.  Inductive definitions, semantics and abstract interpretations , 1992, POPL '92.

[16]  David Sands,et al.  Operational Theories of Improvement in Functional Languages (Extended Abstract) , 1991, Functional Programming.

[17]  C. Talcott Reasoning about Functions with Eeects , 1997 .

[18]  C. Talcott The essence of rum: a theory of the intensional and extensional aspects of lisp-type computation (program transformation, closure, continuation structure, comparison-relation) , 1985 .

[19]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential Control , 1987, Theor. Comput. Sci..

[20]  Andrew Pitts,et al.  Semantics and Logics of Computation: Operationally-Based Theories of Program Equivalence , 1997 .

[21]  Douglas J. Howe On computational open-endedness in Martin-Lof's type theory , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[22]  David Sands,et al.  Total correctness by local improvement in the transformation of functional programs , 1996, TOPL.

[23]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[24]  John Launchbury,et al.  A natural semantics for lazy evaluation , 1993, POPL '93.

[25]  S. Abramsky The lazy lambda calculus , 1990 .

[26]  Albert R. Meyer,et al.  Full Abstraction and the Context Lemma , 1991, TACS.

[27]  Andrew D. Gordon Bisimilarity as a theory of functional programming , 1995, MFPS.

[28]  Carolyn L. Talcott,et al.  From Operational Semantics to Domain Theory , 1996, Inf. Comput..

[29]  David Sands Proving the Correctness of Recursion-Based Automatic Program Transformations , 1995, TAPSOFT.

[30]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[31]  Jan Friso Groote,et al.  Structured Operational Semantics and Bisimulation as a Congruence , 1992, Inf. Comput..

[32]  Jan Willem Klop,et al.  Combinatory reduction systems , 1980 .

[33]  Bard Bloom Can LCF be topped? Flat lattice models of typed lambda calculus , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[34]  Albert R. Meyer,et al.  Bisimulation can't be traced , 1988, POPL '88.

[35]  Frits W. Vaandrager,et al.  Turning SOS rules into equations , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[36]  David Sands,et al.  Improvement theory and its applications , 1999 .