Results 1 
9 of
9
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 31 (11 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
, 2004
"... We present a systematic construction of a reductionfree normalization function. Starting from ..."
Abstract

Cited by 21 (8 self)
 Add to MetaCart
We present a systematic construction of a reductionfree normalization function. Starting from
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 ..."
GraphBased Proof Counting and Enumeration with Applications for Program Fragment Synthesis
 in "International Symposium on Logicbased Program Synthesis and Transformation 2004 (LOPSTR 2004)", 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 5 (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 Substructural Type System for Delimited Continuations ⋆
"... Abstract. 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 opera ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Abstract. 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. 1
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 1 (0 self)
 Add to MetaCart
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.
Keeping sums under control
, 2004
"... In a recent paper [31], I presented with Marcelo Fiore and Roberto Di Cosmo a new normalisation tool for the λcalculus with sum types, based on the technique of normalisation by evaluation, and more precisely on techniques developped by Olivier Danvy for partial evaluation, using control operators. ..."
Abstract
 Add to MetaCart
In a recent paper [31], I presented with Marcelo Fiore and Roberto Di Cosmo a new normalisation tool for the λcalculus with sum types, based on the technique of normalisation by evaluation, and more precisely on techniques developped by Olivier Danvy for partial evaluation, using control operators. The main characteristic of this tool is that it produces a result in a canonical form we introduced. That is to say: two βηequivalent terms will be normalised into (almost) identical terms. It was not the case with the traditional algorithm, which could even lead to an explosion of the size of code. This canonical form is an ηlong βnormal form with constraints, which capture the definition of ηlong normal form for the λcalculus without sums, and reduces drastically the ηconversion possibilities for sums. The present paper recall the definition of these normal forms and the normalisation algorithm, and shows how it is possible to use these tools to solve a problem of characterization of type isomorphisms. Indeed, the canonical form allowed to find the complicated counterexamples we exhibited in another work [6], that proves that type isomorphisms in the λcalculus with sums are not finitely axiomatisable. What’s more, when proving that these terms are isomorphisms, the new partial evaluation algorithm avoids an explosion of the size of the term that arises with the old one.
Computational Effects across Generated Binders Maintaining futurestage lexical scope
"... Code generation is the leading approach to making highperformance software reusable. Effects are indispensable in code generators, whether to report failures or to insert letstatements and ifguards. Extensive painful experience shows that unrestricted effects interact with generated binders in und ..."
Abstract
 Add to MetaCart
Code generation is the leading approach to making highperformance software reusable. Effects are indispensable in code generators, whether to report failures or to insert letstatements and ifguards. Extensive painful experience shows that unrestricted effects interact with generated binders in undesirable ways to produce unexpectedly unbound variables, or worse, unexpectedly bound ones. These subtleties prevent experts in the application domain, not in programming languages, from using and extending the generator. A pressing problem is thus to express the desired effects while regulating them so that the generated code is correct, or at least correctly scoped, by construction. In an imminently practical codegeneration framework, we show how to express arbitrary effects, including mutable references and delimited control, that move open code across generated binders. The static types of our generator expressions not only ensure that a welltyped generator produces welltyped and wellscoped code, but also express the lexical scopes of generated binders and prevent mixing up variables with different scopes. This precise notion of lexical scope subsumes the complaints about intuitively wrong example generators in the literature. For the first time, we demonstrate statically safe letinsertion across an arbitrary number of binders. Our framework is implemented as a Haskell library that embeds an extensible typed higherorder domainspecific language. It may be regarded as ‘staged Haskell. ’ The library is convenient to use thanks to the maturity of Haskell, higherorder abstract syntax, and polymorphism over generated type environments.