Results 11  20
of
42
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.
Algebraic foundations for effectdependent optimisations
 In POPL
, 2012
"... We present a general theory of Giffordstyle type and effect annotations, where effect annotations are sets of effects. Generality is achieved by recourse to the theory of algebraic effects, a development of Moggi’s monadic theory of computational effects that emphasises the operations causing the e ..."
Abstract

Cited by 14 (1 self)
 Add to MetaCart
(Show Context)
We present a general theory of Giffordstyle type and effect annotations, where effect annotations are sets of effects. Generality is achieved by recourse to the theory of algebraic effects, a development of Moggi’s monadic theory of computational effects that emphasises the operations causing the effects at hand and their equational theory. The key observation is that annotation effects can be identified with operation symbols. We develop an annotated version of Levy’s CallbyPushValue language with a kind of computations for every effect set; it can be thought of as a sequential, annotated intermediate language. We develop a range of validated optimisations (i.e., equivalences), generalising many existing ones and adding new ones. We classify these optimisations as structural, algebraic, or abstract: structural optimisations always hold; algebraic ones depend on the effect theory at hand; and abstract ones depend on the global nature of that theory (we give modularlycheckable sufficient conditions for their validity).
Monads and adjunctions for global exceptions
 In Math. Found. of Programming Semantics, number 158 in Elect. Notes in Theor. Comp. Sci
, 2006
"... ..."
Semantics for Algebraic Operations
 Proc. MFPS 17, Electronic Notes in Thoeret. Comp. Sci
, 2001
"... Given a complete and cocomplete symmetric monoidal closed category V and a symmetric monoidal V category C with cotensors and a strong V monad T on C, we investigate axioms under which an ObC indexed family of operations of the form #x : (Tx) v # (Tx) w provides semantics for algebraic ope ..."
Abstract

Cited by 12 (2 self)
 Add to MetaCart
Given a complete and cocomplete symmetric monoidal closed category V and a symmetric monoidal V category C with cotensors and a strong V monad T on C, we investigate axioms under which an ObC indexed family of operations of the form #x : (Tx) v # (Tx) w provides semantics for algebraic operations, which may be used to extend the usual monadic semantics of the computational #calculus uniformly. We recall a definition for which we have elsewhere given adequacy results, and we show that an enrichment of it is equivalent to a range of other possible natural definitions of algebraic operation. We outline examples and nonexamples and we show that our definition also enriches one for callbyname languages with e#ects. 1
A Generic Operational Metatheory for Algebraic Effects ∗
"... We provide a syntactic analysis of contextual preorder and equivalence for a polymorphic programming language with effects. Our approach applies uniformly to arbitrary algebraic effects, and thus incorporates, as instances: errors, input/output, global state, nondeterminism, probabilistic choice, an ..."
Abstract

Cited by 9 (0 self)
 Add to MetaCart
We provide a syntactic analysis of contextual preorder and equivalence for a polymorphic programming language with effects. Our approach applies uniformly to arbitrary algebraic effects, and thus incorporates, as instances: errors, input/output, global state, nondeterminism, probabilistic choice, and combinations thereof. Our approach is to extend Plotkin and Power’s structural operational semantics for algebraic effects (FoSSaCS 2001) with a primitive “basic preorder ” on ground type computation trees. The basic preorder is used to derive notions of contextual preorder and equivalence on program terms. Under mild assumptions on this relation, we prove fundamental properties of contextual preorder (hence equivalence) including extensionality properties, a characterisation via applicative contexts, and machinery for reasoning about polymorphism using relational parametricity. 1.
Tensors of Comodels and Models for Operational Semantics
"... In seeking a unified study of computational effects, in particular in order to give a general operational semantics agreeing with the standard one for state, one must take account of the coalgebraic structure of state. Axiomatically, one needs a countable Lawvere theory L, a comodel C, typically the ..."
Abstract

Cited by 7 (2 self)
 Add to MetaCart
