## Parallelization via Context Preservation (1998)

Venue: | In IEEE Intl Conference on Computer Languages |

Citations: | 18 - 16 self |

### BibTeX

@INPROCEEDINGS{Chin98parallelizationvia,

author = {W N Chin and A Takano and Z Hu and Wei-ngan Chin and Akihiko Takano and Zhenjiang Hu},

title = {Parallelization via Context Preservation},

booktitle = {In IEEE Intl Conference on Computer Languages},

year = {1998},

pages = {153--162},

publisher = {IEEE CS Press}

}

### OpenURL

### Abstract

Abstract program schemes, such as scan or homomorphism, can capture a wide range of data parallel programs. While versatile, these schemes are of limited practical use on their own. A key problem is that the more natural sequential specifications may not have associative combine operators required by these schemes. As a result, they often fail to be immediately identified. To resolve this problem, we propose a method to systematically derive parallel programs from sequential definitions. This method is special in that it can automatically invent auxiliary functions needed by associative combine operators. Apart from a formalisation, we also provide new theorems, based on the notion of context preservation, to guarantee parallelization for a precise class of sequential programs. 1 Introduction It is well-recognised that a key problem of parallel computing remains the development of efficient and correct parallel software. This task is further complicated by the variety of parallel arc...

### Citations

639 |
Partial Evaluation and Automatic Program Generation. Available online: http://www.itu.dk/people/sestoft/pebook
- Jones, Gomard, et al.
- 1993
(Show Context)
Citation Context ...el programs, including those beyond homomorphism. (Sec. 6 and 7) The next section gives an informal review. 2 Generalizing from Sequential Code Most optimisation techniques, such as partial evaluation=-=[20]-=- and deforestation[27], are based on the notion of program specialisation, whose goal is to specialise programs to their specific contexts of use. However, parallelization is an entirely different bea... |

298 | Functional programming with bananas, lenses, envelopes and barbed wire
- Meijer, Fokkinga, et al.
- 1991
(Show Context)
Citation Context ...existence of a common context and show how they lead to successful parallelization. The first theorem is a special case of the second, covering a sub-class of LSR-functions known as list catamorphism =-=[22]-=-, as opposed to the more general list paramorphism. By relying on the stated conditions for context preservations, we can show that parallel equations can be derived and later transformed to efficient... |

215 |
An introduction to the theory of lists
- Bird
- 1987
(Show Context)
Citation Context ... operators, via hom (f;\Phi) (xs)=reduce \Phi (map f (xs)), can capture a wide-range of data parallel programs. Such a composition, called append-list homomorphism (herewith referred as homomorphism) =-=[2]-=-, can be expressed as: hom (f;\Phi) ([x]) = f(x) hom (f;\Phi) (xr++xs) = hom (f;\Phi) (xr) \Phi hom (f;\Phi) (xs) In order for hom (f;\Phi) to be well-defined, its combine operators\Phi must be associ... |

176 | Implementation of a portable nested data-parallel language
- Blelloch, Chatterjee, et al.
- 1993
(Show Context)
Citation Context ...erms of a homomorphism (where last(u) returns the final element of list u), as follows: scan\Omega (xs)= hom (id;k) (xs) where f id(x)=x ; k(u,v)=u++map (last(u)\Omega ) (v) g Blelloch and co-workers =-=[3, 4]-=- have shown that scan can be used to build effective parallel programs for a wide range of problems, including important examples from the domains of numerical analysis, sorting, lexical analysis, gra... |

162 | A.: Rippling: A Heuristic for Guiding Inductive Proofs
- Bundy, Stevens, et al.
- 1993
(Show Context)
Citation Context ... these laws is based on the need to preserve the desired R-context. Apart from the heuristic of minimising both the depths and occurrences of R-holes, we can also turn to a technique, called rippling =-=[5]-=-, which has been very successful in automated theorem-proving for guiding the step case of inductive proofs. Our method is unique in its ability to synthesize parallel programs both within and beyond ... |

91 |
Architecture-Independent Parallel Computation
- Skillicorn
- 1990
(Show Context)
Citation Context ..., from vector processors to loosely-coupled distributed systems. The difficulty of parallel programming has led to calls by a number of researchers for a more declarative approach towards parallelism =-=[25, 12]-=-. Two main ideas here are an architecture-independent functional language to capture the essence of computation, and a small set of generic parallel primitives (or schemes). Two basic parallel primiti... |

