Results 1  10
of
36
Shortcut Fusion for Accumulating Parameters Ziplike Functions
, 2002
"... We present an alternative approach to shortcut fusion based on the function unfoldr. Despite its simplicity the technique can remove intermediate lists in examples which are known to be difficult. We show that it can remove all lists from definitions involving ziplike functions and functions using ..."
Abstract

Cited by 42 (0 self)
 Add to MetaCart
We present an alternative approach to shortcut fusion based on the function unfoldr. Despite its simplicity the technique can remove intermediate lists in examples which are known to be difficult. We show that it can remove all lists from definitions involving ziplike functions and functions using accumulating parameters.
Google’s MapReduce Programming Model — Revisited
"... Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domainspecific language Sawzall. To this end, we reverseengineer the seminal papers on MapReduce a ..."
Abstract

Cited by 37 (1 self)
 Add to MetaCart
Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domainspecific language Sawzall. To this end, we reverseengineer the seminal papers on MapReduce and Sawzall, and we capture our findings as an executable specification. We also identify and resolve some obscurities in the informal presentation given in the seminal papers. We use typed functional programming (specifically Haskell) as a tool for design recovery and executable specification. Our development comprises three components: (i) the basic program skeleton that underlies MapReduce computations; (ii) the opportunities for parallelism in executing MapReduce computations; (iii) the fundamental characteristics of Sawzall’s aggregators as an advancement of the MapReduce approach. Our development does not formalize the more implementational aspects of an actual, distributed execution of MapReduce computations.
Generic Program Transformation
 Proc. 3rd International Summer School on Advanced Functional Programming, LNCS 1608
, 1998
"... ion versus efficiency For concreteness, let us first examine a number of examples of the type of optimisation that we wish to capture, and the kind of programs on which they operate. This will give us a specific aim when developing the machinery for automating the process, and a yardstick for evalu ..."
Abstract

Cited by 30 (5 self)
 Add to MetaCart
ion versus efficiency For concreteness, let us first examine a number of examples of the type of optimisation that we wish to capture, and the kind of programs on which they operate. This will give us a specific aim when developing the machinery for automating the process, and a yardstick for evaluating our results. 2.1 Minimum depth of a tree Consider the data type of leaf labelled binary trees: dataBtreea = Leaf a j Bin (Btree a)(Btree a) The minimum depth of such a tree is returned by the function mindepth :: Btree a ! Int : mindepth (Leaf a) = 0 mindepth (Bin s t) = min (mindepth s)(mindepth t) + 1 This program is clear, but rather inefficient. It traverses the whole tree, regardless of leaves that may occur at a small depth. A better program would keep track of the `minimum depth so far', and never explore subtrees beyond that current best solution. One possible implementation of that idea is mindepth t = md t 01 md (Leaf a)d m = mindm md (Bin s t)d m = if d 0 m then m...
Generic Downwards Accumulations
 Science of Computer Programming
, 2000
"... . A downwards accumulation is a higherorder operation that distributes information downwards through a data structure, from the root towards the leaves. The concept was originally introduced in an ad hoc way for just a couple of kinds of tree. We generalize the concept to an arbitrary regular d ..."
Abstract

Cited by 19 (3 self)
 Add to MetaCart
. A downwards accumulation is a higherorder operation that distributes information downwards through a data structure, from the root towards the leaves. The concept was originally introduced in an ad hoc way for just a couple of kinds of tree. We generalize the concept to an arbitrary regular datatype; the resulting denition is coinductive. 1 Introduction The notion of scans or accumulations on lists is well known, and has proved very fruitful for expressing and calculating with programs involving lists [4]. Gibbons [7, 8] generalizes the notion of accumulation to various kinds of tree; that generalization too has proved fruitful, underlying the derivations of a number of tree algorithms, such as the parallel prex algorithm for prex sums [15, 8], Reingold and Tilford's algorithm for drawing trees tidily [21, 9], and algorithms for query evaluation in structured text [16, 23]. There are two varieties of accumulation on lists: leftwards and rightwards. Leftwards accumulation ...
The Worker/Wrapper Transformation
 Journal of Functional Programming
, 2009
"... The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little known in the wider functional programming community, and has never been describ ..."
Abstract

Cited by 15 (7 self)
 Add to MetaCart
The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little known in the wider functional programming community, and has never been described precisely. In this article we explain, formalise and explore the generality of the worker/wrapper transformation. We also provide a systematic recipe for its use as an equational reasoning technique for improving the performance of programs, and illustrate the power of this recipe using a range of examples. 1
Fusion of Recursive Programs with Computational Effects
 Theor. Comp. Sci
, 2000
"... Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, t ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, this paper addresses the definition of two recursive operators on datatypes that capture functional programs with effects. Effects are assumed to be modeled by monads. The main goal is thus the derivation of fusion laws for the new operators. One of the new operators is called monadic unfold. It captures programs (with effects) that generate a data structure in a standard way. The other operator is called monadic hylomorphism, and corresponds to programs formed by the composition of a monadic unfold followed by a function defined by structural induction on the data structure that the monadic unfold generates. 1 Introduction A common approach to program design in functional programmin...
A better XML parser through functional programming
 LNCS
, 2002
"... This paper demonstrates how a higherlevel, declarative view of XML parsing as folding over XML documents has helped to design and implement a better XML parser. By better we mean a fullfeatured, algorithmically optimal, purefunctional parser, which can act as a stream processor. By better we mean ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
This paper demonstrates how a higherlevel, declarative view of XML parsing as folding over XML documents has helped to design and implement a better XML parser. By better we mean a fullfeatured, algorithmically optimal, purefunctional parser, which can act as a stream processor. By better we mean an ecient SAX parser that is easy to use, a parser that does not burden an application with the maintenance of a global state across several callbacks, a parser that eliminates classes of possible application errors. This paper describes such better XML parsers...
Proof Methods for Structured Corecursive Programs
, 1999
"... Corecursive programs produce values of greatest fixpoint types, in contrast to recursive programs, which consume values of least fixpoint types. There are a number of widely used methods for proving properties of corecursive programs, including fixpoint induction, the take lemma, and coinduction. Ho ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
Corecursive programs produce values of greatest fixpoint types, in contrast to recursive programs, which consume values of least fixpoint types. There are a number of widely used methods for proving properties of corecursive programs, including fixpoint induction, the take lemma, and coinduction. However, these methods are all rather lowlevel, in the sense that they do not exploit the common structure that is often present in corecursive definitions. We argue for a more structured approach to proving properties of corecursive programs. In particular, we show that by writing corecursive programs using an operator called unfold that encapsulates a common pattern of corecursive de nition, we can then use highlevel algebraic properties of this operator to conduct proofs in a purely calculational style that avoids the use of either induction or coinduction.
Generic Accumulations
, 2002
"... which are eventually used in later stages of the computation. We present a generic definition of accumulations, achieved by the introduction of a new recursive operator on inductive types. We also show that the notion of downwards accumulation developed by Gibbons is subsumed by our notion of acc ..."
Abstract

Cited by 10 (0 self)
 Add to MetaCart
which are eventually used in later stages of the computation. We present a generic definition of accumulations, achieved by the introduction of a new recursive operator on inductive types. We also show that the notion of downwards accumulation developed by Gibbons is subsumed by our notion of accumulation.
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the socalled fusion laws, are particularly interesting in p...