Results 1 
9 of
9
Handlers in Action
"... We lay operational foundations for effect handlers. Introduced by Plotkin and Pretnar, effect handlers are a novel programming construct that generalises exception handlers, handling a range of computational effects, such as I/O, state, and nondeterminism. We propose a smallstep structural operatio ..."
Abstract

Cited by 15 (1 self)
 Add to MetaCart
(Show Context)
We lay operational foundations for effect handlers. Introduced by Plotkin and Pretnar, effect handlers are a novel programming construct that generalises exception handlers, handling a range of computational effects, such as I/O, state, and nondeterminism. We propose a smallstep structural operational semantics for a higherorder calculus of effect handlers, along with a sound type and effect system. We explore two alternative effect handler implementation techniques: free monads, and delimited continuations. Finally, we show that Filinski’s monadic reflection can be straightforwardly simulated by effect handlers. 1.
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
Everything Old Is New Again: Quoted DomainSpecific Languages
"... We describe a new approach to implementing DomainSpecific Languages (DSLs), called Quoted DSLs (QDSLs), that is inspired by two old ideas: quasiquotation, from McCarthy’s Lisp of 1960, and the subformula principle of normal proofs, from Gentzen’s natural deduction of 1935. QDSLs reuse facilities p ..."
Abstract
 Add to MetaCart
(Show Context)
We describe a new approach to implementing DomainSpecific Languages (DSLs), called Quoted DSLs (QDSLs), that is inspired by two old ideas: quasiquotation, from McCarthy’s Lisp of 1960, and the subformula principle of normal proofs, from Gentzen’s natural deduction of 1935. QDSLs reuse facilities provided for the host language, since host and quoted terms share the same syntax, type system, and normalisation rules. QDSL terms are normalised to a canonical form, inspired by the subformula principle, which guarantees that one can use higherorder types in the source while guaranteeing firstorder types in the target, and enables using types to guide fusion. We test our ideas by reimplementing Feldspar, which was originally implemented as an Embedded DSL (EDSL), as a QDSL; and we compare the QDSL and EDSL variants. The two variants produce identical code.
Multifocusing on extensional rewriting with sums
"... Abstract—We propose a logical justification for the rewritingbased equivalence procedure for simplytyped lambdaterms with sums of Lindley [Lin07]. It relies on maximally multifocused proofs, a notion of canonical derivations introduced for linear logic. Lindley’s rewriting closely corresponds to ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract—We propose a logical justification for the rewritingbased equivalence procedure for simplytyped lambdaterms with sums of Lindley [Lin07]. It relies on maximally multifocused proofs, a notion of canonical derivations introduced for linear logic. Lindley’s rewriting closely corresponds to preemptive rewriting [CMS08], a technical device used in the metatheory of maximal multifocus. This is the expanded version of an article of the same name that has been submitted for review. I.
Shredding higherorder nested queries
"... We present a modular account of query shredding, the simulation of a single nested relational query by a number of flat relational queries, applicable to both set and multiset semantics. Our key insight is that shredding can be greatly simplified by first rewriting the input query into a canonical n ..."
Abstract
 Add to MetaCart
We present a modular account of query shredding, the simulation of a single nested relational query by a number of flat relational queries, applicable to both set and multiset semantics. Our key insight is that shredding can be greatly simplified by first rewriting the input query into a canonical normal form. Normalisation allows us to define shredding translations on types and terms independently of one another, unlike previous work. An added benefit of normalisation is that we support higherorder terms for free, provided that the result type is a plain nested relation type (without higher order components). In order to generate SQL we consider several alternatives for generating indexes, focusing on a lightweight use of SQL OLAP features. We prove correctness of our translations, focusing on the central shredding step: shredding a nested query, running the shredded queries, and stitching the results back together yields the same results as running the nested query directly. 1.
Edinburgh Research Explorer
"... Query shredding: Efficient relational evaluation of queries over nested multisets Citation for published version: ..."
Abstract
 Add to MetaCart
Query shredding: Efficient relational evaluation of queries over nested multisets Citation for published version:
Which simple types have a unique inhabitant?
"... We study the question of whether a given type has a unique inhabitant modulo program equivalence. In the setting of simplytyped lambdacalculus with sums, equipped with the strong βηequivalence, we show that uniqueness is decidable. We present a saturating focused logic that introduces irreducibl ..."
Abstract
 Add to MetaCart
(Show Context)
We study the question of whether a given type has a unique inhabitant modulo program equivalence. In the setting of simplytyped lambdacalculus with sums, equipped with the strong βηequivalence, we show that uniqueness is decidable. We present a saturating focused logic that introduces irreducible cuts on positive types “as soon as possible”. Backward search in this logic gives an effective algorithm that returns either zero, one or two distinct inhabitants for any given type. Preliminary application studies show that such a feature can be useful in stronglytyped programs, inferring the code of highlypolymorphic library functions, or “glue code ” inside more complex terms. Categories and Subject Descriptors F.3.3 [Studies of Program Constructs]: Type structure