Results 1 
9 of
9
The essence of dataflow programming
 In APLAS
, 2005
"... Abstract. We propose a novel, comonadic approach to dataflow (streambased) 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 18 (3 self)
 Add to MetaCart
Abstract. We propose a novel, comonadic approach to dataflow (streambased) 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 contextdependent computation. In particular, we develop a generic comonadic interpreter of languages for contextdependent computation and instantiate it for streambased computation. We also discuss distributive laws of a comonad over a monad as a means to structure combinations of effectful and contextdependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation. 1
Generic pointfree lenses
 In International Conference on Mathematics of Program Construction (MPC), Québec City, QC
, 2010
"... Abstract. Lenses are one the most popular approaches to define bidirectional transformations between data models. A bidirectional transformation with viewupdate, denoted a lens, encompasses the definition of a forward transformation projecting concrete models into abstract views, together with a ba ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
Abstract. Lenses are one the most popular approaches to define bidirectional transformations between data models. A bidirectional transformation with viewupdate, denoted a lens, encompasses the definition of a forward transformation projecting concrete models into abstract views, together with a backward transformation instructing how to translate an abstract view to an update over concrete models. In this paper we show that most of the standard pointfree combinators can be lifted to lenses with suitable backward semantics, allowing us to use the pointfree style to define powerful bidirectional transformations by composition. We also demonstrate how to define generic lenses over arbitrary inductive data types by lifting standard recursion patterns, like folds or unfolds. To exemplify the power of this approach, we “lensify ” some standard functions over naturals and lists, which are tricky to define directly “byhand ” using explicit recursion.
Corecursive Algebras: A Study of General Structured Corecursion (Extended Abstract)
"... Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The conce ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The concept of antifounded algebra is a statement of the bisimulation principle. We show that it is independent from corecursiveness: Neither condition implies the other. Finally, we call an algebra focusing if its codomain can be reconstructed by iterating structural refinement. This is the strongest condition and implies all the others. 1
Recursion Schemes for Dynamic Programming
 Mathematics of Program Construction, 8th International Conference, MPC 2006
"... Dynamic programming is an algorithm design technique, which allows to improve efficiency by avoiding recomputation of identical subtasks. We present a new recursion combinator, dynamorphism,which captures the dynamic programming recursion pattern with memoization and identify some simple conditions ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Dynamic programming is an algorithm design technique, which allows to improve efficiency by avoiding recomputation of identical subtasks. We present a new recursion combinator, dynamorphism,which captures the dynamic programming recursion pattern with memoization and identify some simple conditions when functions defined by structured general recursion can be redefined as a dynamorphism. The applicability of the new recursion combinator is demonstrated on classical dynamic programming algorithms: Fibonacci numbers, binary partitions, edit distance and longest common subsequence.
The Recursion Scheme from the Cofree Recursive Comonad
"... We instantiate the general comonadbased construction of recursion schemes for the initial algebra of a functor F to the cofree recursive comonad on F. Differently from the scheme based on the cofree comonad on F in a similar fashion, this scheme allows not only recursive calls on elements structura ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
We instantiate the general comonadbased construction of recursion schemes for the initial algebra of a functor F to the cofree recursive comonad on F. Differently from the scheme based on the cofree comonad on F in a similar fashion, this scheme allows not only recursive calls on elements structurally smaller than the given argument, but also subsidiary recursions. We develop a Mendler formulation of the scheme via a generalized Yoneda lemma for initial algebras involving strong dinaturality and hint a relation to circular proofs à la Cockett, Santocanale.
Program fusion with paramorphisms
 In Mathematically Structured Functional Programming, Proceedings, Electronic Workshops in Computing. British Computer Society
