| Jeremy Gibbons (1993b). Upwards and downwards accumulations on trees. In R. S. |
....technique [BD77] whose emphasis is on the generality of transformation process instead of the structure of programs. Our work on calculation carrying programs was highly motivated by the success of the application of program calculation both to derivation of various kinds of efficient programs [Gib92, dM92, Jeu93], and to construction of some optimization passes of compilers [GLJ93, OHIT97] Particularly, it has been shown that many important program transformations suchasdeforestation (or fusion) tupling transformation, parallelization and accumulation can effectively and elegantly be formalized in ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992.
....(h) Theta id X ) hF (f ffi (fold F (h) Theta id X ) 2 i by initiality with accumulators we obtain that: f ffi (fold F (h) Theta id X ) afold F (k; Therefore, fold F (h) t) f(fold F (h) t) e) afold F (k; t; e) as desired. 2 5 Downwards Accumulations Downwards accumulations [13, 14, 15] are functions that label every node of a data structure with some function of its ancestors. Gibbons [15] presents a generic definition of downwards accumulation in terms of unfold (the operator dual to fold, see [17] that uses an accumulating parameter to pass information downwards. In this ....
J. Gibbons. Upwards and Downwards Accumulations on Trees. In R.S. Bird, C.C. Morgan, and J.C P. Woodcock, editors, Mathematics of Program Construction, LNCS 669. SpringerVerlag, 1993.
....are all A decorated H cotrees) with a decoration from B using f as 106 a guideline; everything else remains untouched ( f is an H coalgebra homomorphism from (NA;q A ) to (NB;q B ) In short, the morphism f is the redecoration function corresponding to f as a redecoration rule. Gibbons [Gib93] calls f the upwards pass given by f . In the case of streams, f : NA A could be the function that extracts the 1st and 2nd elements of a stream, f : NA NA is then the function that takes a stream and returns the stream of its adjacent element pairs. The triple (N;e; is a ....
....subtrees, if it is a branching node. NA Nat then calculates the height of a given binary tree. More generally, it can be remarked that redecoration functions corresponding to recursively defined redecoration rules are a generalization of Bird and Gibbons upwards accumulations [Gib93, BdMH96] i.e. upwards passes induced by catamorphisms: if there is a morphism j : A HB B such that j = j (id A H(fst B;A e B A ) 108 then g = j j j) A H . The upwards accumulation lemma saying that (j j j) A H (j he B ; q B i hj (id A He B ) snd A;HNB i j) ....
J. Gibbons. Upwards and Downwards Accumulations on Trees. In R. S. Bird, C. C. Morgan, and J. C. P. Woodcock, eds., Proc. of 2nd Int. Conf. on Math. of Program Construction, MPC'92 (Oxford, June/July 1992), vol. 669 of Lect. Notes in Comp. Sci., 122--138. Springer-Verlag, 1993.
....data collection is parallel list and parallel skeletons are mainly map and reduce. Based on the constructive algorithmics, BMF model was extended to general algebraic data types such as trees, and parallel implementations of tree skeletons on wide range of parallel systems have been presented[7, 17, 22]. With these results, skeleton based programming becomes an efficient programming model which can extend the scope of data parallel execution to irregular data structures. This is advocated to be very useful by many researchers[18, 19] But data parallel programming using predefined skeletons is ....
Jeremy Gibbons. Upwards and downwards accumulations on trees. In R. S. Bird, C. C. Morgan, and J. C. P. Woodcock, editors, Mathematics of Program Construction, 122-138, 1993. Springer-Verlag, LNCS 699.
.... Skillicorn [Ski94] pioneered the work of making use of the constructive algorithmics [Mal89, MFP91, Fok92] an extension of Bird Meertens Formalism [Bir87] from the theory of lists to the theory of any data types, which has proved to be useful in developing efficient sequential programs [Gib92, dM92, Jeu93, BdM96] In constructive algorithmics, data types are formalized as initial algebras and operations on the data are formalized in a uniform way as homomorphisms between algebras. Skillicorn [Ski90, Ski94] proposed an architecture independent parallel cost model for some specific ....
....among elements, scan (or called accumulation) provides a mechanism to describe data communication in a structure. Scans on lists are considered as one of the two important parallel constructs in NESL [Ble92] Formal study of binary tree scans (downwards and upwards accumulations) can be found in [Gib92, BdM96] but to ensure the existence of efficient parallel implementation the complicated cooperation condition must be checked. This condition would become much more complicated when applied to more general data types. Different from the compositional formulation of polytypic scan in [Gib98] ....
[Article contains additional citation context not shown here]
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992.
.... = tup ys in (y1 z2 x2;y1(w1 z;w1 w) w1 z2;w1 w2) It is worth noting that tup can be parallelly implemented with multiple processor system supporting bidirectional tree like communication, using the time of O(log n) where n denotes the length of the input list based on the algorithm in [Ble89, Gib92]. Two passes are employed; an upward pass in the computation can A Calculational Framework for Parallelization of Sequential Programs 10 be used to compute the third component of tup xs c (in order to get the values of the underlined parts) before a downward pass is used to compute the first two ....
.... (sy; g 2 y; g 3 y) s23 ys in (g 2 xc sy (g 3 x c) g 2 xc g 2 y (g 3 x c) g 3 x g 3 y) Similar to the discussion for the final parallel program of depart, s23 can be parallelly implemented using the time of O(log n) where n denotes the length of the input list based on the algorithm in [Ble89, Gib92]. This example is taken from [Col95] where only an informal and intuitive derivation was given. Although our derived program is a bit different, it is as efficientas that in [Col95] 4.3 Conditional Structure Conditional structure is important in a recursive definition. Related work can be ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992. A Calculational Framework for Parallelization of Sequential Programs 21
....Thirdly, our accumulations is valid for any freely constructed types such as lists, trees and so on. In fact, one of our motivations for associating higher order catamorphisms with accumulations was to find a method to make downwards tree accumulations manipulable and efficient. Gibbons[9] proposed the problem and tried to solve it with the aid of catamorphisms as we do here. Catamorphisms that he referred to are first order ones, and after a complicated discussion certain conditions are turned to be necessary for downwards tree accumulation to be expressed as a catamorphism. As ....
....replaces each node with the sum of all its ancestors. Obviously, the function (f; 8; Omega ) cannot be specified by a first order catamorphism if these three operations do not satisfy certain conditions. And looking for such conditions may lead to a very complicated discussion as Gibbons did[9]. If we use a higher order catamorphism, we can describe it as follows. f; 8; Omega ) t = l 5 n] FT t f where l a ae = Leaf(ae a) n (b; u; v) ae = Node (ae b; u( ae b)8) v( ae b) Omega ) Calculating Accumulations 7 We have demonstrated its use in calculating efficient parallel ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992.
....specification. BMF has been used for deriving algorithms in several application domains including: list processing and optimization problems by Bird and de Moor [2] the Fast Fourier Transform (FFT) by G. Jones [17] calculation of recurrences by Cai and Skillicorn [4] tree algorithms by Gibbons [13], parsing by Cole [8] image processing by Harrison and Grant Duff [15] divide and conquer by the author jointly with Lengauer [14] etc. BMF seems especially promising in the area of parallel algorithms because many of its functionals have a natural parallel implementation. This aspect has been ....
J. Gibbons. Upwards and downwards accumulations on trees. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science 669, pages 122--138, 1992.
.... prune = pfold BA (T(alg s) That is, prune(empty; 0 prune(node(t; a; t 0 ) if a 2 then 0 else 1 count(t; count(t 0 ; 2 5 Accumulations Accumulations are functions that use an extra parameter to keep intermediate results to be used during the computation (see e.g. [4, 13, 14, 18]) In this section we build up a comonadic operator for a kind of downwards accumulations by adding some ingredients to the definition of pfold. For defining accumulations we can follow, essentially, the same two alternatives discussed before for functions with parameters. One is to define ....
J. Gibbons. Upwards and Downwards Accumulations on Trees. In R.S. Bird, C.C. Morgan, and J.C P. Woodcock, editors, Mathematics of Program Construction, LNCS 669. Springer-Verlag, 1993.
....is on the generality of transformation process instead of the structure of programs. Our work on calculation carrying programs was highly motivated by the success of the application of program calculation both to derivation of various kinds Calculation Carrying Programs 3 of efficient programs [Gib92, dM92, Jeu93], and to construction of some optimization passes of compilers [GLJ93, OHIT97] Particularly, it has been shown that many important program transformations such as deforestation (or fusion) tupling transformation, parallelization and accumulation can effectively and elegantly be formalized in ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992.
....within an algebraic model of divide and conquer and suggests an optimization, which is similar to ours; the tuple structure arises by a non formal argument and the result is not proved formally. A tree algorithm has been verified formally by O Donnell [23] and later derived formally by J. Gibbons [10]. Kornerup [17] arrives formally at the algorithm by Ladner and Fisher in the recursive powerlist notation. Our approach differs in that our target implementation (1) is a result of the systematic, provably correct adjustment and specialization process and (2) is obtained in an iterative form, ....
J. Gibbons. Upwards and downwards accumulations on trees. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science 669, pages 122--138, 1992.
....[Bir87, Bir89, Mal89, Bac89, Fok92] BMF, also known as constructive algorithmics, was first proposed as the theory of lists [Bir87] and was then extended to be a general theory of datatypes. It has proved to be very useful not only in deriving various kinds of efficient sequential programs [Gib92, dM92, Jeu93] but also in constructing optimization passes of compilers [GLJ93, SF93, TM95, HIT96, OHIT97, HITT97] Its success owes much to its concise description of transformation algorithms and its strong theoretical foundation based on category theory. We do believe that it is both ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. SpringerVerlag, 1992.
....for maintaining cost optimality in this case are very restrictive. 4.2 Homomorphisms A very simple D C skeleton is the homomorphism. It does not capture all D C situations, and it is defined most often for lists [7, 37] although it can also be defined for other data structures, e.g. trees [17] and arrays [33] 4.2.1 From the source program to the target program Unary function h is a list homomorphism [7] iff its value on a concatenation of two lists can be computed by combining the values of h on the two parts with some operation fi : h (x y) h x fi h y (5) The significance of ....
J. Gibbons. Upwards and downwards accumulations on trees. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science 669, pages 122--138. Springer-Verlag, 1992.
....an extension is not hard to be formulated. However, the interesting part seems to be the study of their calculational properties (We guess that their definition as unique arrows in CX will be helpful in this case as well) Finally, another direction of interest concerns the study of accumulations [Gib93, HIT96], a class of recursive functionals on inductive types that use extra parameters to accumulate intermediate results. For example, in [HIT96] they are presented as higher order catamorphisms. Our approach is to see accumulations as functionals that take extra parameters whose value may change ....
J. Gibbons. Upwards and Downwards Accumulations on Trees. In Mathematics of Program Construction, LNCS 669. Springer-Verlag, 1993.
....for DH is similar to the ascending algorithms of [10] which provides confidence that other important application algorithms can be derived in a similar way. Because of the lack of of space, we only mention the related work on divideand conquer [11] formal derivation of scan algorithms [12, 13, 14], parallelizing transformations in BMF [6] and transition from functional to parallel imperative representations [15] An extended version of the paper with the full comparison to the related work and other technical details is available in WWW from ....
J. Gibbons. Upwards and downwards accumulations on trees. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science 669, pages 122--138, 1992.
....algorithm for an unlimited number of processors has been formally verified by O Donnell [23] interestingly enough, the author cites, as one of the reasons for addressing this problem, the fact that some published parallel scan algorithms were erroneous) and later formally derived by J. Gibbons [10]. A similar two stage tree algorithm has been mapped to the mesh topology by A. Gibbons and Ziani [9] Kornerup [18] formally arrives at the algorithm by Ladner and Fisher in the recursive powerlist notation; the algorithm requires a linear number of processors and Gray encoding of the hypercube ....
J. Gibbons. Upwards and downwards accumulations on trees. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science 669, pages 122--138, 1992.
....be obvious. For example, using enough processors we can easily implement it in O(max(T (f1 ) T (f2 ) parallel time, where T (f1 ) and T (f2 ) denote the time for computing f1 and f2 respectively. Scan Formal study of binary tree scans (downwards and upwards accumulations) can be found in [Gib92, BdM96]. We have two kinds of scan: scanning a tree upwards or downwards. They will be called upward scan, denoted by scanu , and downward scan, denoted by scand , respectively. Upward scan computes sum of all elements with a binary operator 8, while keeping all running sums during upwards computation. ....
....scans. It might be difficult, even for an Nesl expert, to write an efficient program to solve our running example of bracket matching, because scans with complicated operations needs to be carefully designed. Formal study of binary tree scans (downwards and upwards accumulations) can be found in [Gib92, BdM96], but to ensure the existence of efficient parallel implementation the complicated cooperation condition must be checked. In contrast, we give a more natural definition using an explicit accumulating parameter, and simplify the condition to guarantee the existence of efficient parallel ....
J. Gibbons. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669), pages 122--138. Springer-Verlag, 1992.
No context found.
Jeremy Gibbons (1993b). Upwards and downwards accumulations on trees. In R. S.
No context found.
Jeremy Gibbons #1993b#. Upwards and downwards accumulations on trees.InR.S.
....connections are not partitioned into two groups according to direction, and it is therefore less obvious how to connect subgraphs together. With all the other initial algebra definitions of datatypes that have been explored to date, the concept of an accumulation has proved to be very powerful [13]. Essentially, an accumulation records all the partial results from the computation of a catamorphism. One application of forwards and backwards accumulations on directed acyclic graphs might be to compute earliest and latest possible finishing times for tasks in a project, in which the tasks ....
Jeremy Gibbons. Upwards and downwards accumulations on trees. In Bird et al. [3], pages 122--138. A revised version appears in the Proceedings of the Massey Functional Programming Workshop, 1992.
.... downwards accumulations on trees quickly Jeremy Gibbons Abstract. Downwards accumulations on binary trees are essentially functions which pass information down a tree, from the root towards the leaves. Under certain conditions, a downwards accumulation is both efficient (computable in a functional style in parallel time proportional to the depth of ....
.... and Fischer, 1980) is simply an upwards accumulation followed by a downwards accumulation; ffl attribute grammars (Knuth, 1968) can be completely evaluated in two passes by performing an upwards followed by a downwards accumulation using continuations (Gibbons, 1991) Copyright c fl1995 Jeremy Gibbons. Author s address: Dept of Computer Science, University of Auckland, Private Bag 92019, Auckland, New Zealand. Email: jeremy cs.auckland.ac.nz. An earlier version of this paper appears in the Proceedings of the 16th Australian Computer Science Conference, Brisbane, February 1993, and is also ....
[Article contains additional citation context not shown here]
Jeremy Gibbons (1993). Upwards and downwards accumulations on trees. In R. S.
No context found.
J. Gibbons, "Upwards and downwards accumulations on trees", In Proceedings of the Conference on Mathematics of Program Construction, Oxford, UK, 1992, pages 122--138.
No context found.
) Gibbons, J. Upwards and downwards accumulations on trees. In Mathematics of Program Construction (LNCS 669) (1992), Springer-Verlag, pp. 122--138.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC