Results 11 - 20
of
33
Handlers of Algebraic Effects
"... Abstract. We present an algebraic treatment of exception handlers and, more generally, introduce handlers for other computational effects representable by an algebraic theory. These include nondeterminism, interactive input/output, concurrency, state, time, and their combinations; in all cases the c ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
Abstract. We present an algebraic treatment of exception handlers and, more generally, introduce handlers for other computational effects representable by an algebraic theory. These include nondeterminism, interactive input/output, concurrency, state, time, and their combinations; in all cases the computation monad is the free-model monad of the theory. Each such handler corresponds to a model of the theory for the effects at hand. The handling construct, which applies a handler to a computation, is based on the one introduced by Benton and Kennedy, and is interpreted using the homomorphism induced by the universal property of the free model. This general construct can be used to describe previously unrelated concepts from both theory and practice. 1
Signals and comonads
- Journ. of Universal Comp. Sci
, 2005
"... Abstract: We propose a novel discipline for programming stream functions and for the semantic description of stream manipulation languages based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads. This seems to be a promising applica ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
Abstract: We propose a novel discipline for programming stream functions and for the semantic description of stream manipulation languages based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads. This seems to be a promising application for the old, but very little exploited idea that if monads abstract notions of computation of a value, comonads ought to be useable as an abstraction of notions of value in a context. We also show that causal partial-stream functions can be described in terms of a combination of a comonad and a monad.
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 5 (2 self)
- Add to MetaCart
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 effect-manipulating operations need to be lifted to the resulting monad. The traditional approach for lifting operations is nonmodular and ad-hoc. We solve this problem with a principled technique for lifting operations that makes monad transformers truly modular. 1
The essence of form abstraction
- In APLAS
, 2008
"... Abstract. Abstraction is the cornerstone of high-level programming; HTML forms are the principal medium of web interaction. However, most web programming environments do not support abstraction of form components, leading to a lack of compositionality. Using a semantics based on idioms, we show how ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
Abstract. Abstraction is the cornerstone of high-level programming; HTML forms are the principal medium of web interaction. However, most web programming environments do not support abstraction of form components, leading to a lack of compositionality. Using a semantics based on idioms, we show how to support compositional form construction and give a convenient syntax. 1
Correctness of effect-based program transformations
- Formal Logical Methods for System Security and Correctness
, 2008
"... Abstract. We consider a type system capable of tracking reading, writing and allocation in a higher-order language with dynamically allocated references. We give a denotational semantics to this type system which allows us to validate a number of effect-dependent program equivalences in the sense of ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. We consider a type system capable of tracking reading, writing and allocation in a higher-order language with dynamically allocated references. We give a denotational semantics to this type system which allows us to validate a number of effect-dependent program equivalences in the sense of observational equivalence. An example is the following: x = e; y = e; e ′ (x, y) is equivalent to x = e; e ′ (x, x) provided that e does not read from memory regions that it writes to and moreover does not allocate memory that is encapsulated in the values of x and y. Here x can be a higher-order function or a reference or a combination of both. The two sides of the above equivalence turn out to be related in the denotational semantics which implies that they are observationally equivalent, ie can be replaced by one another in any (well-typed) program. On the way we learn popular techniques such as parametrised logical relations, regions, admissible relations, etc., which belong to the toolbox of researchers in principles of programming languages.
Reusable Monadic Semantics of Object Oriented Programming Languages
, 2002
"... We specify the dynamic semantics of an object oriented programming language in an incremental way. We begin with a simple language of arithmetic and boolean expressions. Then, we add functional abstractions, local declarations, references and assignments obtaining a functional language with impe ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We specify the dynamic semantics of an object oriented programming language in an incremental way. We begin with a simple language of arithmetic and boolean expressions. Then, we add functional abstractions, local declarations, references and assignments obtaining a functional language with imperative features. We finally add objects, classes and subclasses to obtain a prototypical object oriented language with dynamic binding.
The essence of dataflow programming (short version
- Proc. of 3rd Asian Symp. on Programming Languages and Systems, APLAS 2005, v. 3780 of Lect. Notes in Comput. Sci
, 2005
"... Abstract. We propose a novel, comonadic approach to dataflow (stream-based) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Abstract. We propose a novel, comonadic approach to dataflow (stream-based) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure context-dependent computation. In particular, we develop a generic comonadic interpreter of languages for contextdependent computation and instantiate it for stream-based computation. We also discuss distributive laws of a comonad over a monad as a means to structure combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation. 1
An idiom’s guide to formlets
, 2007
"... We present a novel approach to HTML form abstraction, which we call formlets. A formlet hides the underlying representation of a data type. For instance, a date formlet may allow a user to enter a date as a single text field, or separate fields for day, month, and year, or a combination of pulldown ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
We present a novel approach to HTML form abstraction, which we call formlets. A formlet hides the underlying representation of a data type. For instance, a date formlet may allow a user to enter a date as a single text field, or separate fields for day, month, and year, or a combination of pulldown menus, or a custom JavaScript calendar widget; any consumer of the data from the form would see only the abstract data type Date. Remarkably, this form of abstraction is unsupported in almost all web frameworks, and not fully supported in any web framework of which we are aware. Formlets are defined in terms of Conor McBride’s idioms (also called applicative functors), a program structuring technique halfway between Moggi’s monads and Hughes’s arrows. We have implemented formlets in the Links programming language. The core functionality is implemented entirely in library code. In addition we offer syntactic sugar which makes formlets particularly easy to use. We show how to extend formlets to support validation by composing the underlying idiom with an additional idiom.
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 2 (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.
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 pre-existing monad need to be lifted to the new monad. In a compa ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
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 pre-existing 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 category-theoretic 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

