Results 1  10
of
25
Monads and Effects
 IN INTERNATIONAL SUMMER SCHOOL ON APPLIED SEMANTICS APPSEM’2000
, 2000
"... A tension in language design has been between simple semantics on the one hand, and rich possibilities for sideeffects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structu ..."
Abstract

Cited by 54 (6 self)
 Add to MetaCart
A tension in language design has been between simple semantics on the one hand, and rich possibilities for sideeffects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structuring semantic descriptions, they were adopted by Wadler to structure Haskell programs, and now offer a general technique for delimiting the scope of effects, thus reconciling referential transparency and imperative operations within one programming language. Monads have been used to solve longstanding problems such as adding pointers and assignment, interlanguage working, and exception handling to Haskell, without compromising its purely functional semantics. The course will introduce monads, effects and related notions, and exemplify their applications in programming (Haskell) and in compilation (MLj). The course will present typed metalanguages for monads and related categorica...
Semantic Lego
, 1995
"... Denotational semantics [Sch86] is a powerful framework for describing programming languages; however, its descriptions lack modularity: conceptually independent language features influence each others' semantics. We address this problem by presenting a theory of modular denotational semantics. ..."
Abstract

Cited by 38 (0 self)
 Add to MetaCart
Denotational semantics [Sch86] is a powerful framework for describing programming languages; however, its descriptions lack modularity: conceptually independent language features influence each others' semantics. We address this problem by presenting a theory of modular denotational semantics. Following Mosses [Mos92], we divide a semantics into two parts, a computation ADT and a language ADT (abstract data type). The computation ADT represents the basic semantic structure of the language. The language ADT represents the actual language constructs, as described by a grammar. We define the language ADT using the computation ADT; in fact, language constructs are polymorphic over many different computation ADTs. Following Moggi [Mog89a], we build the computation ADT from composable parts, using monads and monad transformers. These techniques allow us to build many different computation ADTs, and, since our language constructs are polymorphic, many different language semantics. We autom...
Combining Computational Effects: Commutativity and Sum
, 2002
"... We begin to develop a unified account of modularity for computational effects. We use the notion of enriched Lawvere theory, together with its relationship with strong monads, to reformulate Moggi's paradigm for modelling computational effects; we emphasise the importance here of the operations ..."
Abstract

Cited by 19 (4 self)
 Add to MetaCart