, 2006
"... The design of programs as the composition of smaller ones is a wide spread approach to programming. In functional programming, this approach raises the necessity of creating a good amount of intermediate data structures with the only aim of passing data from one function to another. Using program fu ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
The design of programs as the composition of smaller ones is a wide spread approach to programming. In functional programming, this approach raises the necessity of creating a good amount of intermediate data structures with the only aim of passing data from one function to another. Using program fusion techniques, it is possible to eliminate many of those intermediate data structures by an appropriate combination of the codes of the involved functions. In the standard case, no mention to the eliminated data structure remains in the code obtained from fusion. However, there are situations in which parts of that data structure becomes an internal value manipulated by the fused program. This happens, for example, when primitive recursive functions (socalled paramorphisms) are involved. We show, for example, that the result of fusing a primitive recursive function p with another function f may give as result a function that contains calls to f. Moreover, we show that in some cases the result of fusion may be less efficient than the original composition. We also investigate a general recursive version of paramorphism. This study is strongly motivated by the development of a fusion tool for Haskell programs called HFUSION.
Submitted to ICFP’13 Unifying Recursion Schemes
"... Folds over inductive datatypes are well understood and widely used. In their plain form, they are quite restricted; but many disparate generalisations have been proposed that enjoy similar calculational benefits. There have also been attempts to unify the various generalisations: two prominent such ..."
Abstract
 Add to MetaCart
Folds over inductive datatypes are well understood and widely used. In their plain form, they are quite restricted; but many disparate generalisations have been proposed that enjoy similar calculational benefits. There have also been attempts to unify the various generalisations: two prominent such unifications are the ‘recursion schemes from comonads ’ of Uustalu, Vene and Pardo, and our own ‘adjoint folds’. Until now, these two unified schemes have appeared incompatible. We show that this appearance is illusory: in fact, adjoint folds subsume recursion schemes from comonads. The proof of this claim involves standard constructions in category theory that are nevertheless not well known in functional programming: EilenbergMoore categories and bialgebras. The link between the two schemes is provided by the fusion rule of categorical fixedpoint calculus.
Sorting with Bialgebras and Distributive Laws
"... Sorting algorithms are an intrinsic part of functional programming folklore as they exemplify algorithm design using folds and unfolds. This has given rise to an informal notion of duality among sorting algorithms: insertion sorts are dual to selection sorts. Using bialgebras and distributive laws, ..."
Abstract
 Add to MetaCart
Sorting algorithms are an intrinsic part of functional programming folklore as they exemplify algorithm design using folds and unfolds. This has given rise to an informal notion of duality among sorting algorithms: insertion sorts are dual to selection sorts. Using bialgebras and distributive laws, we formalise this notion within a categorical setting. We use types as a guiding force in exposing the recursive structure of bubble, insertion, selection, quick, tree, and heap sorts. Moreover, we show how to distill the computational essence of these algorithms down to onestep operations that are expressed as natural transformations. From this vantage point, the duality is clear, and one side of the algorithmic coin will neatly lead us to the other “for free”. As an optimisation, the approach is also extended to paramorphisms and apomorphisms, which allow for more efficient implementations of these algorithms than the corresponding folds and unfolds.
Histo and Dynamorphisms Revisited
"... Dynamic programming algorithms embody a widely used programming technique that optimizes recursively defined equations that have repeating subproblems. The standard solution uses arrays to share common results between successive steps, and while effective, this fails to exploit the structural proper ..."
Abstract
 Add to MetaCart
Dynamic programming algorithms embody a widely used programming technique that optimizes recursively defined equations that have repeating subproblems. The standard solution uses arrays to share common results between successive steps, and while effective, this fails to exploit the structural properties present in these problems. Histomorphisms and dynamorphisms have been introduced to expresses such algorithms in terms of structured recursion schemes that leverage this structure. In this paper, we revisit and relate these schemes and show how they can be expressed in terms of recursion schemes from comonads, as well as from recursive coalgebras. Our constructions rely on properties of bialgebras and dicoalgebras, and we are careful to consider optimizations and efficiency concerns. Throughout the paper we illustrate these techniques through several workedout examples discussed in a tutorial style, and show how a recursive specification can be expressed both as an arraybased algorithm as well as one that uses recursion schemes.