73 |
Towards an automated tupling strategy
- Chin
- 1993
(Show Context)
Citation Context ...el program for poly can be written as: poly([c],x) = c poly(cr++cs,x) = poly(cr,x)+(poly(cs,x)*prod(cr,x)) prod([c],x) = x prod(cr++cs,x) = prod(cs,x)*prod(cr,x) From here, an automated tupling method=-=[7, 18]-=- would introduce ptup(cs,x)=(poly(cs,x),prod(cs,x)) before transforming to the following homomorphism. poly(cs,x) = let (u, )=ptup(cs,x) in u ptup([c],x) = (c,x) ptup(cr++cs,x) = comb2(ptup(cr,x),ptup... |

51 |
Parallelizing complex scans and reductions
- Fischer, Ghuloum
- 1994
(Show Context)
Citation Context ...ram. There is also tremendous interests in the parallelization of loops for imperative languages (e.g. Fortran). A work which is similar to our method was independently conceived by Fischer & Ghoulum =-=[13, 14]-=-. By modelling loops via functions, they noted that these function-type values could be reduced (in parallel) via associative function composition. However, the propagated function-type values can onl... |

48 | Parallel Programming using Functional Languages (Report CSC 91/R3
- Roe
- 1991
(Show Context)
Citation Context ...this problem is to constructively transform user programs to match these schemes. However, direct 8 calculations of homomorphic functions often require deep intuition and the support of ad-hoc lemmas =-=[24, 17]-=-, in order to massage the sequential definitions into having the needed associative combine operator. An alternative approach is to have programmers supply both a leftward (cons-based) and a rightward... |

42 |
Parallel programming with list homomorphisms
- Cole
- 1995
(Show Context)
Citation Context ...(cr,x),ptup(cs,x)) where comb2((p 1 ,u 1 ),(p 2 ,u 2 )) = (p 1 + p 2su 1 ,u 2su 1 ) Such mismatch between sequential and parallel programs are already recognized by a number of people, including Cole =-=[11]-=- and Gorlatch [16]. The key to obtaining a better match is the introduction of suitable auxiliary functions (such as prod) that would allow associative combine operators (such as comb2) to be expresse... |

33 |
Parallel tridiagonal equation solvers
- Stone
- 1975
(Show Context)
Citation Context ...ograms. 8 Related Work Generic program schemes have been advocated for use in structured parallel programming, both for imperative programs expressed as linear recurrences through a classic result of =-=[26]-=- and for functional programs via append-list homomorphism [25]. While extremely versatile, most sequential specifications fail to match up directly with these schemes. An approach to this problem is t... |

32 | Parallelization in calculational forms
- Hu, Takeichi, et al.
- 1998
(Show Context)
Citation Context ...emselves be used as auxiliary calls for other functions. The key idea of sharing auxiliary recursive calls via parameter abstraction (during inductive derivation) is an innovation first introduced in =-=[19]-=-. We refine this technique by addressing the type of accumulative parameters allowable for such auxiliary functions. 6 Sample Preservable R-Contexts We have presented two theorems which highlight suff... |

24 | The third homomorphism theorem
- Gibbons
- 1996
(Show Context)
Citation Context ...rator. An alternative approach is to have programmers supply both a leftward (cons-based) and a rightward (snoc-based) versions of the sequential program. This method was systematically formulated by =-=[15]-=- based on an earlier idea from Bird & Meertens, and later given a constructive procedure by Gorlatch [16]. As shown here, it is possible to parallelize systematically using only a leftward sequential ... |

19 |
Parallelism via homomorphism
- Grant-Duff, Harrison
- 1996
(Show Context)
Citation Context ...this problem is to constructively transform user programs to match these schemes. However, direct 8 calculations of homomorphic functions often require deep intuition and the support of ad-hoc lemmas =-=[24, 17]-=-, in order to massage the sequential definitions into having the needed associative combine operator. An alternative approach is to have programmers supply both a leftward (cons-based) and a rightward... |

16 | Developing a Practical Projection-Based Parallel Delaunay Algorithm
- Blelloch, Miller, et al.
- 1996
(Show Context)
Citation Context ...erms of a homomorphism (where last(u) returns the final element of list u), as follows: scan\Omega (xs)= hom (id;k) (xs) where f id(x)=x ; k(u,v)=u++map (last(u)\Omega ) (v) g Blelloch and co-workers =-=[3, 4]-=- have shown that scan can be used to build effective parallel programs for a wide range of problems, including important examples from the domains of numerical analysis, sorting, lexical analysis, gra... |

14 |
Parallelizing conditional recurrences
- Chin, Darlington, et al.
(Show Context)
Citation Context ...g techniques to convert sequential programs to linear selfrecursive form, where possible. They are (i) tupling [7], (ii) unfolding of unnecessary mutual recursion, and (iii) conditional normalisation =-=[8]-=-. These techniques are helpful in the following ways. Tupling can eliminate the redundant calls of max 1 , fib and fib' by using let abstraction to capture the duplicated calls. The unnecessary interm... |

12 | Extracting and implementing list homomorphisms in parallel program development
- Gorlatch
(Show Context)
Citation Context ... where comb2((p 1 ,u 1 ),(p 2 ,u 2 )) = (p 1 + p 2su 1 ,u 2su 1 ) Such mismatch between sequential and parallel programs are already recognized by a number of people, including Cole [11] and Gorlatch =-=[16]-=-. The key to obtaining a better match is the introduction of suitable auxiliary functions (such as prod) that would allow associative combine operators (such as comb2) to be expressed. Past proposals ... |

11 |
Flattening and parallelizing irregular applications, recurrent loop nests
- Ghuloum, Fischer
- 1995
(Show Context)
Citation Context ...ram. There is also tremendous interests in the parallelization of loops for imperative languages (e.g. Fortran). A work which is similar to our method was independently conceived by Fischer & Ghoulum =-=[13, 14]-=-. By modelling loops via functions, they noted that these function-type values could be reduced (in parallel) via associative function composition. However, the propagated function-type values can onl... |

8 |
Synthesizing parallel lemma
- Chin
- 1992
(Show Context)
Citation Context ...heir sequential counterparts. Due to this difference, we have developed a new method for parallelization based on generalizing from sequential examples. An initial (informal) proposal can be found in =-=[6]-=-. We shall outline its main steps using an accumulative version of scan. ascan\Omega ([x],w) = [w\Omega x] ascan\Omega (x:xs,w) = [w\Omega x]++ascan\Omega (xs,w\Omega x) To parallelize, we perform the... |

8 |
A.: Tupling Calculation Eliminates Multiple Traversals
- Hu, Iwasaki, et al.
- 1997
(Show Context)
Citation Context ...el program for poly can be written as: poly([c],x) = c poly(cr++cs,x) = poly(cr,x)+(poly(cs,x)*prod(cr,x)) prod([c],x) = x prod(cr++cs,x) = prod(cs,x)*prod(cr,x) From here, an automated tupling method=-=[7, 18]-=- would introduce ptup(cs,x)=(poly(cs,x),prod(cs,x)) before transforming to the following homomorphism. poly(cs,x) = let (u, )=ptup(cs,x) in u ptup([c],x) = (c,x) ptup(cr++cs,x) = comb2(ptup(cr,x),ptup... |

5 |
Deriving efficient parallel programs for complex recurrences
- Chin, Tan, et al.
- 1997
(Show Context)
Citation Context ...ith the more intricate implementation issue using divide-and-conquer programs as starting points. These works are complimentary to our proposal. Nevertheless, a serious shortcoming of earlier work in =-=[6, 10]-=- is that the methodology was largely informal. To rectify this shortcoming, this paper formalises the key steps of our method and states precisely the class of sequential programs which could be handl... |

5 |
An equational language for data parallelism
- Rao, Walinsky
- 1993
(Show Context)
Citation Context ...tions. We do not deal with the issue of mapping these programs to particular parallel architectures, nor provide suitable cost models to justify the derived programs. A number of other works, such as =-=[1, 23]-=-, have dealt with the more intricate implementation issue using divide-and-conquer programs as starting points. These works are complimentary to our proposal. Nevertheless, a serious shortcoming of ea... |

3 |
P.: Synchronisation Analyses for Multiple Recursion Parameters
- Chin, Khoo, et al.
- 1996
(Show Context)
Citation Context ...arallelization, always synchronize with the recursion parameter. A detailed discussion on parameter synchronization for 5 tupling is beyond the scope of this paper. The interested reader may refer to =-=[9]-=-. Theorem 2: Context Preservation (Paramorphism) Consider an LSR-function where context preservation hold for Es and fDs j g n i=1 : f(Nil,bv j c n j=1 ) = E z f(x : xs; bv j c n j=1 ) = Eshs j i j 2M... |

2 |
Massive parallelization of divideand -conquer algorithms over powerlists
- Achatz, Schulte
- 1996
(Show Context)
Citation Context ...tions. We do not deal with the issue of mapping these programs to particular parallel architectures, nor provide suitable cost models to justify the derived programs. A number of other works, such as =-=[1, 23]-=-, have dealt with the more intricate implementation issue using divide-and-conquer programs as starting points. These works are complimentary to our proposal. Nevertheless, a serious shortcoming of ea... |

1 |
Parallel skeletons for structured composition
- To, Yang
(Show Context)
Citation Context ..., from vector processors to loosely-coupled distributed systems. The difficulty of parallel programming has led to calls by a number of researchers for a more declarative approach towards parallelism =-=[25, 12]-=-. Two main ideas here are an architecture-independent functional language to capture the essence of computation, and a small set of generic parallel primitives (or schemes). Two basic parallel primiti... |

1 |
Deforestation: Transformingprograms to eliminate trees
- Wadler
- 1988
(Show Context)
Citation Context ... those beyond homomorphism. (Sec. 6 and 7) The next section gives an informal review. 2 Generalizing from Sequential Code Most optimisation techniques, such as partial evaluation[20] and deforestation=-=[27]-=-, are based on the notion of program specialisation, whose goal is to specialise programs to their specific contexts of use. However, parallelization is an entirely different beast as the goal is to o... |