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.
From reductionbased to reductionfree normalization
 Proceedings of the Fourth International Workshop on Reduction Strategies in Rewriting and Programming (WRS'04
, 2004
"... We document an operational method to construct reductionfree normalization functions. Starting from a reductionbased normalization function from a reduction semantics, i.e., the iteration of a onestep reduction function, we successively subject it to refocusing (i.e., deforestation of the inte ..."
Abstract

Cited by 29 (13 self)
 Add to MetaCart
(Show Context)
We document an operational method to construct reductionfree normalization functions. Starting from a reductionbased normalization function from a reduction semantics, i.e., the iteration of a onestep reduction function, we successively subject it to refocusing (i.e., deforestation of the intermediate successive terms in the reduction sequence), equational simplication, refunctionalization (i.e., the converse of defunctionalization), and directstyle transformation (i.e., the converse of the CPS transformation), ending with a reductionfree normalization function of the kind usually crafted by hand. We treat in detail four simple examples: calculating arithmetic expressions, recognizing Dyck words, normalizing lambdaterms with explicit substitutions and call/cc, and attening binary trees. The overall method builds on previous work by the author and his students on a syntactic correspondence between reduction semantics and abstract machines and on a functional correspondence between evaluators and abstract machines. The measure of success of these two correspondences is that each of the interderived semantic artifacts (i.e., manmade constructs) could plausibly have been written by hand, as is the actual case for several ones derived here.
Shift to control
 In ACM SIGPLAN Scheme Workshop, Snowbird
, 2004
"... Delimited control operators abound, but their relationships are illunderstood, and it remains unclear which (if any) to consider canonical. Although all delimited control operators ever proposed can be implemented using undelimited continuations and mutable state, Gasbichler and Sperber [28] showe ..."
Abstract

Cited by 25 (3 self)
 Add to MetaCart
(Show Context)
Delimited control operators abound, but their relationships are illunderstood, and it remains unclear which (if any) to consider canonical. Although all delimited control operators ever proposed can be implemented using undelimited continuations and mutable state, Gasbichler and Sperber [28] showed that an implementation that does not rely on undelimited continuations can be much more efficient. Unfortunately, they only implemented Felleisen’s control
An operational foundation for delimited continuations in the CPS hierarchy
 Logical Methods in Computer Science
, 2005
"... Vol. 1 (2:5) 2005, pp. 1–39 www.lmcsonline.org ..."
(Show Context)
GraphBased Proof Counting and Enumeration with Applications for Program Fragment Synthesis
 in &quot;International Symposium on Logicbased Program Synthesis and Transformation 2004 (LOPSTR 2004)&quot;, S. ETALLE (editor)., Lecture Notes in Computer Science
, 2004
"... Abstract. For use in earlier approaches to automated module interface adaptation, we seek a restricted form of program synthesis. Given some typing assumptions and a desired result type, we wish to automatically build a number of program fragments of this chosen typing, using functions and values av ..."
Abstract

Cited by 9 (0 self)
 Add to MetaCart
Abstract. For use in earlier approaches to automated module interface adaptation, we seek a restricted form of program synthesis. Given some typing assumptions and a desired result type, we wish to automatically build a number of program fragments of this chosen typing, using functions and values available in the given typing environment. We call this problem term enumeration. To solve the problem, we use the CurryHoward correspondence (propositionsastypes, proofsasprograms) to transform it into a proof enumeration problem for an intuitionistic logic calculus. We formally study proof enumeration and counting in this calculus. We prove that proof counting is solvable and give an algorithm to solve it. This in turn yields a proof enumeration algorithm. 1
A static simulation of dynamic delimited control
 HIGHERORDER AND SYMBOLIC COMPUTATION
"... We present a continuationpassingstyle (CPS) transformation for some dynamic delimitedcontrol operators, including Felleisen’s control and prompt, that extends a standard callbyvalue CPS transformation. Based on this new transformation, we show how Danvy and Filinski’s static delimitedcontrol ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
We present a continuationpassingstyle (CPS) transformation for some dynamic delimitedcontrol operators, including Felleisen’s control and prompt, that extends a standard callbyvalue CPS transformation. Based on this new transformation, we show how Danvy and Filinski’s static delimitedcontrol operators shift and reset simulate dynamic operators, allaying in passing some skepticism in the literature about the existence of such a simulation. The new CPS transformation and simulation use recursive delimited continuations to avoid undelimited control and the overhead it incurs in implementation and reasoning.
A Substructural Type System for Delimited Continuations
"... We propose type systems that abstractly interpret smallstep rather than bigstep operational semantics. We treat an expression or evaluation context as a structure in a linear logic with hypothetical reasoning. Evaluation order is not only regulated by familiar focusing rules in the operational sem ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
(Show Context)
We propose type systems that abstractly interpret smallstep rather than bigstep operational semantics. We treat an expression or evaluation context as a structure in a linear logic with hypothetical reasoning. Evaluation order is not only regulated by familiar focusing rules in the operational semantics, but also expressed by structural rules in the type system, so the types track control flow more closely. Binding and evaluation contexts are related, but the latter are linear. We use these ideas to build a type system for delimited continuations. It lets control operators change the answer type or act beyond the nearest dynamicallyenclosing delimiter, yet needs no extra fields in judgments and arrow types to record answer types. The typing derivation of a directstyle program desugars it into continuationpassing style.
Exceptional NbE for Sums
"... We devise an algorithm using normalization by evaluation (NbE) for deciding equality between terms in a λcalculus equipped with strong sums. While proofs of correctness and completeness are still work in progress, the originality of this algorithm is its use of exceptions, which yields a particular ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
We devise an algorithm using normalization by evaluation (NbE) for deciding equality between terms in a λcalculus equipped with strong sums. While proofs of correctness and completeness are still work in progress, the originality of this algorithm is its use of exceptions, which yields a particularly simple solution to this intricate problem. 1.
Abstract Oleg Kiselyov
"... 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
 Add to MetaCart
(Show Context)
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.