Results 1  10
of
14
Delimited Dynamic Binding
, 2006
"... Dynamic binding and delimited control are useful together in many settings, including Web applications, database cursors, and mobile code. We examine this pair of language features to show that the semantics of their interaction is illdefined yet not expressive enough for these uses. We solve this ..."
Abstract

Cited by 34 (14 self)
 Add to MetaCart
Dynamic binding and delimited control are useful together in many settings, including Web applications, database cursors, and mobile code. We examine this pair of language features to show that the semantics of their interaction is illdefined yet not expressive enough for these uses. We solve this open and subtle problem. We formalise a typed language DB+DC that combines a calculus DB of dynamic binding and a calculus DC of delimited control. We argue from theoretical and practical points of view that its semantics should be based on delimited dynamic binding: capturing a delimited continuation closes over part of the dynamic environment, rather than all or none of it; reinstating the captured continuation supplements the dynamic environment, rather than replacing or inheriting it. We introduce a type and reductionpreserving translation from DB + DC to DC, which proves that delimited control macroexpresses dynamic binding. We use this translation to implement DB + DC in Scheme, OCaml, and Haskell. We extend DB + DC with mutable dynamic variables and a facility to obtain not only the latest binding of a dynamic variable but also older bindings. This facility provides for stack inspection and (more generally) folding over the execution context as an inductive data structure.
A Sound and Complete Axiomatization of Delimited Continuations
 In Proc. of 8th ACM SIGPLAN Int. Conf. on Functional Programming, ICFP’03
, 2003
"... The shift and reset operators, proposed by Danvy and Filinski, are powerful control primitives for capturing delimited continuations. Delimited continuation is a similar concept as the standard (unlimited) continuation, but it represents part of the rest of the computation, rather than the whole res ..."
Abstract

Cited by 25 (8 self)
 Add to MetaCart
The shift and reset operators, proposed by Danvy and Filinski, are powerful control primitives for capturing delimited continuations. Delimited continuation is a similar concept as the standard (unlimited) continuation, but it represents part of the rest of the computation, rather than the whole rest of computation. In the literature, the semantics of shift and reset has been given by a CPStranslation only. This paper gives a direct axiomatization of calculus with shift and reset, namely, we introduce a set of equations, and prove that it is sound and complete with respect to the CPStranslation. We also introduce a calculus with control operators which is as expressive as the calculus with shift and reset, has a sound and complete axiomatization, and is conservative over Sabry and Felleisen's theory for firstclass continuations.
Relational parametricity and control
 Logical Methods in Computer Science
