Results 1 
8 of
8
Causal commutative arrows and their optimization
 In Proc. International Conference on Functional Programming, ICFP ’09
, 2009
"... Arrows are a popular form of abstract computation. Being more general than monads, they are more broadly applicable, and in particular are a good abstraction for signal processing and dataflow computations. Most notably, arrows form the basis for a domain specific language called Yampa, which has be ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
Arrows are a popular form of abstract computation. Being more general than monads, they are more broadly applicable, and in particular are a good abstraction for signal processing and dataflow computations. Most notably, arrows form the basis for a domain specific language called Yampa, which has been used in a variety of concrete applications, including animation, robotics, sound synthesis, control systems, and graphical user interfaces. computations captured by Yampa. Unfortunately, arrows are not concrete enough to do this with precision. To remedy this situation we introduce the concept of commutative arrows that capture a kind of noninterference property of concurrent computations. We also add an init operator, and identify a crucial law that captures the causal nature of arrow effects. We call the resulting computational model causal commutative arrows. To study this class of computations in more detail, we define an extension to the simply typed lambda calculus called causal commutative arrows (CCA), and study its properties. Our key contribution is the identification of a normal form for CCA called causal commutative normal form (CCNF). By defining a normalization procedure we have developed an optimization strategy that yields dramatic improvements in performance over conventional implementations of arrows. We have implemented this technique in Haskell, and conducted benchmarks that validate the effectiveness of our approach. When combined with stream fusion, the overall methodology can result in speedups of greater than two orders of magnitude.
The arrow calculus
, 2008
"... Abstract. We introduce the arrow calculus, a metalanguage for manipulating Hughes’s arrows with close relations both to Moggi’s metalanguage for monads and to Paterson’s arrow notation. Arrows are classically defined by extending lambda calculus with three constructs satisfying nine (somewhat idiosy ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
Abstract. We introduce the arrow calculus, a metalanguage for manipulating Hughes’s arrows with close relations both to Moggi’s metalanguage for monads and to Paterson’s arrow notation. Arrows are classically defined by extending lambda calculus with three constructs satisfying nine (somewhat idiosyncratic) laws. In contrast, the arrow calculus adds four constructs satisfying five laws. Two of the constructs are arrow abstraction and application (satisfying beta and eta laws) and two correspond to unit and bind for monads (satisfying left unit, right unit, and associativity laws). The five laws were previously known to be sound; we show that they are also complete, and hence that the five laws may replace the nine. We give a translation from classic arrows into the arrow calculus to complement Paterson’s desugaring and show that the two translations form an equational correspondence in the sense of Sabry and Felleisen. We are also the first to publish formal type rules (which are unusual in that they require two contexts), which greatly aided our understanding of arrows. The first fruit of our new calculus is to reveal some redundancies in the classic formulation: the nine classic arrow laws can be reduced to eight, and the three additional classic arrow laws for arrows with apply can be reduced to two. The calculus has also been used to clarify the relationship between idioms, arrows and monads and as the inspiration for a categorical semantics of arrows. 1
Cartesian effect categories are Freydcategories
, 2009
"... Most often, in a categorical semantics for a programming language, the substitution of terms is expressed by composition and finite products. However this does not deal with the order of evaluation of arguments, which may have major consequences when there are sideeffects. In this paper Cartesian e ..."
Abstract

Cited by 5 (5 self)
 Add to MetaCart
