## From operational semantics to abstract machines (1992)

Venue: | Mathematical Structures in Computer Science |

Citations: | 60 - 5 self |

### BibTeX

@INPROCEEDINGS{Hannan92fromoperational,

author = {John Hannan and Dale Miller},

title = {From operational semantics to abstract machines},

booktitle = {Mathematical Structures in Computer Science},

year = {1992}

}

### Years of Citing Articles

### OpenURL

### Abstract

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.

### Citations

1619 | The definition of Standard ML
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...erhaps the first to use inference rules to axiomatize evaluation to canonical form in his descriptions of the dynamic semantics of Standard ML, including the latest specification of the full language =-=[MTH90]-=-. The work presented here was initially inspired by the work in Natural Semantics, as described in [Kah87]. That work uses a first-order meta-logic with inference rules presented using sequents. We ex... |

1360 | A structural approach to operational semantics
- Plotkin
- 1981
(Show Context)
Citation Context .... Hannan and D. Miller 4 2.1. Operational Semantics The phrase “structural operational semantics” is attributed to Plotkin, based on his seminal paper “A Structural Approach to Operational Semantics” =-=[Plo81]-=-. Although that term has come to describe a few different styles of specifications, in that paper it is used to describe evaluation in terms of a one-step reduction relation and his inference rules ax... |