"... www.lmcsonline.org ..."
(Show Context)
Using a Continuation Twice and Its Implications for the Expressive Power of Call/cc
, 1998
"... . We study the implications for the expressive power of call/cc of upward continuations, specifically the idiom of using a continuation twice. Although such control effects were known to Landin and Reynolds when they invented J and escape, the forebears of call/cc, they still act as a conceptual pit ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
. We study the implications for the expressive power of call/cc of upward continuations, specifically the idiom of using a continuation twice. Although such control effects were known to Landin and Reynolds when they invented J and escape, the forebears of call/cc, they still act as a conceptual pitfall for some attempts to reason about continuations. We use this idiom to refute some recent conjectures about equivalences in a language with continuations, but no other effects. This shows that firstclass continuations as given by call/cc have greater expressive power than one would expect from goto or exits. Keywords: call/cc, continuations, upward continuations, expressiveness, program equivalence. 1. Introduction You can enter a room once, and yet leave it twice. (Peter Landin) A common informal explanation of continuations is the comparison with forward goto. This is in some sense a very apt simile: forward gotos obviously do not give rise to loops, and continuations, without some ...
Intuitionistic Letcc via Labelled Deduction
, 2006
"... Intuitionistic logic can be presented as a calculus of labelled deduction on multipleconclusion sequents. The corresponding natural deduction system constitutes a type system for programs using letcc, which capture the current program continuation, restricted to enforce constructive validity. This ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
Intuitionistic logic can be presented as a calculus of labelled deduction on multipleconclusion sequents. The corresponding natural deduction system constitutes a type system for programs using letcc, which capture the current program continuation, restricted to enforce constructive validity. This allows us to develop a rich dependent type theory incorporating letcc, which is known to be highly problematic for computational interpretations of classical logic. Moreover
Axioms for Control Operators in the CPS Hierarchy ∗
"... Abstract. A CPS translation is a syntactic translation of programs, which is useful for describing their operational behavior. By iterating the standard callbyvalue CPS translation, Danvy and Filinski discovered the CPS hierarchy and proposed a family of control operators, shift and reset, that mak ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. A CPS translation is a syntactic translation of programs, which is useful for describing their operational behavior. By iterating the standard callbyvalue CPS translation, Danvy and Filinski discovered the CPS hierarchy and proposed a family of control operators, shift and reset, that make it possible to capture successive delimited continuations in a CPS hierarchy. Although shift and reset have found their applications in several areas such as partial evaluation, most studies in the literature have been devoted to the base level of the hierarchy, namely, to level1 shift and reset. In this article, we investigate the whole family of shift and reset. We give a simple calculus with leveln shift and leveln reset for an arbitrary n> 0. We then give a set of equational axioms for them, and prove that these axioms are sound and complete with respect to the CPS translation. The resulting set of axioms is concise and a natural extension of those for level1 shift and reset.
THEORETICAL PEARLS  CPS in Little Pieces: Composing Partial Continuations
, 1993
"... This paper presents a new twostage CPS algorithm. The first stage plants trivial partial continuations via a recursivedescent traversal and the second stage is a rewrite system that transforms all nontail calls into tail calls. The algorithm combines the metaphors of the Plotkinstyle CPS transfor ..."
Abstract
 Add to MetaCart
This paper presents a new twostage CPS algorithm. The first stage plants trivial partial continuations via a recursivedescent traversal and the second stage is a rewrite system that transforms all nontail calls into tail calls. The algorithm combines the metaphors of the Plotkinstyle CPS transformation along with reduction in the calculus.
Axiomatizing Subtyped Delimited Continuations
"... We present direct equational axiomatizations of the callbyvalue lambda calculus with the control operators shift0 and reset0 that generalize Danvy and Filinski’s shift and reset in that they allow for abstracting control beyond the topmost delimited continuation. We address an untyped version of ..."
Abstract
 Add to MetaCart
We present direct equational axiomatizations of the callbyvalue lambda calculus with the control operators shift0 and reset0 that generalize Danvy and Filinski’s shift and reset in that they allow for abstracting control beyond the topmost delimited continuation. We address an untyped version of the calculus as well as a typed version with effect subtyping. For each of the calculi we present a set of axioms that we prove sound and complete with respect to the corresponding CPS translation.
CPS in Little Pieces: Composing Partial Continuations
"... This paper presents a new twostage CPS algorithm. The first stage plants trivial partial continuations via a recursivedescent traversal and the second stage is a rewrite system that terminates when all calls are tail calls. The algorithm combines the metaphors of the Plotkinstyle CPS transformati ..."
Abstract
 Add to MetaCart
This paper presents a new twostage CPS algorithm. The first stage plants trivial partial continuations via a recursivedescent traversal and the second stage is a rewrite system that terminates when all calls are tail calls. The algorithm combines the metaphors of the Plotkinstyle CPS transformation along with reduction in the calculus. 1
unknown title
"... We study the equational theory of Parigot’s secondorder λµcalculus in connection with a callbyname continuationpassing style (CPS) translation into a fragment of the secondorder λcalculus. It is observed that the relational parametricity on the target calculus induces a natural notion of equiv ..."
Abstract
 Add to MetaCart
(Show Context)
We study the equational theory of Parigot’s secondorder λµcalculus in connection with a callbyname continuationpassing style (CPS) translation into a fragment of the secondorder λcalculus. It is observed that the relational parametricity on the target calculus induces a natural notion of equivalence on the λµterms. On the other hand, the unconstrained relational parametricity on the λµcalculus turns out to be inconsistent with this CPS semantics. Following these facts, we propose to formulate the relational parametricity on the λµcalculus in a constrained way, which might be called “focal parametricity”. 1.