Parallelizing functional programs by generalization

List homomorphisms are functions that are parallelizable using the divide-and-conquer paradigm. We study the problem of finding homomorphic representations of functions in the Bird–Meertens constructive theory of lists, by means of term rewriting and theorem proving techniques. A previous work proved that to each pair of leftward and rightward sequential representations of a function, based on cons- and snoc-lists, respectively, there is also a representation as a homomorphism. Our contribution is a mechanizable method to extract the homomorphism representation from a pair of sequential representations. The method is decomposed to a generalization problem and an inductive claim, both solvable by term rewriting techniques. To solve the former we present a sound generalization procedure which yields the required representation, and terminates under reasonable assumptions. The inductive claim is provable automatically. We illustrate the method and the procedure by the systematic parallelization of the scan-function (parallel prefix) and of the maximum segment sum problem.

[1]  Stef fen Lange,et al.  Towards a Set of Inference Rules for Solving Divergence in Knuth-Bendix Completion , 1989, AII.

[2]  Sergei Gorlatch,et al.  Systematic Extraction and Implementation of Divide-and-Conquer Parallelism , 1996, PLILP.

[3]  Gudula Rünger,et al.  A Methodology for Deriving Parallel Programs with a Family of Parallel Abstract Machines , 1997, Euro-Par.

[4]  Paul Hudak,et al.  Para-functional programming in Haskell , 1991 .

[5]  Jon Bentley,et al.  Programming pearls: algorithm design techniques , 1984, CACM.

[6]  Guy E. Blelloch,et al.  Scans as Primitive Parallel Operations , 1989, ICPP.

[7]  Gérard P. Huet,et al.  Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems , 1980, J. ACM.

[8]  Murray Cole,et al.  Parallel Programming with List Homomorphisms , 1995, Parallel Process. Lett..

[9]  Ulrich Fraus Term induction proofs by a generalization of narrowing , 1992 .

[10]  Salvatore Orlando,et al.  P3 L: A structured high-level parallel language, and its structured support , 1995, Concurr. Pract. Exp..

[11]  David B. Skillicorn,et al.  Associative Operators for Language Recognition , 1991, Bull. EATCS.

[12]  Alfons Geser,et al.  Mechanized Inductive Proof of Properties of a Simple Code Optimizer , 1995, TAPSOFT.

[13]  Jean-Pierre Jouannaud,et al.  Syntacticness, Cycle-Syntacticness, and Shallow Theories , 1994, Inf. Comput..

[14]  Jean-Pierre Jouannaud,et al.  Syntactic Theories , 1990, MFCS.

[15]  Hans-Wolfgang Loidl,et al.  Algorithm + strategy = parallelism , 1998, Journal of Functional Programming.

[16]  Murray Cole,et al.  Algorithmic skeletons : a structured approach to the management of parallel computation , 1988 .

[17]  Sergei Gorlatch,et al.  Systematic Efficient Parallelization of Scan and Other List Homomorphisms , 1996, Euro-Par, Vol. II.

[18]  Muffy Calder,et al.  Solving Divergence in Knuth-Bendix Completion by Enriching Signatures , 1991, Theor. Comput. Sci..

[19]  Yike Guo,et al.  Parallel skeletons for structured composition , 1995, PPOPP '95.

[20]  Douglas R. Smith Applications of a Strategy for Designing Divide-and-Conquer Algorithms , 1987, Sci. Comput. Program..

[21]  Jeremy Gibbons The Third Homomorphism Theorem , 1996, J. Funct. Program..

[22]  Richard S. Bird,et al.  Lectures on Constructive Functional Programming , 1989 .

[23]  John T. O'Donnell,et al.  A Correctness Proof of Parallel Scan , 1994, Parallel Process. Lett..

[24]  Guy E. Blelloch,et al.  NESL: A Nested Data-Parallel Language (Version 2.6) , 1993 .

[25]  David B. Skillicorn,et al.  Foundations of parallel programming , 1995 .