Results 1  10
of
11
Parameterised notions of computation
 In MSFP 2006: Workshop on mathematically structured functional programming, ed. Conor McBride and Tarmo Uustalu. Electronic Workshops in Computing, British Computer Society
, 2006
"... Moggi’s Computational Monads and Power et al’s equivalent notion of Freyd category have captured a large range of computational effects present in programming languages such as exceptions, sideeffects, input/output and continuations. We present generalisations of both constructs, which we call para ..."
Abstract

Cited by 37 (3 self)
 Add to MetaCart
Moggi’s Computational Monads and Power et al’s equivalent notion of Freyd category have captured a large range of computational effects present in programming languages such as exceptions, sideeffects, input/output and continuations. We present generalisations of both constructs, which we call parameterised monads and parameterised Freyd categories, that also capture computational effects with parameters. Examples of such are composable continuations, sideeffects where the type of the state varies and input/output where the range of inputs and outputs varies. By also considering monoidal parameterisation, we extend the range of effects to cover separated sideeffects and multiple independent streams of I/O. We also present two typed λcalculi that soundly and completely model our categorical definitions — with and without monoidal parameterisation — and act as prototypical languages with parameterised effects.
Combining algebraic effects with continuations
, 2007
"... We consider the natural combinations of algebraic computational effects such as sideeffects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor ext ..."
Abstract

Cited by 8 (3 self)
 Add to MetaCart
We consider the natural combinations of algebraic computational effects such as sideeffects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor extend, with effort, to include commonly used combinations of the various algebraic effects with continuations. Continuations also give rise to a third sort of combination, that given by applying the continuations monad transformer to an algebraic effect. We investigate the extent to which sum and tensor extend from algebraic effects to arbitrary monads, and the extent to which Felleisen et al.’s C operator extends from continuations to its combination with algebraic effects. To do all this, we use Dubuc’s characterisation of strong monads in terms of enriched large Lawvere theories.
Monads and Adjunctions for Global Exceptions
, 2006
"... In this paper, we look at two categorical accounts of computational effects (strong monad as a model of the monadic metalanguage, adjunction as a model of callbypushvalue with stacks), and we adapt them to incorporate global exceptions. In each case, we extend the calculus with a construct, due t ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
In this paper, we look at two categorical accounts of computational effects (strong monad as a model of the monadic metalanguage, adjunction as a model of callbypushvalue with stacks), and we adapt them to incorporate global exceptions. In each case, we extend the calculus with a construct, due to Benton and Kennedy, that fuses exception handling with sequencing. This immediately gives us an equational theory, simply by adapting the equations for sequencing. We study the categorical semantics of the two equational theories. In the case of the monadic metalanguage, we see that a monad supporting exceptions is a coalgebra for a certain comonad. We further show, using Beck’s theorem, that, on a category with equalizers, the monad constructor for exceptions gives all such monads. In the case of callbypushvalue (CBPV) with stacks, we generalize the notion of CBPV adjunction so that a stack awaiting a value can deal both with a value being returned, and with an exception being raised. We see how to obtain a model of exceptions from a CBPV adjunction, and vice versa by restricting to those stacks that are homomorphic with respect to exception raising.
Coalgebraic Components in a ManySorted Microcosm
"... Abstract. The microcosm principle, advocated by Baez and Dolan and formalized for Lawvere theories lately by three of the authors, has been applied to coalgebras in order to describe compositional behavior systematically. Here we further illustrate the usefulness of the approach by extending it to a ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
Abstract. The microcosm principle, advocated by Baez and Dolan and formalized for Lawvere theories lately by three of the authors, has been applied to coalgebras in order to describe compositional behavior systematically. Here we further illustrate the usefulness of the approach by extending it to a manysorted setting. Then we can show that the coalgebraic component calculi of Barbosa are examples, with compositionality of behavior following from microcosm structure. The algebraic structure on these coalgebraic components corresponds to variants of Hughes’ notion of arrow, introduced to organize computations in functional programming. 1
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 5 (1 self)
 Add to MetaCart
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
Linearlyused state in models of callbyvalue
"... Abstract. We investigate the phenomenon that every monad is a linear state monad. We do this by studying a fullycomplete statepassing translation from an impure callbyvalue language to a new linear type theory: the enriched callbyvalue calculus. The results are not specific to store, but can b ..."
Abstract

