Results 1  10
of
27
Data types à la carte
"... This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell’s monolithic IO monad. 1 ..."
Abstract

Cited by 57 (1 self)
 Add to MetaCart
(Show Context)
This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell’s monolithic IO monad. 1
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 17 (4 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.
Extensible Effects An Alternative to Monad Transformers
"... We design and implement a library that solves the longstanding problem of combining effects without imposing restrictions on their interactions (such as static ordering). Effects arise from interactions between a client and an effect handler (interpreter); interactions may vary throughout the progr ..."
Abstract

Cited by 15 (1 self)
 Add to MetaCart
(Show Context)
We design and implement a library that solves the longstanding problem of combining effects without imposing restrictions on their interactions (such as static ordering). Effects arise from interactions between a client and an effect handler (interpreter); interactions may vary throughout the program and dynamically adapt to execution conditions. Existing code that relies on monad transformers may be used with our library with minor changes, gaining efficiency over long monad stacks. In addition, our library has greater expressiveness, allowing for practical idioms that are inefficient, cumbersome, or outright impossible with monad transformers. Our alternative to a monad transformer stack is a single monad, for the coroutinelike communication of a client with its handler. Its type reflects possible requests, i.e., possible effects of a computation. To support arbitrary effects and their combinations, requests are values of an extensible union type, which allows adding and, notably, subtracting summands. Extending and, upon handling, shrinking of the union of possible requests is reflected in its type, yielding a typeandeffect system for Haskell. The library is lightweight, generalizing the extensible exception handling to other effects and accurately tracking them in types.
Modular monad transformers
 In ESOP ’09: Proceedings of the 18th European Symposium on Programming Languages and Systems
, 2009
"... Abstract. During the last two decades, monads have become an indispensable tool for structuring functional programs with computational effects. In this setting, the mathematical notion of a monad is extended with operations that allow programmers to manipulate these effects. When several effects are ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
(Show Context)
Abstract. During the last two decades, monads have become an indispensable tool for structuring functional programs with computational effects. In this setting, the mathematical notion of a monad is extended with operations that allow programmers to manipulate these effects. When several effects are involved, monad transformers can be used to build up the required monad one effect at a time. Although this seems to be modularity nirvana, there is a catch: in addition to the construction of a monad, the effectmanipulating operations need to be lifted to the resulting monad. The traditional approach for lifting operations is nonmodular and adhoc. We solve this problem with a principled technique for lifting operations that makes monad transformers truly modular. 1
Monad Transformers as Monoid Transformers
"... The incremental approach to modular monadic semantics constructs complex monads by using monad transformers to add computational features to a preexisting monad. A complication of this approach is that the operations associated to the preexisting monad need to be lifted to the new monad. In a compa ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
(Show Context)
The incremental approach to modular monadic semantics constructs complex monads by using monad transformers to add computational features to a preexisting monad. A complication of this approach is that the operations associated to the preexisting monad need to be lifted to the new monad. In a companion paper by Jaskelioff, the lifting problem has been addressed in the setting of system F ω. Here, we recast and extend those results in a categorytheoretic setting. We abstract and generalize from monads to monoids (in a monoidal category), and from monad transformers to monoid transformers. The generalization brings more simplicity and clarity, and opens the way for lifting of operations with applicability beyond monads. Key words: Monad, Monoid, Monoidal Category
Proof Abstraction for Imperative Languages
, 2003
"... Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encap ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encapsulated with a monad. Such abstraction can be at odds with program verification, however, because program specifications require access to the (deliberately) hidden semantic representation. The techniques for reasoning about modular monadic definitions of imperative programs introduced here overcome this barrier. And, just like program definitions in modular monadic semantics, our program specifications and proofs are representationindependent and hold for whole classes of monads, thereby yielding proofs of great generality.
A Programming Language for Probabilistic Computation
, 2005
"... As probabilistic computations play an increasing role in solving various problems, researchers have designed probabilistic languages to facilitate their modeling. Most of the existing probabilistic languages, however, focus only on discrete distributions, and there has been little effort to develop ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
As probabilistic computations play an increasing role in solving various problems, researchers have designed probabilistic languages to facilitate their modeling. Most of the existing probabilistic languages, however, focus only on discrete distributions, and there has been little effort to develop probabilistic languages whose expressive power is beyond discrete distributions. This dissertation presents a probabilistic language, called PTP (ProbabilisTic Programming), which supports all kinds of probability distributions.
A Modular Rewriting Approach to Language Design, Evolution and Analysis
, 2009
"... Software is becoming a pervasive presence in our lives, powering computing systems in the home, in businesses, and in safetycritical settings. In response, languages are being defined with support for new domains and complex computational abstractions. The need for formal techniques to help better ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
Software is becoming a pervasive presence in our lives, powering computing systems in the home, in businesses, and in safetycritical settings. In response, languages are being defined with support for new domains and complex computational abstractions. The need for formal techniques to help better understand the languages we use, correctly design new language abstractions, and reason about the behavior and correctness of programs is now more urgent then ever. In this dissertation we focus on research in programming language semantics and program analysis, aimed at building and reasoning about programming languages and applications. In language semantics, we first show how to use formal techniques during language design, presenting definitional techniques for objectoriented languages with concurrency features, including the Beta language and a paradigmatic language called KOOL. Since reuse is important, we then present a module system for K, a formalism for language definition that takes advantage of the strengths of rewriting logic and term rewriting techniques. Although currently specific to K, parts of this module system are also aimed at
A Flexible Semantic Framework for Effects
"... Effects are a powerful and convenient component of programming. They enable programmers to interact with the user, take advantage of efficient stateful memory, throw exceptions, and nondeterministically execute programs in parallel. However, they also complicate every aspect of reasoning about a pro ..."
Abstract
 Add to MetaCart
(Show Context)
Effects are a powerful and convenient component of programming. They enable programmers to interact with the user, take advantage of efficient stateful memory, throw exceptions, and nondeterministically execute programs in parallel. However, they also complicate every aspect of reasoning about a program or language, and as a result it is crucially important to have a good understanding of what effects are and how they work. In this paper we present a new framework for formalizing the semantics of effects that is more general and thorough than previous techniques while clarifying many of the important concepts. By returning to the categorytheoretic roots of monads, our framework is rich enough to describe the semantics of effects for a large class of languages including common imperative and functional languages. It is also capable of capturing more expressive, precise, and practical effect systems than previous approaches. Finally, our framework enables one to reason about effects in a languageindependent manner, and so can be applied to many stages of language design and implementation in order to create more broadly applicable tools for programming languages. 1.
Languages, Theory
"... Recently there has been a great deal of interest in higherorder syntax which seeks to extend standard initial algebra semantics to cover languages with variable binding by using functor categories. The canonical example studied in the literature is that of the untyped λcalculus which is handled as ..."
Abstract
 Add to MetaCart
(Show Context)
Recently there has been a great deal of interest in higherorder syntax which seeks to extend standard initial algebra semantics to cover languages with variable binding by using functor categories. The canonical example studied in the literature is that of the untyped λcalculus which is handled as an instance of the general theory of binding algebras, cf. Fiore, Plotkin, Turi [8]. Another important syntactic construction is that of explicit substitutions. The syntax of a language with explicit substitutions does not form a binding algebra as an explicit substitution may bind an arbitrary number of variables. Nevertheless we show that the language given by a standard signature Σ and explicit substitutions is naturally modelled as the initial algebra of the endofunctor Id + FΣ ◦ + ◦ on a functor category. We also comment on the apparent lack of modularity in syntax with variable binding as compared to firstorder languages. Categories and Subject Descriptors