Results 11  20
of
37
Delimited Control in OCaml, Abstractly and Concretely System Description
"... Abstract. We describe the first implementation of multiprompt delimited control operators in OCaml that is direct in that it captures only the needed part of the control stack. The implementation is a library that requires no changes to the OCaml compiler or runtime, so it is perfectly compatible ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
Abstract. We describe the first implementation of multiprompt delimited control operators in OCaml that is direct in that it captures only the needed part of the control stack. The implementation is a library that requires no changes to the OCaml compiler or runtime, so it is perfectly compatible with existing OCaml source code and bytecode. The library has been in fruitful practical use for four years. We present the library as an implementation of an abstract machine derived by elaborating the definitional machine. The abstract view lets us distill a minimalistic API, scAPI, sufficient for implementing multiprompt delimited control. We argue that a language system that supports exception and stackoverflow handling supports scAPI. Our library illustrates how to use scAPI to implement multiprompt delimited control in a typed language. The approach is general and can be used to add multiprompt delimited control to other existing language systems. 1
A modular typechecking algorithm for type theory with singleton types and proof irrelevance
 IN TLCA’09, VOLUME 5608 OF LNCS
, 2009
"... ..."
(Show Context)
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.
Typed Applicative Structures and Normalization by Evaluation for System F ω
"... Abstract. We present a normalizationbyevaluation (NbE) algorithm for System F ω with βηequality, the simplest impredicative type theory with computation on the type level. Values are kept abstract and requirements on values are kept to a minimum, allowing many different implementations of the alg ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
Abstract. We present a normalizationbyevaluation (NbE) algorithm for System F ω with βηequality, the simplest impredicative type theory with computation on the type level. Values are kept abstract and requirements on values are kept to a minimum, allowing many different implementations of the algorithm. The algorithm is verified through a general model construction using typed applicative structures, called type and object structures. Both soundness and completeness of NbE are conceived as an instance of a single fundamental theorem.
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 5 (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.
Accumulating bindings
"... We give a Haskell implementation of Filinski’s normalisation by evaluation algorithm for the computational lambdacalculus with sums. Taking advantage of extensions to the GHC compiler, our implementation represents object language types as Haskell types and ensures that type errors are detected sta ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
We give a Haskell implementation of Filinski’s normalisation by evaluation algorithm for the computational lambdacalculus with sums. Taking advantage of extensions to the GHC compiler, our implementation represents object language types as Haskell types and ensures that type errors are detected statically. Following Filinski, the implementation is parameterised over a residualising monad. The standard residualising monad for sums is a continuation monad. Defunctionalising the uses of the continuation monad we present the binding tree monad as an alternative. 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 2 (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.
On Normalization by Evaluation for Object Calculi
"... We present a procedure for computing normal forms of terms in Abadi and Cardelli’s functional object calculus. Even when equipped with simple types, terms of this calculus are not terminating in general, and we draw on recent ideas about the normalization by evaluation paradigm for the untyped lambd ..."
Abstract
 Add to MetaCart
We present a procedure for computing normal forms of terms in Abadi and Cardelli’s functional object calculus. Even when equipped with simple types, terms of this calculus are not terminating in general, and we draw on recent ideas about the normalization by evaluation paradigm for the untyped lambda calculus. Technically, we work in the framework of Shinwell and Pitts ’ FMdomain theory, which leads to a normalization procedure for the object calculus that is directly implementable in a language like Fresh O’Caml.
Type structures and normalization by evaluation for System F ω (full version). http://www.tcs.ifi.lmu.de/˜abel/fomegaNbe.pdf
"... ..."
(Show Context)
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 fijequivalent 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 jlong finormal form with constraints, which capture the definition of jlong normal form for the *calculus withoutsums, and reduces drastically the jconversion 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 termthat arises with the old one.