Results 1 
5 of
5
Monadic augment and generalised short cut fusion
 Journal of Functional Programming
, 2005
"... Monads are commonplace programming devices that are used to uniformly structure computations with effects such as state, exceptions, and I/O. This paper further develops the monadic programming paradigm by investigating the extent to which monadic computations can be optimised by using generalisatio ..."
Abstract

Cited by 16 (7 self)
 Add to MetaCart
Monads are commonplace programming devices that are used to uniformly structure computations with effects such as state, exceptions, and I/O. This paper further develops the monadic programming paradigm by investigating the extent to which monadic computations can be optimised by using generalisations of short cut fusion to eliminate monadic structures whose sole purpose is to “glue together ” monadic program components. We make several contributions. First, we show that every inductive type has an associated build combinator and an associated short cut fusion rule. Second, we introduce the notion of an inductive monad to describe those monads that give rise to inductive types, and we give examples of such monads which are widely used in functional programming. Third, we generalise the standard augment combinators and cata/augment fusion rules for algebraic data types to types induced by inductive monads. This allows us to give the first cata/augment rules for some common data types, such as rose trees. Fourth, we demonstrate the practical applicability of our generalisations by providing Haskell implementations for all concepts and examples in the paper. Finally, we offer deep theoretical insights by showing that the augment combinators are monadic in nature, and thus that our cata/build and cata/augment rules are arguably the best generally applicable fusion rules obtainable.
Programming macro tree transducers
 In WGP ’13
, 2013
"... A tree transducer is a set of mutually recursive functions transforming an input tree into an output tree. Macro tree transducers extend this recursion scheme by allowing each function to be defined in terms of an arbitrary number of accumulation parameters. In this paper, we show how macro tree tra ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
A tree transducer is a set of mutually recursive functions transforming an input tree into an output tree. Macro tree transducers extend this recursion scheme by allowing each function to be defined in terms of an arbitrary number of accumulation parameters. In this paper, we show how macro tree transducers can be concisely represented in Haskell, and demonstrate the benefits of utilising such an approach with a number of examples. In particular, tree transducers afford a modular programming style as they can be easily composed and manipulated. Our Haskell representation generalises the original definition of (macro) tree transducers, abolishing a restriction on finite state spaces. However, as we demonstrate, this generalisation does not affect compositionality.
Journal of Automata, Languages and Combinatorics u (v) w, x–y c ○ OttovonGuerickeUniversität Magdeburg Incomparability Results for Classes of Polynomial Tree Series Transformations
"... Polynomial bottomup and topdown tree series transducers over partially ordered semirings are considered, and the classes of εtreetotreeseries (for short: εtts) and otreetotreeseries (for short: otts) transformations computed by such transducers are compared. The main result is the foll ..."
Abstract
 Add to MetaCart
Polynomial bottomup and topdown tree series transducers over partially ordered semirings are considered, and the classes of εtreetotreeseries (for short: εtts) and otreetotreeseries (for short: otts) transformations computed by such transducers are compared. The main result is the following. Let A be a weakly growing semiring and x, y ∈ {deterministic, homomorphism}. The class of otts transformations computed by x bottomup tree series transducers over A is incomparable (with respect to set inclusion) with the class of εtts transformations computed by y bottomup tree series transducers over A. Moreover, the latter class is incomparable with the class of εtts transformations computed by x topdown tree series transducers over A. If additionally A is additively idempotent, then the above statements even hold for every x, y ∈ {polynomial, deterministic, homomorphism}.
Incomparability Results for Classes of Polynomial Tree Series Transformations
, 2003
"... We consider (subclasses of) polynomial bottomup and topdown tree series transducers over a partially ordered semiring A = (A, ⊕, ⊙, 0, 1, ≼), and we compare the classes of treetotreeseries and otreetotreeseries transformations computed by such transducers. Our main result states the followi ..."
Abstract
 Add to MetaCart
We consider (subclasses of) polynomial bottomup and topdown tree series transducers over a partially ordered semiring A = (A, ⊕, ⊙, 0, 1, ≼), and we compare the classes of treetotreeseries and otreetotreeseries transformations computed by such transducers. Our main result states the following. If, for some a ∈ A with 1 ≼ a, the semiring A is a weak agrowth semiring and either (i) the semiring A is additively idempotent and x, y ∈ {polynomial, deterministic, total, deterministic and total, homomorphism}, or (ii) 1 ≺ 1 ⊕ 1 and x, y ∈ {deterministic, deterministic and total, homomorphism}, then the statements x BOT(A) ⋊ ⋉ y BOT o (A) and x BOT(A) ⋊ ⋉ y TOP(A) hold. Therein x BOT mod (A) for mod ∈ {ε, o} denotes the class of modtreetotreeseries transformations computed by bottomup tree series transducers, which have property x, over the semiring A (the class y TOP(A) is de ned similarly for topdown tree series transducers). Besides, ⋊ ⋉ denotes incomparability with respect to set inclusion.