Results 1 - 10
of
25
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 Discoveries of Continuations
, 1993
"... We give a brief account of the discoveries of continuations and related concepts by, A. Van Wijngaarden , A. W. Mazurkiewicz , F. L. Morris , C. P. Wadsworth , J. H. Morris , M. J. Fischer , and S. K. Abdali. ..."
Abstract
-
Cited by 101 (2 self)
- Add to MetaCart
We give a brief account of the discoveries of continuations and related concepts by, A. Van Wijngaarden , A. W. Mazurkiewicz , F. L. Morris , C. P. Wadsworth , J. H. Morris , M. J. Fischer , and S. K. Abdali.
Typing First-Class Continuations in ML
, 1992
"... An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuation-based operational semantics is defined for a small, purely functional, language, and the soun ..."
Abstract
-
Cited by 88 (14 self)
- Add to MetaCart
An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuation-based operational semantics is defined for a small, purely functional, language, and the soundness of the Damas-Milner polymorphic type assignment system with respect to this semantics is proved. The full Damas-Milner type system is shown to be unsound in the presence of first-class continuations. Restrictions on polymorphism similar to those introduced in connection with reference types are shown to suffice for soundness. 1 Introduction First-class continuations are a simple and natural way to provide access to the flow of evaluation in functional languages. The ability to seize the "current continuation" (control state of the evaluator) provides a simple and natural basis for defining numerous higher-level constructs such as coroutines [22], exceptions [41], and logic variables [...
Back to Direct Style II: First-Class Continuations
- IN PROCEEDINGS OF THE 1992 ACM CONFERENCE ON LISP AND FUNCTIONAL PROGRAMMING
, 1996
"... The direct-style transformation aims at mapping continuationpassing programs back to direct style, be they originally written in continuation-passing style or the result of the continuation-passingstyle transformation. In this paper, we continue to investigate the direct-style transformation by ..."
Abstract
-
Cited by 48 (15 self)
- Add to MetaCart
The direct-style transformation aims at mapping continuationpassing programs back to direct style, be they originally written in continuation-passing style or the result of the continuation-passingstyle transformation. In this paper, we continue to investigate the direct-style transformation by extending it to programs with first-class continuations. First-class
Polymorphic type assignment and CPS conversion
- LISP and Symbolic Computation
, 1993
"... Meyer and Wand established that the type of a term in the simply typed-calculus may be related in a straightforward manner to the type of its call-by-value CPS transform. This typing property maybe extended to Scheme-like continuation-passing primitives, from which the soundness of these extensions ..."
Abstract
-
Cited by 33 (10 self)
- Add to MetaCart
Meyer and Wand established that the type of a term in the simply typed-calculus may be related in a straightforward manner to the type of its call-by-value CPS transform. This typing property maybe extended to Scheme-like continuation-passing primitives, from which the soundness of these extensions follows. We study the extension of these results to the Damas-Milner polymorphic type assignment system under both the call-by-value and call-by-name interpretations. We obtain CPS transforms for the call-by-value interpretation, provided that the polymorphic let is restricted to values, and for the call-by-name interpretation with no restrictions. We prove that there is no call-by-value CPS transform for the full Damas-Milner language that validates the Meyer-Wand typing property and is equivalent to the standard call-by-value transform up to-conversion. 1
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
Definitional interpreters revisited
- Higher-Order and Symbolic Computation
, 1998
"... Abstract. To introduce the republication of “Definitional Interpreters for Higher-Order Programming Languages”, the author recounts the circumstances of its creation, clarifies several obscurities, corrects a few mistakes, and briefly summarizes some more recent developments. ..."
Abstract
-
Cited by 20 (0 self)
- Add to MetaCart
Abstract. To introduce the republication of “Definitional Interpreters for Higher-Order Programming Languages”, the author recounts the circumstances of its creation, clarifies several obscurities, corrects a few mistakes, and briefly summarizes some more recent developments.
Embedding Type Structure in Semantics
, 1985
"... We show how a programming language designer may embed the type structure of of a programming language in the more robust type structure of the typed lambda calculus. This is done by translating programs of the language into terms of the typed lambda calculus. Our translation, however, does not alway ..."
Abstract
-
Cited by 13 (1 self)
- Add to MetaCart
We show how a programming language designer may embed the type structure of of a programming language in the more robust type structure of the typed lambda calculus. This is done by translating programs of the language into terms of the typed lambda calculus. Our translation, however, does not always yield a well-typed lambda term. Programs whose translations are not well-typed are considered meaningless, that is, ill-typed. We give a conditionally type-correct semantics for a simple language with continuation semantics. We provide a set of static type-checking rules for our source language, and prove that they are sound and complete: that is, a program passes the typing rules if and only if its translation is well-typed. This proves the correctness of our static semantics relative to the well-established typing rules of the typed lambda-calculus. 1. Introduction Denotational semantics has proved to be a powerful language for expressing the language designer's decisions about the beh...

