Results 1 -
9 of
9
A Generic Account of Continuation-Passing Styles
- Proceedings of the Twenty-first Annual ACM Symposium on Principles of Programming Languages
, 1994
"... We unify previous work on the continuation-passing style (CPS) transformations in a generic framework based on Moggi's computational meta-language. This framework is used to obtain CPS transformations for a variety of evaluation strategies and to characterize the corresponding administrative reducti ..."
Abstract
-
Cited by 79 (33 self)
- Add to MetaCart
We unify previous work on the continuation-passing style (CPS) transformations in a generic framework based on Moggi's computational meta-language. This framework is used to obtain CPS transformations for a variety of evaluation strategies and to characterize the corresponding administrative reductions and inverse transformations. We establish generic formal connections between operational semantics and equational theories. Formal properties of transformations for specific evaluation orders follow as corollaries. Essentially, we factor transformations through Moggi's computational meta-language. Mapping -terms into the meta-language captures computational properties (e.g., partiality, strictness) and evaluation order explicitly in both the term and the type structure of the meta-language. The CPS transformation is then obtained by applying a generic transformation from terms and types in the meta-language to CPS terms and types, based on a typed term representation of the continuation ...
A Functional Correspondence between Call-by-Need Evaluators and Lazy Abstract Machines
, 2004
"... ..."
A rational deconstruction of Landin’s SECD machine
- 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
Assessing the Overhead of ML Exceptions by Selective CPS . . .
- In Proceedings of the 1998 ACM SIGPLAN Workshop on ML
, 1998
"... ML's exception handling makes it possible to describe exceptional execution ows conveniently, but it also forms a performance bottleneck. ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
ML's exception handling makes it possible to describe exceptional execution ows conveniently, but it also forms a performance bottleneck.
Monadic Type Systems: Pure Type Systems for Impure Settings (Preliminary Report)
- In Proceedings of the Second HOOTS Workshop
, 1997
"... Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameteriz ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higher-order type structure of pure type systems and the monadic term and type structure used to capture computational effects in the theory of computational monads. We demonstrate that monadic type systems nicely characterize previous work and suggest how they can support several new theoretical and practical applications. A technical foundation for monadic type systems is laid by recasting and scaling up the main results from pure type systems (confluence, subject reduction, strong normalisation for particular classes of systems, etc.) and from operational presentations of computational monads (notions of operational equivalence based on applicative similarity, co-induction proof techni...
On Typing Delimited Continuations: Three New Solutions to the Printf Problem
- Higher-Order and Symbolic Computation
, 2009
"... In “Functional Unparsing ” (JFP 8(6): 621–625, 1998), Danvy presented a type-safe printf function using continuations and an accumulator to achieve the effect of dependent types. The key technique employed in Danvy’s solution is the non-standard use of continuations: not all of its calls are tail ca ..."
Abstract
-
Cited by 6 (3 self)
- Add to MetaCart
In “Functional Unparsing ” (JFP 8(6): 621–625, 1998), Danvy presented a type-safe printf function using continuations and an accumulator to achieve the effect of dependent types. The key technique employed in Danvy’s solution is the non-standard use of continuations: not all of its calls are tail calls, i.e., it uses delimited continuations. Against this backdrop, we present three new solutions to the printf problem: a simpler one that also uses delimited continuations but that does not use an accumulator, and the corresponding two in direct style with the delimited-control operators, shift and reset. These two solutions are the direct-style counterparts of the two continuation-based ones. The last solution pinpoints the essence of Danvy’s solution: shift is used to change the answer type of delimited continuations. Besides providing a new application of shift and reset, the solutions in direct style raise a key issue in the typing of first-class delimited continuations and require Danvy and Filinski’s original type system. The resulting types precisely account for the behavior of printf. This is the extended version of the previous technical report OCHA-IS 07-1. It contains an introduction to continuation-passing style and delimited-control operators, shift and reset.
Pragmatic Aspects of Type-Directed Partial Evaluation
, 1996
"... Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schw ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schwichtenberg's normalization algorithm for the simply typed -calculus. Type-directed partial evaluation thus can be used to specialize a compiled, closed program, given its type.
On the Idempotence of the CPS Transformation
- THE JOURNAL OF FUNCTIONAL PROGRAMMING.REVISED VERSION OF BRICS
, 1996
"... The CPS (continuation-passing style) transformation on -terms has an interpretation both in programming languages, type theory, proof theory, and logic. Programming intuition suggests that it is idempotent, but this does not directly hold for all existing CPS transformations (Plotkin, Reynolds, Fisc ..."
Abstract
- Add to MetaCart
The CPS (continuation-passing style) transformation on -terms has an interpretation both in programming languages, type theory, proof theory, and logic. Programming intuition suggests that it is idempotent, but this does not directly hold for all existing CPS transformations (Plotkin, Reynolds, Fischer, etc.). We rephrase it to make it syntactically idempotent, modulo j-reduction of the newly introduced continuation.