(Show Context)
In seeking a unified study of computational effects, in particular in order to give a general operational semantics agreeing with the standard one for state, one must take account of the coalgebraic structure of state. Axiomatically, one needs a countable Lawvere theory L, a comodel C, typically the final one, and a model M, typically free; one then seeks a tensor C ⊗ M of the comodel with the model that allows operations to flow between the two. We describe such a tensor implicit in the abstract category theoretic literature, explain its significance for computational effects, and calculate it in leading classes of examples, primarily involving state.
Generic Models for Computational Effects
"... A Freydcategory is a subtle generalisation of the notion of a category with finite products. It is suitable for modelling environments in callbyvalue programming languages, such as the computational λcalculus, with computational effects. We develop the theory of Freydcategories with that in min ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
A Freydcategory is a subtle generalisation of the notion of a category with finite products. It is suitable for modelling environments in callbyvalue programming languages, such as the computational λcalculus, with computational effects. We develop the theory of Freydcategories with that in mind. We first show that any countable Lawvere theory, hence any signature of operations with countable arity subject to equations, directly generates a Freydcategory. We then give canonical, universal embeddings of Freydcategories into closed Freydcategories, characterised by being free cocompletions. The combination of the two constructions sends a signature of operations and equations to the Kleisli category for the monad on the category Set generated by it, thus refining the analysis of computational effects given by monads. That in turn allows a more structural analysis of the λccalculus. Our leading examples of signatures arise from sideeffects, interactive input/output and exceptions. We extend our analysis to an enriched setting in order to account for recursion and for computational effects and signatures that inherently involve it, such as partiality, nondeterminism and probabilistic nondeterminism. Key words: Freydcategory, enriched Yoneda embedding, conical colimit completion, canonical model
Semantics for Local Computational Effects
, 2006
"... Starting with Moggi’s work on monads as refined to Lawvere theories, we give a general construct that extends denotational semantics for a global computational effect canonically to yield denotational semantics for a corresponding local computational effect. Our leading example yields a construction ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
Starting with Moggi’s work on monads as refined to Lawvere theories, we give a general construct that extends denotational semantics for a global computational effect canonically to yield denotational semantics for a corresponding local computational effect. Our leading example yields a construction of the usual denotational semantics for local state from that for global state. Given any Lawvere theory L, possibly countable and possibly enriched, we first give a universal construction that extends L, hence the global operations and equations of a given effect, to incorporate worlds of arbitrary finite size. Then, making delicate use of the final comodel of the ordinary Lawvere theory L, we give a construct that uniformly allows us to model block, the universality of the final comodel yielding a universal property of the construct. We illustrate both the universal extension of L and the canonical construction of block by seeing how they work in the case of state.
Towards Modular Compilers for Effects
"... Compilers are traditionally factorised into a number of separate phases, such as parsing, type checking, code generation, etc. However, there is another potential factorisation that has received comparatively little attention: the treatment of separate language features, such as mutable state, inpu ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
Compilers are traditionally factorised into a number of separate phases, such as parsing, type checking, code generation, etc. However, there is another potential factorisation that has received comparatively little attention: the treatment of separate language features, such as mutable state, input/output, exceptions, concurrency and so forth. In this article we focus on the problem of modular compilation, in which the aim is to develop compilers for separate language features independently, which can then be combined as required. We summarise our progress to date, issues that have arisen, and further work.
Logic for Computational Effects: work in progress
"... We outline a possible logic that will allow us to give a unified approach to reasoning about computational effects. The logic is given by extending Moggi's computational *calculus by basic types and a signature, the latter given by constant symbols, function symbols, and operation symbols, a ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
We outline a possible logic that will allow us to give a unified approach to reasoning about computational effects. The logic is given by extending Moggi's computational *calculus by basic types and a signature, the latter given by constant symbols, function symbols, and operation symbols, and by including a _ operator. We give both syntax and semantics for the logic except for _. We consider a number of sound and complete classes of models, all given in categorytheoretic terms. We illustrate the ideas with some of our leading examples of computational effects, and we observe that operations give rise to natural modalities.