Most often, in a categorical semantics for a programming language, the substitution of terms is expressed by composition and finite products. However this does not deal with the order of evaluation of arguments, which may have major consequences when there are sideeffects. In this paper Cartesian effect categories are introduced for solving this issue, and they are compared with strong monads, Freydcategories and Haskell’s Arrows. It is proved that a Cartesian effect category is a Freydcategory where the premonoidal structure is provided by a kind of binary product, called the sequential product. The universal property of the sequential product provides Cartesian effect categories with a powerful tool for constructions and proofs. To our knowledge, both effect categories and sequential products are new notions. Keywords. Categorical logic, computational effects, monads, Freydcategories, premonoidal categories, Arrows, sequential product, effect categories, Cartesian effect categories.
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 2 (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 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
Constructing Applicative Functors
"... Abstract. Applicative functors define an interface to computation that is more general, and correspondingly weaker, than that of monads. First used in parser libraries, they are now seeing a wide range of applications. This paper sets out to explore the space of nonmonadic applicative functors usef ..."
Abstract
 Add to MetaCart
Abstract. Applicative functors define an interface to computation that is more general, and correspondingly weaker, than that of monads. First used in parser libraries, they are now seeing a wide range of applications. This paper sets out to explore the space of nonmonadic applicative functors useful in programming. We work with a generalization, lax monoidal functors, and consider several methods of constructing useful functors of this type, just as transformers are used to construct computational monads. For example, coends, familiar to functional programmers as existential types, yield a range of useful applicative functors, including left Kan extensions. Other constructions are final fixed points, a limited sum construction, and a generalization of the semidirect product of monoids. Implementations in Haskell are included where possible. 1
Universal Properties of Impure Programming Languages
"... We investigate impure, callbyvalue programming languages. Our first language only has variables and letbinding. Its equational theory is a variant of Lambek’s theory of multicategories that omits the commutativity axiom. We demonstrate that type constructions for impure languages — products, sums ..."
Abstract
 Add to MetaCart
We investigate impure, callbyvalue programming languages. Our first language only has variables and letbinding. Its equational theory is a variant of Lambek’s theory of multicategories that omits the commutativity axiom. We demonstrate that type constructions for impure languages — products, sums and functions — can be characterized by universal properties in the setting of ‘premulticategories’, multicategories where the commutativity law may fail. This leads us to new, universal characterizations of two earlier equational theories of impure programming languages: the premonoidal categories of Power and Robinson, and the monadbased models of Moggi. Our analysis thus puts these earlier abstract ideas on a canonical foundation, bringing them to a new, syntactic level. F.3.2 [Semantics of Pro
Causal commutative arrows
"... Arrows are a popular form of abstract computation. Being more general than monads, they are more broadly applicable, and, in particular, are a good abstraction for signal processing and dataflow computations. Most notably, arrows form the basis for a domainspecific language called Yampa, which has ..."
Abstract
 Add to MetaCart
Arrows are a popular form of abstract computation. Being more general than monads, they are more broadly applicable, and, in particular, are a good abstraction for signal processing and dataflow computations. Most notably, arrows form the basis for a domainspecific language called Yampa, which has been used in a variety of concrete applications, including animation, robotics, sound synthesis, control systems, and graphical user interfaces. Our primary interest is in better understanding the class of abstract computations captured by Yampa. Unfortunately, arrows are not concrete enough to do this with precision. To remedy this situation, we introduce the concept of commutative arrows that capture a noninterference property of concurrent computations. We also add an init operator that captures the causal nature of arrow effects, and identify its associated law. To study this class of computations in more detail, we define an extension to arrows called causal commutative arrows (CCA), and study its properties. Our key contribution is the identification of a normal form for CCA called causal commutative normal form (CCNF). By defining a normalization procedure, we have developed an optimization strategy that yields dramatic improvements in performance over conventional implementations of arrows. We have implemented this technique in Haskell, and conducted benchmarks that validate the effectiveness of our approach. When compiled with the Glasgow Haskell Compiler (GHC), the overall methodology can result in significant speedups. 1
CMCS 2010 Categorifying Computations into Components via Arrows as Profunctors
"... The notion of arrow by Hughes is an axiomatization of the algebraic structure possessed by structured computations in general. We claim that an arrow also serves as a basic component calculus for composing statebased systems as components—in fact, it is a categorified version of arrow that does so. ..."
Abstract
 Add to MetaCart
The notion of arrow by Hughes is an axiomatization of the algebraic structure possessed by structured computations in general. We claim that an arrow also serves as a basic component calculus for composing statebased systems as components—in fact, it is a categorified version of arrow that does so. In this paper, following the second author’s previous work with Heunen, Jacobs and Sokolova, we prove that a certain coalgebraic modeling of components—which generalizes Barbosa’s—indeed carries such arrow structure. Our coalgebraic modeling of components is parametrized by an arrow A that specifies computational structure exhibited by components; it turns out that it is this arrow structure of A that is lifted and realizes the (categorified) arrow structure on components. The lifting is described using the first author’s recent characterization of an arrow as an internal strong monad in Prof, the bicategory of small categories and profunctors.