Cited by 5 (5 self)
 Add to MetaCart
Abstract. We investigate the phenomenon that every monad is a linear state monad. We do this by studying a fullycomplete statepassing translation from an impure callbyvalue language to a new linear type theory: the enriched callbyvalue calculus. The results are not specific to store, but can be applied to any computational effect expressible using algebraic operations, even to effects that are not usually thought of as stateful. There is a bijective correspondence between generic effects in the source language and state access operations in the enriched callbyvalue calculus. From the perspective of categorical models, the enriched callbyvalue calculus suggests a refinement of the traditional Kleisli models of effectful callbyvalue languages. The new models can be understood as enriched adjunctions. 1
Instances of computational effects: an algebraic perspective
"... Abstract—We investigate the connections between computational effects, algebraic theories, and monads on functor categories. We develop a syntactic framework with variable binding that allows us to describe equations between programs while taking into account the idea that there may be different ins ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract—We investigate the connections between computational effects, algebraic theories, and monads on functor categories. We develop a syntactic framework with variable binding that allows us to describe equations between programs while taking into account the idea that there may be different instances of a particular computational effect. We use our framework to give a general account of several notions of computation that had previously been analyzed in terms of monads on presheaf categories: the analysis of local store by Plotkin and Power; the analysis of restriction by Pitts; and the analysis of the pi calculus by Stark. I.
MSFP 2008 What is a Categorical Model of Arrows?
"... We investigate what the correct categorical formulation of Hughes ’ Arrows should be. It has long been folklore that Arrows, a functional programming construct, and Freyd categories, a categorical notion due to Power, Robinson and Thielecke, are somehow equivalent. In this paper, we show that the si ..."
Abstract
 Add to MetaCart
We investigate what the correct categorical formulation of Hughes ’ Arrows should be. It has long been folklore that Arrows, a functional programming construct, and Freyd categories, a categorical notion due to Power, Robinson and Thielecke, are somehow equivalent. In this paper, we show that the situation is more subtle. By considering Arrows wholly within the base category we derive two alternative formulations of Freyd category that are equivalent to Arrows—enriched Freyd categories and indexed Freyd categories. By imposing a further condition, we characterise those indexed Freyd categories that are isomorphic to Freyd categories. The key differentiating point is the number of inputs available to a computation and the structure available on them, where structured input is modelled using comonads. 1
Universal Properties of Impure Programming Languages
"... We investigate impure, callbyvalue programming languages. Our first language only has variables and letbinding. Its equational theory is a variant of Lambek’s theory of multicategories that omits the commutativity axiom. We demonstrate that type constructions for impure languages — products, sums ..."
Abstract
 Add to MetaCart
We investigate impure, callbyvalue programming languages. Our first language only has variables and letbinding. Its equational theory is a variant of Lambek’s theory of multicategories that omits the commutativity axiom. We demonstrate that type constructions for impure languages — products, sums and functions — can be characterized by universal properties in the setting of ‘premulticategories’, multicategories where the commutativity law may fail. This leads us to new, universal characterizations of two earlier equational theories of impure programming languages: the premonoidal categories of Power and Robinson, and the monadbased models of Moggi. Our analysis thus puts these earlier abstract ideas on a canonical foundation, bringing them to a new, syntactic level. F.3.2 [Semantics of Pro
MFPS 29 Preliminary Proceedings Normalization by evaluation and algebraic effects
"... We examine the interplay between computational effects and higher types. We do this by presenting a normalization by evaluation algorithm for a language with function types as well as computational effects. We use algebraic theories to treat the computational effects in the normalization algorithm i ..."
Abstract
 Add to MetaCart
We examine the interplay between computational effects and higher types. We do this by presenting a normalization by evaluation algorithm for a language with function types as well as computational effects. We use algebraic theories to treat the computational effects in the normalization algorithm in a modular way. Our algorithm is presented in terms of an interpretation in a category of presheaves equipped with partial equivalence relations. The normalization algorithm and its correctness proofs are formalized in dependent type theory (Agda). Keywords: