From operational semantics to abstract machines

We consider the problem of mechanically constructing abstract machines from operational semantics, producing intermediate-level specifications of evaluators guaranteed to be correct with respect to the operational semantics. We construct these machines by repeatedly applying correctness-preserving transformations to operational semantics until the resulting specifications have the form of abstract machines. Though not automatable in general, this approach to constructing machine implementations can be mechanized, providing machine-verified correctness proofs. As examples we present the transformation of specifications for both call-by-name and call-by-value evaluation of the untyped λ-calculus into abstract machines that implement such evaluation strategies. We also present extensions to the call-by-value machine for a language containing constructs for recursion, conditionals, concrete data types, and built-in functions. In all cases, the correctness of the derived abstract machines follows from the (generally transparent) correctness of the initial operational semantic specification and the correctness of the transformations applied.

[1]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[2]  Flemming Nielson,et al.  Two-Level Semantics and Code Generation , 1988, Theor. Comput. Sci..

[3]  Mitchell Wand,et al.  Deriving Target Code as a Representation of Continuation Semantics , 1982, TOPL.

[4]  John Hannan Staging transformations for abstract machines , 1991 .

[5]  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.

[6]  John Hannan,et al.  Investigating a proof-theoretic meta-language for functional programs , 1990 .

[7]  G. Huet,et al.  Equations and rewrite rules: a survey , 1980 .

[8]  Jean-Yves Girard,et al.  The System F of Variable Types, Fifteen Years Later , 1986, Theor. Comput. Sci..

[9]  P. J. Landin The Mechanical Evaluation of Expressions , 1964, Comput. J..

[10]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[11]  John Hannan,et al.  Compiler verification in LF , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[12]  J. Roger Hindley,et al.  Introduction to combinators and λ-calculus , 1986, Acta Applicandae Mathematicae.

[13]  Robin Milner,et al.  Definition of standard ML , 1990 .

[14]  Luca Cardelli,et al.  Compiling a functional language , 1984, LFP '84.

[15]  Gerhard Gentzen,et al.  Investigations into Logical Deduction , 1970 .

[16]  F. Pfenning Logic programming in the LF logical framework , 1991 .

[17]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[18]  Gordon D. Plotkin,et al.  Logical frameworks , 1991 .

[19]  P. Martin-Löf Constructive mathematics and computer programming , 1984 .

[20]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[21]  Pierre-Louis Curien,et al.  The Categorical Abstract Machine , 1987, Sci. Comput. Program..

[22]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[23]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[24]  Pierre-Louis Curien,et al.  An Abstract Framework for Environment Machines , 1991, Theor. Comput. Sci..

[25]  G. Kreisel The Collected Papers of Gerhard Gentzen , 1971 .

[26]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.