We begin to develop a unified account of modularity for computational effects. We use the notion of enriched Lawvere theory, together with its relationship with strong monads, to reformulate Moggi's paradigm for modelling computational effects; we emphasise the importance here of the operations that induce computational effects. Effects qua theories are then combined by appropriate bifunctors (on the category of theories). We give a theory of the commutative combination of effects, which in particular yields Moggi's sideeffects monad transformer (an application is the combination of sideeffects with nondeterminism). And we give a theory...
Countable Lawvere Theories and Computational Effects
, 2006
"... Lawvere theories have been one of the two main category theoretic formulations of universal algebra, the other being monads. Monads have appeared extensively over the past fifteen years in the theoretical computer science literature, specifically in connection with computational effects, but Lawvere ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
Lawvere theories have been one of the two main category theoretic formulations of universal algebra, the other being monads. Monads have appeared extensively over the past fifteen years in the theoretical computer science literature, specifically in connection with computational effects, but Lawvere theories have not. So we define the notion of (countable) Lawvere theory and give a precise statement of its relationship with the notion of monad on the category Set. We illustrate with examples arising from the study of computational effects, explaining how the notion of Lawvere theory keeps one closer to computational practice. We then describe constructions that one can make with Lawvere theories, notably sum, tensor, and distributive tensor, reflecting the ways in which the various computational effects are usually combined, thus giving denotational semantics for the combinations.
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 12 (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
Metalanguages and Applications
 Semantics and Logics of Computation, Publications of the Newton Institute
, 1995
"... syntax and encoding in LF In this section we introduce a logical framework with a cumulative hierarchy of predicative universes (in this way we don't need to distinguish between contexts and signatures ). Our main motivation for introducing a logical framework is to have precise and concise de ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
syntax and encoding in LF In this section we introduce a logical framework with a cumulative hierarchy of predicative universes (in this way we don't need to distinguish between contexts and signatures ). Our main motivation for introducing a logical framework is to have precise and concise descriptions of (the wellformed expressions of) languages and translations: languages are described by signatures and translations by signature realizations. 3.1 The logical framework LF The logical framework is give by a set of inference rules for deriving judgements of the following forms: `, i.e. is a context ` A : Type i , i.e. A is a type (in the ith universe) in context ` M : A, i.e. M is a term of type A in context where M and A range over pseudoterms described by the following BNF: identiers x 2 Id ::= an innite set pseudoterms A; M 2 Exp ::= x j Type i j x : A 1 :A 2 j x : A:M j M 1 M 2 empty ; ` ext ` A : Type i ; x : A ` x 62 DV() type2 ` ` Type i : Type i+1 i...
Adjunction models for callbypushvalue with stacks
 Proceedings, 9th Conference on Category Theory and Computer Science, Ottawa, 2002, volume 69 of Electronic Notes in Theoretical Computer Science
, 2005
"... Callbypushvalue is a ”semantic machine code”, providing a set of simple primitives from which both the callbyvalue and callbyname paradigms are built. We present its operational semantics as a stack machine, suggesting a term judgement of stacks. We then see that CBPV, incorporating these st ..."
Abstract

Cited by 10 (6 self)
 Add to MetaCart
Callbypushvalue is a ”semantic machine code”, providing a set of simple primitives from which both the callbyvalue and callbyname paradigms are built. We present its operational semantics as a stack machine, suggesting a term judgement of stacks. We then see that CBPV, incorporating these stack terms, has a simple categorical semantics based on an adjunction between values and stacks. There are no coherence requirements. We describe this semantics incrementally. First, we introduce locally indexed categories and the opGrothendieck construction, and use these to give the basic structure for interpreting the three judgements: values, stacks and computations. Then we look at the universal property required to interpret each type constructor. We define a model to be a strong adjunction with countable coproducts, countable products and exponentials. We see a wide range of instances of this structure: we give examples for divergence, storage, erratic choice, continuations, possible worlds and games (with or without a bracketing condition), in each case resolving the strong monad from the literature into a strong adjunction. And we give ways of constructing models from other models. Finally, we see that callbyvalue and callbyname are interpreted within the Kleisli and coKleisli parts, respectively, of a callbypushvalue adjunction.
An Action Semantics for ML Concurrency Primitives
 IN FME'94, PROC. FORMAL METHODS EUROPE: SYMPOSIUM ON INDUSTRIAL BENEFIT OF FORMAL METHODS, BARCELONA, VOLUME 873 OF LNCS
, 1994
"... This paper is about the recentlydeveloped framework of action semantics. The pragmatic ..."
Abstract

Cited by 8 (5 self)
 Add to MetaCart
This paper is about the recentlydeveloped framework of action semantics. The pragmatic
Resumptions, Weak Bisimilarity and BigStep Semantics for While with Interactive I/O: An Exercise in Mixed InductionCoinduction
"... We look at the operational semantics of languages with interactive I/O through the glasses of constructive type theory. Following on from our earlier work on coinductive tracebased semantics for While [17], we define several bigstep semantics for While with interactive I/O, based on resumptions an ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
We look at the operational semantics of languages with interactive I/O through the glasses of constructive type theory. Following on from our earlier work on coinductive tracebased semantics for While [17], we define several bigstep semantics for While with interactive I/O, based on resumptions and terminationsensitive weak bisimilarity. These require nesting inductive definitions in coinductive definitions, which is interesting both mathematically and from the pointofview of implementation in a proof assistant. After first defining a basic semantics of statements in terms of resumptions with explicit internal actions (delays), we introduce a semantics in terms of delayfree resumptions that essentially removes finite sequences of delays on the fly from those resumptions that are responsive. Finally, we also look at a semantics in terms of delayfree resumptions supplemented with a silent divergence option. This semantics hinges on decisions between convergence and divergence and is only equivalent to the basic one classically. We have fully formalized our development in Coq. 1
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.