868 |
A Formulation of the Simple Theory of Types
- Church
- 1941
(Show Context)
Citation Context ...rrow: (ty × ty) → ty. The relationship between a program and its type is denoted by the predicate of the metalogic hastype of meta-logic type (((string × ty) list) × term × ty) → o. (Following Church =-=[Chu40]-=-, we use o to denote the type of meta-logic propositions). The first argument of hastype is a context binding variable names to types. For example, the proposition hastype(nil, lam(“i”, var(“i”)), arr... |

711 | A framework for defining logics
- Harper, Honsel, et al.
- 1987
(Show Context)
Citation Context ...s. Verification of the abstract machines constructed using this method is not addressed. Finally, all the proof systems used in this paper can be naturally represented in the dependent type system LF =-=[HHP87]-=-. It is then possible to use the Elf implementation [Pfe91] of LF to implement the various transformations we have presented. Initial work in this direction is reported in [HP92]. 8. Summary We presen... |

349 |
Intuitionistic Type Theory
- Martin-Löf
- 1984
(Show Context)
Citation Context ... language design has been the use of operational semantics to define the semantics of a programming language. The particular style of operational semantics we consider here was inspired by Martin-Löf =-=[Mar84]-=- and uses sets of inference rules as specifications. Various instances of this approach have been called Proof-Theoretic Semantics, Natural Semantics and Relational Semantics [Han90, Kah87, MTH90]. Th... |

347 |
The mechanical evaluation of expressions
- Landin
- 1963
(Show Context)
Citation Context ... to them until we produce systems describing abstract machines. The resulting proof systems are equivalent to the Krivine machine [Cur90] (for the call-by-name case) and a variant of the SECD machine =-=[Lan64]-=- (for the call-by-value case). In Section 6 we describe how the derivations of Sections 4 and 5 can be modified or extended to yield machines for richer languages that include recursion, a conditional... |

319 | Natural Semantics
- Kahn
- 1988
(Show Context)
Citation Context ...the dynamic semantics of Standard ML, including the latest specification of the full language [MTH90]. The work presented here was initially inspired by the work in Natural Semantics, as described in =-=[Kah87]-=-. That work uses a first-order meta-logic with inference rules presented using sequents. We extend this work by using a higher-order (and higher-level) meta-logic employing less explicit, natural dedu... |

315 | Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem
- Bruijn
- 1972
(Show Context)
Citation Context ...eir offsets. For the sake of brevity, we often abbreviate the term (var n) by n. Here, clo ′ treats its second argument as an abstraction by modifying offsets of variables in that argument. Following =-=[Bru72]-=-, closed terms of type tm can be placed in one-to-one correspondence with those terms of type fotm for which all indices denoting bound variables have an offset to an actual occurrence of a λ or a clo... |

272 | Investigations into logical deduction - Gentzen - 1969 |

210 |
Call-by-name, call-by-value and the λ-calculus
- Plotkin
- 1976
(Show Context)
Citation Context ...eatures. The prototypical abstract machine for a functional programming language is the SECDFrom Operational Semantics to Abstract Machines 41 machine, and a proof of its correctness can be found in =-=[Plo76]-=-. While demonstrating the correctness of this machine with respect to an operational semantics, this proof does not provide much intuition regarding the overall structure of the machine or how it can ... |

176 | Logic programming in the LF logical framework
- Pfenning
- 1991
(Show Context)
Citation Context ...this method is not addressed. Finally, all the proof systems used in this paper can be naturally represented in the dependent type system LF [HHP87]. It is then possible to use the Elf implementation =-=[Pfe91]-=- of LF to implement the various transformations we have presented. Initial work in this direction is reported in [HP92]. 8. Summary We presented a general method for translating the operational semant... |

150 |
The system F of variable types, fifteen years later, Theoret
- Girard
- 1986
(Show Context)
Citation Context ... as an untyped operation. We can just erase the types of a simply typed term and apply untyped reduction to these terms. A more interesting case involves the second-order lambda calculus, or System F =-=[Gir86]-=-, in which types play a more important role during reduction. We begin by defining the syntax for this calculus. The types of F are given by the following grammar, where α ranges over type variables. ... |

128 |
The categorical abstract machine
- Cousineau, Curien, et al.
- 1987
(Show Context)
Citation Context ... C, L, R :: {E, λM} :: S〉 ⇒ 〈M :: C, (R :: E) :: L, S〉 〈nil, nil, V :: S〉 ⇒ V Fig. 21. The CLS machine There is a close relationship between our CLS machine and the Categorical Abstract Machine (CAM) =-=[CCM87]-=-. The latter can be viewed as a compiled version of the former. Both utilize a stack of environments and a stack of result values, though in the CAM these two stacks have been merged into one structur... |

120 |
Introduction to Combinators and λ-calculus
- Hindley, Seldin
- 1986
(Show Context)
Citation Context ...re called β-redexes. A term is in λ-normal form if it contains no β or η-redexes. Every term can be converted to a λ-normal term, and that normal term is unique up to the name of bound variables. See =-=[HS86]-=- for a more complete discussion of these basic properties of the simply typed λ-calculus. 3.2. Specifications as Formulas Our specification of evaluators uses a weak extension to Horn clause logic. In... |

104 | An overview of λProlog
- Miller, Nadathur
- 1988
(Show Context)
Citation Context ... a specification is first-order, then Prolog or the TYPOL language of the CENTAUR system [Kah87] can provide a depth-first interpreters of it. Since the higherorder logic programming language λProlog =-=[NM88]-=- supports higher-order quantification, λ-conversion, and embedded universal quantification, it can be used to give a depth-first implementation of the full meta-logic. Although depth-first interpretat... |

100 | Equations and rewrite rules: a survey
- Huet, Oppen
- 1980
(Show Context)
Citation Context ...tract Evaluation System (AES) that captures and abstracts some of this commonality. We assume some familiarity with term rewriting, its terminology and the notion of computation in a rewriting system =-=[HO80]-=-. Recall that a term rewriting system is a pair (Σ, R) such that Σ is a signature and R is a set of directed equations {li ⇒ ri}i∈I with li, ri ∈ TΣ(X) and V(ri) ⊆ V(li). Here, TΣ(X) denotes the set o... |

66 | Compiling a Functional Language
- Cardelli
- 1984
(Show Context)
Citation Context ...ide support for extending the machines to accommodate additional language features. An example of an abstract machine used in an actual implementation of a language is the Functional Abstract Machine =-=[Car84]-=-, a variant of the SECD machine, which has been optimized to allow fast function application. This machine, designed for implementing the ML language, addresses issues including efficient local variab... |

64 |
An abstract framework for environment machines
- Curien
- 1991
(Show Context)
Citation Context ...fications developed in Section 4 and apply appropriate transformations to them until we produce systems describing abstract machines. The resulting proof systems are equivalent to the Krivine machine =-=[Cur90]-=- (for the call-by-name case) and a variant of the SECD machine [Lan64] (for the call-by-value case). In Section 6 we describe how the derivations of Sections 4 and 5 can be modified or extended to yie... |

52 |
Deriving target code as a representation of continuation semantics
- Wand
- 1982
(Show Context)
Citation Context ...ons, producing a level of machine code similar to that produced in the above approach, can be found in [Han91]. An alternative approach to constructing abstract machines from semantics is explored in =-=[Wan82]-=- where a continuation-style denotational semantics is used instead of opera-J. Hannan and D. Miller 42 tional semantics. The proposed technique involves choosing special-purpose combinators to elimin... |

41 | Compiler verification in LF
- Hannan, Pfenning
(Show Context)
Citation Context ...ndent type system LF [HHP87]. It is then possible to use the Elf implementation [Pfe91] of LF to implement the various transformations we have presented. Initial work in this direction is reported in =-=[HP92]-=-. 8. Summary We presented a general method for translating the operational semantics of evaluators into abstract machines. We believe that the choice of operational semantics as a starting point for s... |

39 | Natural Deduction. Almqvist - Prawitz - 1965 |

29 |
Two-level semantics and code generation
- Nielson, Nielson
- 1988
(Show Context)
Citation Context ...h uses a two-level meta-language to distinguish between compile-time and run-time operations of a denotational semantics and translates the run-time operations into an intermediate-level machine code =-=[NN88]-=-. The abstract machine and compiler defined in this way, though strongly influenced by denotational semantics, are given informally, and a correctness proof is still required to relate the denotationa... |

26 |
Investigating a Proof-Theoretic Meta-Language for Functional Programs
- Hannan
(Show Context)
Citation Context ...nce there are no implications to introduce, proofs here do not involve the discharging of assumptions. (Adding such occurrences of implication is natural and useful for a wide range of specifications =-=[Han90]-=-; such implications, however, play only a small role in the specification of evaluators and so are not considered here.) A proof system is first-order or second-order if its equivalent presentation as... |

17 |
On computational open-endedness in Martin-Löf’s type theory
- Howe
- 1991
(Show Context)
Citation Context ... variables typically serve as placeholders or temporary names for intermediate results used in computing the final result of the computation specified by the inference rule. This idea is discussed in =-=[How91]-=- where a class of rules called evaluation rules is defined. Our concern here is in providing a technique for eliminating explicit reference to these variables. For the case of N 1 we exploit propertie... |

13 |
Staging transformations for abstract machines
- Hannan
- 1991
(Show Context)
Citation Context ... closely to operations performed on terms in the CLS, and recent work has shown this correspondence by defining the compilation of λ-terms into CAM instructions from the definition of the CLS machine =-=[Han91]-=-. 6. Language and Machine Extensions In this section we consider some extensions to our simple, object-level programming language, making it more realistic. We demonstrate how these new features can b... |

2 |
Towards a formal framework for evaluation of operational semantics
- Silva
- 1990
(Show Context)
Citation Context ...t effectively removes the need to backtrack. Our transformation is closely related to the factorization of context free production rules with common initial segments, and it has also been examined in =-=[Sil90]-=-. The following transformation can be used in conjunction with other transformations to remove the need for backtracking in some proof systems. For notational convenience we abbreviate α1 :: · · · :: ... |