Results 11  20
of
45
General structural operational semantics through categorical logic (Extended Abstract)
, 2008
"... Certain principles are fundamental to operational semantics, regardless of the languages or idioms involved. Such principles include rulebased definitions and proof techniques for congruence results. We formulate these principles in the general context of categorical logic. From this general formul ..."
Abstract

Cited by 9 (6 self)
 Add to MetaCart
Certain principles are fundamental to operational semantics, regardless of the languages or idioms involved. Such principles include rulebased definitions and proof techniques for congruence results. We formulate these principles in the general context of categorical logic. From this general formulation we recover precise results for particular language idioms by interpreting the logic in particular categories. For instance, results for firstorder calculi, such as CCS, arise from considering the general results in the category of sets. Results for languages involving substitution and name generation, such as the πcalculus, arise from considering the general results in categories of sheaves and group actions. As an extended example, we develop a tyft/tyxtlike rule format for open bisimulation in the πcalculus.
Coalgebraic semantics for timed processes
 Inf. & Comp
, 2006
"... We give a coalgebraic formulation of timed processes and their operational semantics. We model time by a monoid called a “time domain”, and we model processes by “timed transition systems”, which amount to partial monoid actions of the time domain or, equivalently, coalgebras for an “evolution comon ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
We give a coalgebraic formulation of timed processes and their operational semantics. We model time by a monoid called a “time domain”, and we model processes by “timed transition systems”, which amount to partial monoid actions of the time domain or, equivalently, coalgebras for an “evolution comonad ” generated by the time domain. All our examples of time domains satisfy a partial closure property, yielding a distributive law of a monad for total monoid actions over the evolution comonad, and hence a distributive law of the evolution comonad over a dual comonad for total monoid actions. We show that the induced coalgebras are exactly timed transition systems with delay operators. We then integrate our coalgebraic formulation of time qua timed transition systems into Turi and Plotkin’s formulation of structural operational semantics in terms of distributive laws. We combine timing with action via the more general study of the combination of two arbitrary sorts of behaviour whose operational semantics may interact. We give a modular account of the operational semantics for a combination induced by that of each of its components. Our study necessitates the investigation of products of comonads. In particular, we characterise when a monad lifts to the category of coalgebras for a product comonad, providing constructions with which one can readily calculate. Key words: time domains, timed transition systems, evolution comonads, delay operators, structural operational semantics, modularity, distributive laws 1
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 8 (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
2013): The Sequential Semantics of Producer Effect Systems
 In: POPL
"... Effects are fundamental to programming languages. Even the lambda calculus has effects, and consequently the two famous evaluation strategies produce different semantics. As such, much research has been done to improve our understanding of effects. Since Moggi introduced monads for his computational ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Effects are fundamental to programming languages. Even the lambda calculus has effects, and consequently the two famous evaluation strategies produce different semantics. As such, much research has been done to improve our understanding of effects. Since Moggi introduced monads for his computational lambda calculus, further generalizations have been designed to formalize increasingly complex computational effects, such as indexed monads followed by layered monads followed by parameterized monads. This succession prompted us to determine the most general formalization possible. In searching for this formalization we came across many surprises, such as the insufficiencies of arrows, as well as many unexpected insights, such as the importance of considering an effect as a small component of a whole system rather than just an isolated feature. In this paper we present our semantic formalization for producer effect systems, which we call a productor, and prove its maximal generality by focusing on only sequential composition of effectful computations, consequently guaranteeing that the existing monadic techniques are specializations of productors.
Modularity of behaviour of mathematical operational semantics
 In Proc. Coalgebraic Methods in Computer Science (CMCS’04), volume 106 of Electron. Notes Theor. Comput. Sci
, 2004
"... Some years ago, Turi and Plotkin gave a precise mathematical formulation of a notion of structural operational semantics: their formulation is equivalent to a distributive law of the free monad on a signature over the cofree copointed endofunctor on a behaviour endofunctor. From such a distributive ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
Some years ago, Turi and Plotkin gave a precise mathematical formulation of a notion of structural operational semantics: their formulation is equivalent to a distributive law of the free monad on a signature over the cofree copointed endofunctor on a behaviour endofunctor. From such a distributive law, one can readily induce a distributive law of the monad over the cofree comonad on the behaviour endofunctor, and much of their analysis can be carried out in the latter terms, adding a little more generality that proves to be vital here. Here, largely at the latter level of generality, we investigate the situation in which one has two sorts of behaviours, with operational semantics possibly interacting with each other. Our leading examples are given by combining action and timing, with a modular account of the operational semantics for the combination induced by that of each of the two components. Our study necessitates investigation and new results about products of comonads and liftings of monads to categories of coalgebras for the product of comonads, providing constructions with which one can readily calculate.
Effect handlers in scope
 In
