• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

A functional correspondence between callby-need evaluators and lazy abstract machines (2004)

by M S Ager, O Danvy, J Midtgaard
Venue:Inf. Process. Lett
Add To MetaCart

Tools

Sorted by:
Results 1 - 10 of 26
Next 10 →

A functional correspondence between evaluators and abstract machines

by Mads Sig Ager, Dariusz Biernacki, Olivier Danvy, Jan Midtgaard - In Proceedings of the Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming , 2003
"... We bridge the gap between functional evaluators and abstract machines for the λ-calculus, using closure conversion, transformation into continuation-passing style, and defunctionalization. We illustrate this approach by deriving Krivine’s abstract machine from an ordinary call-by-name evaluator and ..."
Abstract - Cited by 52 (27 self) - Add to MetaCart
We bridge the gap between functional evaluators and abstract machines for the λ-calculus, using closure conversion, transformation into continuation-passing style, and defunctionalization. We illustrate this approach by deriving Krivine’s abstract machine from an ordinary call-by-name evaluator and by deriving an ordinary call-by-value evaluator from Felleisen et al.’s CEK machine. The first derivation is strikingly simpler than what can be found in the literature. The second one is new. Together, they show that Krivine’s abstract machine and the CEK machine correspond to the call-by-name and call-by-value facets of an ordinary evaluator for the λ-calculus. We then reveal the denotational content of Hannan and Miller’s CLS machine and of Landin’s SECD machine. We formally compare the corresponding evaluators and we illustrate some degrees of freedom in the design spaces of evaluators and of abstract machines for the λ-calculus with computational effects. Finally, we consider the Categorical Abstract Machine and the extent to which it is more of a virtual machine than an abstract machine.

A functional correspondence between monadic evaluators and abstract machines for languages with computational effects

by Mads Sig Ager, Olivier Danvy, Jan Midtgaard - Theoretical Computer Science , 2005
"... Abstract. We extend our correspondence between evaluators and abstract machines from the pure setting of the λ-calculus to the impure setting of the computational λ-calculus. We show how to derive new abstract machines from monadic evaluators for the computational λ-calculus. Starting from (1) a gen ..."
Abstract - Cited by 34 (19 self) - Add to MetaCart
Abstract. We extend our correspondence between evaluators and abstract machines from the pure setting of the λ-calculus to the impure setting of the computational λ-calculus. We show how to derive new abstract machines from monadic evaluators for the computational λ-calculus. Starting from (1) a generic evaluator parameterized by a monad and (2) a monad specifying a computational effect, we inline the components of the monad in the generic evaluator to obtain an evaluator written in a style that is specific to this computational effect. We then derive the corresponding abstract machine by closure-converting, CPS-transforming, and defunctionalizing this specific evaluator. We illustrate the construction with the identity monad, obtaining yet again the CEK machine, and with a lifted state monad, obtaining a variant of the CEK machine with error and state. In addition, we characterize the tail-recursive stack inspection presented by Clements and Felleisen at ESOP 2003 as a lifted state monad. This enables us to combine the stackinspection monad with other monads and to construct abstract machines for languages with properly tail-recursive stack inspection and other computational effects. The construction scales to other monads—including one more properly dedicated to stack inspection than the lifted state monad—and other monadic evaluators. Keywords. Lambda-calculus, interpreters, abstract machines, closure conversion, transformation into continuation-passing style (CPS), defunctionalization, monads, effects, proper

A rational deconstruction of Landin’s SECD machine

by Olivier Danvy, Kevin Millikin - Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science , 2004
"... Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corre ..."
Abstract - Cited by 23 (16 self) - Add to MetaCart
Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformation into continuation-passing style (CPS) and defunctionalization, chiefly) and their left inverses (transformation into direct style and refunctionalization). To this end, we modernize the SECD machine into a bisimilar one that operates in lockstep with the original one but that (1) does not use a data stack and (2) uses the caller-save rather than the callee-save convention for environments. We also identify that the dump component of the SECD machine is managed in a callee-save way. The caller-save counterpart of the modernized SECD machine precisely corresponds to Thielecke’s doublebarrelled continuations and to Felleisen’s encoding of J in terms of call/cc. We then variously characterize the J operator in terms of CPS and in terms of delimited-control operators in the CPS hierarchy. As a byproduct, we also present several reduction semantics for applicative expressions

On Evaluation Contexts, Continuations, and the Rest of Computation

by Olivier Danvy
"... Continuations are variously understood as representations of the current evaluation context and as representations of the rest of the computation, but these understandings contradict each other: plugging an expression in a context yields a new expression whereas sending an intermediate result to a c ..."
Abstract - Cited by 20 (13 self) - Add to MetaCart
Continuations are variously understood as representations of the current evaluation context and as representations of the rest of the computation, but these understandings contradict each other: plugging an expression in a context yields a new expression whereas sending an intermediate result to a continuation yields the final answer. We show that continuations-as-evaluation-contexts are the defunctionalized representation of the continuation of a singlestep reduction function and that continuations-as-the-rest-of-thecomputation are the continuation of an evaluation function. Furthermore, we show that defunctionalizing the continuation of an evaluator gives rise to the same evaluation contexts as in the singlestep reducer. The only difference is how these evaluation contexts are interpreted: a `plug' interpretation yields one-step reduction, whereas a `refocus' interpretation yields evaluation.

From Interpreter to Logic Engine by Defunctionalization

by Dariusz Biernacki, Olivier Danvy , 2004
"... Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the la ..."
Abstract - Cited by 19 (12 self) - Add to MetaCart
Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.

An operational foundation for delimited continuations in the CPS hierarchy

by Dariusz Biernacki, Olivier Danvy - Department of Computer Science, University of Aarhus , 2005
"... Vol. 1 (2:5) 2005, pp. 1–39 ..."
Abstract - Cited by 17 (15 self) - Add to MetaCart
Vol. 1 (2:5) 2005, pp. 1–39

A Syntactic Correspondence between Context-Sensitive Calculi and Abstract Machines

by Małgorzata Biernacka, Olivier Danvy , 2005
"... ..."
Abstract - Cited by 17 (12 self) - Add to MetaCart
Abstract not found

An Operational Foundation for Delimited Continuations

by Malgorzata Biernacka, Dariusz Biernacki, Olivier Danvy , 2003
"... ..."
Abstract - Cited by 13 (3 self) - Add to MetaCart
Abstract not found

A concrete framework for environment machines

by Małgorzata Biernacka, Olivier Danvy , 2005
"... ..."
Abstract - Cited by 12 (8 self) - Add to MetaCart
Abstract not found

From Reduction-Based to Reduction-Free Normalization

by Olivier Danvy , 2004
"... We present a systematic construction of a reduction-free normalization function. Starting from ..."
Abstract - Cited by 10 (7 self) - Add to MetaCart
We present a systematic construction of a reduction-free normalization function. Starting from
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University