A Functional Correspondence between Call-by-Need Evaluators and Lazy Abstract Machines
TLDR
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.Abstract:
We bridge the gap between compositional evaluators and abstract machines for the lambda-calculus, using closure conversion, transformation into continuation-passing style, and defunctionalization of continuations. This article is a followup of our article at PPDP 2003, where we consider call by name and call by value. Here, however, we consider call by need. We derive a lazy abstract machine from an ordinary call-by-need evaluator that threads a heap of updatable cells. In this resulting abstract machine, the continuation fragment for updating a heap cell naturally appears as an `update marker', an implementation technique that was invented for the Three Instruction Machine and subsequently used to construct lazy variants of Krivine's abstract machine. Tuning the evaluator leads to other implementation techniques such as unboxed values. The correctness of the resulting abstract machines is a corollary of the correctness of the original evaluators and of the program transformations used in the derivation.read more
Citations
More filters
Proceedings ArticleDOI
A functional correspondence between evaluators and abstract machines
TL;DR: The gap between functional evaluators and abstract machines for the λ-calculus is bridged using closure conversion, transformation into continuation-passing style, and defunctionalization, and the Categorical Abstract Machine is considered.
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
A static simulation of dynamic delimited control
TL;DR: A continuation-passing-style CPS transformation for some dynamic delimited-control operators, including Felleisen’s $\verb|control|$ and $\ verb|prompt|$ , that extends a standard call-by-value CPS transformation is presented.
Journal ArticleDOI
Improving the lazy Krivine machine
TL;DR: An improvement is presented that eliminates the production of marker sequences of length greater than one and results in a more space and time efficient variant of the Krivine machine.
Journal ArticleDOI
An Operational Foundation for Delimited Continuations
TL;DR: An abstract machine is derived that corresponds to a definitional interpreter for the control operators shift and reset and a syntactic theory of delimited continuations is constructed, which describes the construction and derivation of the family of control operatorsshift_n and reset_n.