Results 1 
6 of
6
The UnderAppreciated Unfold
 In Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming
, 1998
"... Folds are appreciated by functional programmers. Their dual, unfolds, are not new, but they are not nearly as well appreciated. We believe they deserve better. To illustrate, we present (indeed, we calculate) a number of algorithms for computing the breadthfirst traversal of a tree. We specify brea ..."
Abstract

Cited by 49 (11 self)
 Add to MetaCart
Folds are appreciated by functional programmers. Their dual, unfolds, are not new, but they are not nearly as well appreciated. We believe they deserve better. To illustrate, we present (indeed, we calculate) a number of algorithms for computing the breadthfirst traversal of a tree. We specify breadthfirst traversal in terms of levelorder traversal, which we characterize first as a fold. The presentation as a fold is simple, but it is inefficient, and removing the inefficiency makes it no longer a fold. We calculate a characterization as an unfold from the characterization as a fold; this unfold is equally clear, but more efficient. We also calculate a characterization of breadthfirst traversal directly as an unfold; this turns out to be the `standard' queuebased algorithm.
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 22 (4 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 ...
Accumulating Attributes for Doaitse Swierstra, on his retirement
"... Abstract. Doaitse has always been enthusiastic about attribute grammars, seeing them even where most people don’t. While I was writing up my DPhil thesis, he explained to me where they were in that too. This paper is by way of belated thanks for that perspective—and as a more general rendering of th ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Abstract. Doaitse has always been enthusiastic about attribute grammars, seeing them even where most people don’t. While I was writing up my DPhil thesis, he explained to me where they were in that too. This paper is by way of belated thanks for that perspective—and as a more general rendering of the observation, with the benefit of hindsight and twenty years of progress. 1
Precise Reasoning About Nonstrict Functional Programs
"... This thesis consists of two parts. Both concern reasoning about nonstrict functional programming languages with partial and infinite values and lifted types, including lifted function spaces. The first part is a case study in program verification: We have written a simple parser and a corresponding ..."
Abstract
 Add to MetaCart
This thesis consists of two parts. Both concern reasoning about nonstrict functional programming languages with partial and infinite values and lifted types, including lifted function spaces. The first part is a case study in program verification: We have written a simple parser and a corresponding prettyprinter in Haskell. A natural aim is to prove that the programs are, in some sense, each other’s inverses. The presence of partial and infinite values makes this exercise interesting. We have tackled the problem in different ways, and report on the merits of those approaches. More specifically, first a method for testing properties of programs in the presence of partial and infinite values is described. By testing before proving we avoid wasting time trying to prove statements that are not valid. Then it is proved that the programs we have written are in fact (more or less) inverses using first fixpoint induction and then the approximation lemma.
On the Generalized BoxDrawing of Trees —Survey and New Technology—
"... Abstract: This paper is on the aesthetic layout of nary trees with nodes of variable size, also referred to as generalized boxdrawing. For this layout problem a few algorithms have been proposed, which differ in their runtime performance and the attained aesthetic criteria. We introduce a new appr ..."
Abstract
 Add to MetaCart
Abstract: This paper is on the aesthetic layout of nary trees with nodes of variable size, also referred to as generalized boxdrawing. For this layout problem a few algorithms have been proposed, which differ in their runtime performance and the attained aesthetic criteria. We introduce a new approach to this layout problem, which is interesting because of both its simplicity and elegance, and which employs the following piggyback metaphor: The original boxdrawing problem, Π, is topologically reformulated as a layout problem with uniform node size, resulting in a new drawing problem Π ′ , which then is handled by the best tree layout algorithm for uniform node size developed so far. The reformulation step can be done in linear time in the number of nodes of the original tree, resulting in an overall linear time complexity. Compared to the existing approaches our approach fulfills more aesthetic criteria; experiments have also shown its efficiency in complex layout settings.