Results 11  20
of
43
A Model of Cooperative Threads
"... We develop a model of concurrent imperative programming with threads. We focus on a small imperative language with cooperative threads which execute without interruption until they terminate or explicitly yield control. We define and study a tracebased denotational semantics for this language; this ..."
Abstract

Cited by 10 (2 self)
 Add to MetaCart
We develop a model of concurrent imperative programming with threads. We focus on a small imperative language with cooperative threads which execute without interruption until they terminate or explicitly yield control. We define and study a tracebased denotational semantics for this language; this semantics is fully abstract but mathematically elementary. We also give an equational theory for the computational effects that underlie the language, including thread spawning. We then analyze threads in terms of the free algebra monad for this theory. 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 7 (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.
Generic Exception Handling and the Java Monad

, 2004
"... We develop an equational de nition of exception monads that characterizes Moggi's exception monad transformer. This axiomatization is then used to de ne an extension of previously described monadindependent computational logics by abnormal termination. Instantiating this generic formalism with ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
We develop an equational de nition of exception monads that characterizes Moggi's exception monad transformer. This axiomatization is then used to de ne an extension of previously described monadindependent computational logics by abnormal termination. Instantiating this generic formalism with the Java monad used in the LOOP project yields in particular the known Hoare calculi with abnormal termination and JML's method speci cations; this opens up the possibility of extending these formalisms by hitherto missing computational features such as I/O and nondeterminism.
Just do it: Simple monadic equational reasoning
 In Proceedings of the 16th International Conference on Functional Programming (ICFP’11
, 2011
"... One of the appeals of pure functional programming is that it is so amenable to equational reasoning. One of the problems of pure functional programming is that it rules out computational effects. Moggi and Wadler showed how to get round this problem by using monads to encapsulate the effects, leadin ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
One of the appeals of pure functional programming is that it is so amenable to equational reasoning. One of the problems of pure functional programming is that it rules out computational effects. Moggi and Wadler showed how to get round this problem by using monads to encapsulate the effects, leading in essence to a phase distinction—a pure functional evaluation yielding an impure imperative computation. Still, it has not been clear how to reconcile that phase distinction with the continuing appeal of functional programming; does the impure imperative part become inaccessible to equational reasoning? We think not; and to back that up, we present a simple axiomatic approach to reasoning about programs with computational effects.
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 6 (1 self)
 Add to MetaCart
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).
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
Probability, Nondeterminism and Concurrency: Two Denotational Models for Probabilistic Computation
 PHD THESIS, UNIV. AARHUS, 2003. BRICS DISSERTATION SERIES
, 2003
"... Nondeterminism is modelled in domain theory by the notion of a powerdomain, while probability is modelled by that of the probabilistic powerdomain. Some problems arise when we want to combine them in order to model computation in which both nondeterminism and probability are present. In particular t ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
Nondeterminism is modelled in domain theory by the notion of a powerdomain, while probability is modelled by that of the probabilistic powerdomain. Some problems arise when we want to combine them in order to model computation in which both nondeterminism and probability are present. In particular there is no categorical distributive law between them. We introduce the powerdomain of indexed valuations which modifies the usual probabilistic powerdomain to take more detailed account of where probabilistic choices are made. We show the existence of a distributive law between the powerdomain of indexed valuations and the nondeterministic powerdomain. By means of an equational theory we give an alternative characterisation of indexed valuations and the distributive law. We study the relation between valuations and indexed valuations. Finally we use indexed valuations to give a semantics to a programming language. This semantics reveals the computational intuition lying behind the mathematics. In the second part of the thesis we provide an operational reading of continuous valuations on certain domains (the distributive concrete domains of Kahn and Plotkin) through the model of probabilistic event structures. Event structures are a model for concurrent computation that account for causal relations between events. We propose a way of adding probabilities to confusion free event structures, defining the notion of probabilistic event structure. This leads to various ideas of a run for probabilistic event structures. We show a confluence theorem for such runs. Configurations of a confusion free event structure form a distributive concrete domain. We give a representation theorem which characterises completely the powerdomain of valuations of such concrete domains in terms of prob...
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
Positively Dependent Types
 SUBMITTED TO PLPV ’09
, 2008
"... This paper is part of a line of work on using the logical techniques of polarity and focusing to design a dependent programming language, with particular emphasis on programming with deductive systems such as programming languages and proof theories. Polarity emphasizes the distinction between posit ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
This paper is part of a line of work on using the logical techniques of polarity and focusing to design a dependent programming language, with particular emphasis on programming with deductive systems such as programming languages and proof theories. Polarity emphasizes the distinction between positive types, which classify data, and negative types, which classify computation. In previous work, we showed how to use Zeilberger’s higherorder formulation of focusing to integrate a positive function space for representing variable binding, an essential tool for specifying logical systems, with a standard negative computational function space. However, our previous work considers only a simplytyped language. The central technical contribution of the present paper is to extend higherorder focusing with a form of dependency that we call positively dependent types: We allow dependency on positive data, but not negative computation, and we present the syntax of dependent pair and function types using an iterated inductive definition, mapping positive data to types, which gives an account of typelevel computation. We construct our language inside the dependently typed programming language Agda 2, making essential use of coinductive types and inductionrecursion.
Completeness for algebraic theories of local state
"... Abstract. Every algebraic theory gives rise to a monad, and monads allow a metalanguage which is a basic programming language with sideeffects. Equations in the algebraic theory give rise to equations between programs in the metalanguage. An interesting question is this: to what extent can we put ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. Every algebraic theory gives rise to a monad, and monads allow a metalanguage which is a basic programming language with sideeffects. Equations in the algebraic theory give rise to equations between programs in the metalanguage. An interesting question is this: to what extent can we put equational reasoning for programs into the algebraic theory for the monad? In this paper I focus on local state, where programs can allocate, update and read the store. Plotkin and Power (FoSSaCS’02) have proposed an algebraic theory of local state, and they conjectured that the theory is complete, in the sense that every consistent equation is already derivable. The central contribution of this paper is to confirm this conjecture. To establish the completeness theorem, it is necessary to reformulate the informal theory of Plotkin and Power as an enriched algebraic theory in the sense of Kelly and Power (JPAA, 89:163–179). The new presentation can be read as 14 program assertions about three effects. The completeness theorem for local state is dependent on certain conditions on the type of storable values. When the set of storable values is finite, there is a subtle additional axiom regarding quotient types. 1