A Rational Deconstruction of Landin's SECD Machine
TLDR
This article deconstructs the SECD machine into a lambda-interpreter, i.e., an evaluation function, and it is reconstructed into a variety of SECD-like machines.Abstract:
Landin's SECD machine was the first abstract machine for the lambda-calculus viewed as a programming language. Both theoretically as a model of computation and practically as an idealized implementation, it has set the tone for the subsequent development of abstract machines for functional programming languages. However, and even though variants of the SECD machine have been presented, derived, and invented, the precise rationale for its architecture and modus operandi has remained elusive. In this article, we deconstruct the SECD machine into a lambda-interpreter, i.e., an evaluation function, and we reconstruct lambda-interpreters into a variety of SECD-like machines. The deconstruction and reconstructions are transformational: they are based on equational reasoning and on a combination of simple program transformations--mainly closure conversion, transformation into continuation-passing style, and defunctionalization. The evaluation function underlying the SECD machine provides a precise rationale for its architecture: it is an environment-based eval-apply evaluator with a callee-save strategy for the environment, a data stack of intermediate results, and a control delimiter. Each of the components of the SECD machine (stack, environment, control, and dump) is therefore rationalized and so are its transitions. The deconstruction and reconstruction method also applies to other abstract machines and other evaluation functions. It makes it possible to systematically extract the denotational content of an abstract machine in the form of a compositional evaluation function, and the (small-step) operational content of an evaluation function in the form of an abstract machine.read more
Citations
More filters
Journal ArticleDOI
A functional correspondence between call-by-need evaluators and lazy abstract machines
TL;DR: This article derives a lazy abstract machine from an ordinary call-by-need evaluator that threads a heap of updatable cells, using closure conversion, transformation into continuation-passing style, and defunctionalization of continuations.
Journal ArticleDOI
An Operational Foundation for Delimited Continuations in the CPS Hierarchy
TL;DR: In this article, an abstract machine and a reduction semantics for the lambda-calculus extended with control operators that give access to delimited continuations in the CPS hierarchy are presented.
The logical basis of evaluation order and pattern-matching
TL;DR: This thesis aims to give a fresh take on the proofs-as-programs analogy, and obtains a programming language with built-in support for pattern-matching, in which evaluation order is explicitly reflected at the level of types—and hence can be controlled locally, rather than being an ad hoc, global policy decision.
Dissertation
Space Cost Analysis Using Sized Types
TL;DR: The applicability of functional programming in resource-sensitive systems with an automatic program analysis for obtaining guaranteed upper bounds on dynamic space usage of functional programs and an inferrence algorithm that automatically reconstructs size and cost bounds is demonstrated.
Book ChapterDOI
From reduction-based to reduction-free normalization
TL;DR: The overall method builds on previous work by the author and his students on a syntactic correspondence between reduction semantics and abstract Machines and on a functional correspondence between evaluators and abstract machines.