"... Algebraic effect handlers are a powerful means for describing effectful computations. They provide a lightweight and orthogonal technique to define and compose the syntax and semantics of different effects. The semantics is captured by handlers, which are functions that transform syntax trees. Unfor ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
Algebraic effect handlers are a powerful means for describing effectful computations. They provide a lightweight and orthogonal technique to define and compose the syntax and semantics of different effects. The semantics is captured by handlers, which are functions that transform syntax trees. Unfortunately, the approach does not support syntax for scoping constructs, which arise in a number of scenarios. While handlers can be used to provide a limited form of scope, we demonstrate that this approach constrains the possible interactions of effects and rules out some desired semantics. This paper presents two different ways to capture scoped constructs in syntax, and shows how to achieve different semantics by reordering handlers. The first approach expresses scopes using the existing algebraic handlers framework, but has some limitations. The problem is fully solved in the second approach where we introduce higherorder syntax.
Kleene Monads: Handling Iteration in a Framework of Generic Effects
"... Abstract. Monads are a wellestablished tool for modelling various computational effects. They form the semantic basis of Moggi’s computational metalanguage, the metalanguage of effects for short, which made its way into modern functional programming in the shape of Haskell’s donotation. Standard c ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. Monads are a wellestablished tool for modelling various computational effects. They form the semantic basis of Moggi’s computational metalanguage, the metalanguage of effects for short, which made its way into modern functional programming in the shape of Haskell’s donotation. Standard computational idioms call for specific classes of monads that support additional control operations. Here, we introduce Kleene monads, which additionally feature nondeterministic choice and Kleene star, i.e. nondeterministic iteration, and we provide a metalanguage and a sound calculus for Kleene monads, the metalanguage of control and effects, which is the natural joint extension of Kleene algebra and the metalanguage of effects. This provides a framework for studying abstract program equality focussing on iteration and effects. These aspects are known to have decidable equational theories when studied in isolation. However, it is well known that decidability breaks easily; e.g. the Horn theory of continuous Kleene algebras fails to be recursively enumerable. Here, we prove several negative results for the metalanguage of control and effects; in particular, already the equational theory of the unrestricted metalanguage of control and effects over continuous Kleene monads fails to be recursively enumerable. We proceed to identify a fragment of this language which still contains both Kleene algebra and the metalanguage of effects and for which the natural axiomatisation is complete, and indeed the equational theory is decidable. 1
Compilation à la Carte
"... In previous work, we proposed a new approach to the problem of implementing compilers in a modular manner, by combining earlier work on the development of modular interpreters using monad transformers with the à la carte approach to modular syntax. In this article, we refine and extend our existing ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
(Show Context)
In previous work, we proposed a new approach to the problem of implementing compilers in a modular manner, by combining earlier work on the development of modular interpreters using monad transformers with the à la carte approach to modular syntax. In this article, we refine and extend our existing framework in a number of directions. In particular, we show how generalised algebraic datatypes can be used to support a more modular approach to typing individual language features, we increase the expressive power of the framework by considering mutable state, variable binding, and the issue of noncommutative effects, and we show how the Zinc Abstract Machine can be adapted to provide a modular universal target machine for our modular compilers.
Aspect Oriented Programming: a language for 2categories
"... AspectOriented Programming (AOP) started ten years ago with the remark that modularization of socalled crosscutting functionalities is a fundamental problem for the engineering of largescale applications. Originating at Xerox PARC, this observation has sparked the development of a new style of pr ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
(Show Context)
AspectOriented Programming (AOP) started ten years ago with the remark that modularization of socalled crosscutting functionalities is a fundamental problem for the engineering of largescale applications. Originating at Xerox PARC, this observation has sparked the development of a new style of programming featured that is gradually gaining traction, as it is the case for the related concept of code injection, in the guise of frameworks such as Swing and Google Guice. However, AOP lacks theoretical foundations to clarify this new idea. This paper proposes to put a bridge between AOP and the notion of 2category to enhance the conceptual understanding of AOP. Starting from the connection between the λcalculus and the theory of categories, we propose to see an aspect as a morphism between morphisms—that is as a program that transforms the execution of a program. To make this connection precise, we develop an advised λcalculus that provides an internal language for 2categories and show how it can be used as a base for the definition of the weaving mechanism of a realistic functional AOP language, called MinAML.
Update Monads: Cointerpreting Directed Containers
"... Containers are a neat representation of a wide class of set functors. We have previously [1] introduced directed containers as a concise representation of comonad structures on such functors. Here we examine interpreting the opposite categories of containers and directed containers. We arrive at a n ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Containers are a neat representation of a wide class of set functors. We have previously [1] introduced directed containers as a concise representation of comonad structures on such functors. Here we examine interpreting the opposite categories of containers and directed containers. We arrive at a new view of a di↵erent (considerably narrower) class of set functors and monads on them, which we call update monads. 1 A container is given by a set S (of shapes) and an Sindexed family of sets P (of positions). Containers form a category Cont with a (composition) monoidal structure. Containers interpet into set functors by JS, P K c X = ⌃s: S. P s! X The functor J Kc: Cont! [Set, Set] is monoidal and fully faithful. A directed container is a container (S, P) together with operations #: ⇧s: S.P s! S (subshapes) o: ⇧{s: S}.P s (the root): ⇧{s: S}. ⇧p: P s. P (s # p) ! Ps(subshape positions as positions in the global shape) satisfying the laws 8{s}.s # o = s 8{s, p, p 0}.s # (p p 0)=(s # p) # p 0 8{s, p}.p {s} o = p 8{s, p}. o {s} p = p 8{s, p, p 0,p 00}. (p {s} p 0) p 00 = p (p 0 p 00) so (P, o, ) is a bit like a monoid (but dependently typed) and (S, #) like its action on a set. Directed containers are the same as comonoids in the category of containers: DCont ⇠ = Comonoids(Cont). The interpretation of containers into set functors extends into an interpretation of directed containers into comonads via