Results 1 -
3 of
3
Reasoning about Programs in Continuation-Passing Style
- Lisp and Symbolic Computation
"... Plotkin's v -calculus for call-by-value programs is weaker than the fij- calculus for the same programs in continuation-passing style (CPS). To identify the callby -value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interes ..."
Abstract
-
Cited by 150 (11 self)
- Add to MetaCart
Plotkin's v -calculus for call-by-value programs is weaker than the fij- calculus for the same programs in continuation-passing style (CPS). To identify the callby -value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interesting in their own right. Using the new CPS transformation, we determine the precise language of CPS terms closed under fij-transformations, as well as the call-by-value axioms that correspond to the so-called administrative fij-reductions on CPS terms. Using the inverse mapping, we map the remaining fi and j equalities on CPS terms to axioms on call-by-value terms. On the pure (constant free) set of-terms, the resulting set of axioms is equivalent to Moggi's computational -calculus. If the call-by-value language includes the control operators abort and call-with-current-continuation, the axioms are equivalent to an extension of Felleisen et al.'s v-C-calculus and to the equational subtheory of Talcott's logic IOCC. Contents 1 Compiling with and without Continuations 4 2 : Calculi and Semantics 7 3 The Origins and Practice of CPS 10 3.1 The Original Encoding : : : : : : : : : : : : : : : : : : : : : 10 3.2 The Universe of CPS Terms : : : : : : : : : : : : : : : : : : 11 4 A Compacting CPS Transformation 13
The Formal Relationship Between Direct and Continuation-Passing Style Optimizing Compilers: A Synthesis of Two Paradigms
, 1994
"... Compilers for higher-order programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuation-passing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two co ..."
Abstract
-
Cited by 13 (0 self)
- Add to MetaCart
Compilers for higher-order programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuation-passing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two compilation strategies. Starting from
On Inter-deriving Small-step and Big-step Semantics: A Case Study for Storeless Call-by-need Evaluation
"... Starting from the standard call-by-need reduction for the λ-calculus that is common to Ariola, Felleisen, Maraist, Odersky, and Wadler, we inter-derive a series of hygienic semantic artifacts: a reduction-free storeless abstract machine, a continuation-passing evaluation function, and what appears t ..."
Abstract
- Add to MetaCart
Starting from the standard call-by-need reduction for the λ-calculus that is common to Ariola, Felleisen, Maraist, Odersky, and Wadler, we inter-derive a series of hygienic semantic artifacts: a reduction-free storeless abstract machine, a continuation-passing evaluation function, and what appears to be the first heapless natural semantics for callby-need evaluation. Furthermore we observe that the evaluation function implementing this natural semantics is in defunctionalized form. The refunctionalized counterpart of this evaluation function implements an extended direct semantics in the sense of Cartwright and Felleisen. Overall, the semantic artifacts presented here are simpler than many other such artifacts that have been independently worked out, and which require ingenuity, skill, and independent soundness proofs on a case-by-case basis. They are also simpler to interderive because the inter-derivational tools (e.g., refocusing and defunctionalization) already exist. List of Figures 1 Recomposition of outside-in contexts..................... 11 2 Recomposition of inside-out contexts..................... 11 3 Decomposition of an answer term into itself and of a non-answer term into a potential redex and its evaluation context 12 4 Reduction-based refocusing.......................... 17 5 Reduction-free refocusing........................... 17 6 Storeless abstract machine for call-by-need evaluation........... 18 7 The storeless abstract machine of Figure 6 after transition compression.. 20 8 Heapless natural semantics for call-by-need evaluation........... 23

