Abstract
The increasing importance of parallelism has motivated the creation of better abstractions for writing parallel software, including structured parallelism using nested algorithmic skeletons. Such approaches provide high-level abstractions that avoid common problems, such as race conditions, and often allow strong cost models to be defined. However, choosing a combination of algorithmic skeletons that yields good parallel speedups for a program on some specific parallel architecture remains a difficult task. In order to achieve this, it is necessary to simultaneously reason both about the costs of different parallel structures and about the semantic equivalences between them. This paper presents a new type-based mechanism that enables strong static reasoning about these properties. We exploit well-known properties of a very general recursion pattern, hylomorphisms, and give a denotational semantics for structured parallel processes in terms of these hylomorphisms. Using our approach, it is possible to determine formally whether it is possible to introduce a desired parallel structure into a program without altering its functional behaviour, and also to choose a version of that parallel structure that minimises some given cost model.
- F. Baader and T. Nipkow. Term Rewriting and All That. Cambridge University Press, 1998. Google Scholar
Digital Library
- Y.-Y. Chi and S.-C. Mu. Constructing List Homomorphisms from Proofs. In Proc. APLIAS ’11: Asian Symposium on Programming Languages & Systems, pages 74–88. 2011. Google Scholar
Digital Library
- M. I. Cole. Algorithmic Skeletons: Structured Management of Parallel Computation. Pitman, London, 1989. Google Scholar
Digital Library
- J. Fischer and S. Gorlatch. Turing Universality of Recursive Patterns for Parallel Programming. Parallel Processing Letters, 12(02):229– 246, 2002.Google Scholar
Cross Ref
- M. M. Fokkinga and E. Meijer. Program Calculation Properties of Continuous Algebras. Technical Report, CWI, 1991.Google Scholar
- A. Geser and S. Gorlatch. Parallelizing Functional Programs by Generalization. Journal of Functional Programming (JFP), 9(06): 649–673, 1999. Google Scholar
Digital Library
- N. Ghani. βη-Equality for Coproducts. In Proc. International Conf. on Typed Lambda Calculi and Applications, pages 171–185. 1995. Google Scholar
Digital Library
- J. Gibbons. Computing Downwards Accumulations on Trees Quickly. Theoretical Computer Science, 169(1):67–80, 1996. Google Scholar
Digital Library
- J. Gibbons. The Third Homomorphism Theorem. Journal of Functional Programming (JFP), 6(4):657–665, 1996.Google Scholar
- J. Gibbons. Calculating Functional Programs. In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, pages 151–203. 2002. Google Scholar
Digital Library
- S. Gorlatch. Extracting and Implementing List Homomorphisms in Parallel Program Development. Science of Computer Programming, 33(1):1 – 27, 1999. Google Scholar
Digital Library
- S. Gorlatch and C. Lengauer. Parallelization of Divide-and-Conquer in the Bird-Meertens Formalism. Formal Aspects of Computing, 7(6): 663–682, 1995.Google Scholar
Cross Ref
- T. Hardin. Confluence Results for the Pure Strong Categorical Logic CCL. λ-calculi as Subsystems of CCL. Theoretical Computer Science, 65(3):291–342, 1989. Google Scholar
Digital Library
- Y. Hayashi and M. Cole. Static Performance Prediction of Skeletal Parallel Programs. Parallel Algorithms and Applications, 17(1):59– 84, 2002.Google Scholar
Cross Ref
- Z. Hu, H. Iwasaki, and M. Takechi. Formal Derivation of Efficient Parallel Programs by Construction of List Homomorphisms. ACM Transactions on Programming Languages and Systems (TOPLAS), 19 (3):444–461, 1997. Google Scholar
Digital Library
- Z. Hu, M. Takeichi, and W.-N. Chin. Parallelization in Calculational Forms. In Proc. POPL ’98: 25th ACM Symposium on Principles of Programming Languages, pages 316–328, 1998. Google Scholar
Digital Library
- J. Hughes, L. Pareto, and A. Sabry. Proving the Correctness of Reactive Systems Using Sized Types. In Proc. POPL ’96: 23rd ACM Symposium on Principles of Programming Languages, pages 410– 423, 1996. Google Scholar
Digital Library
- G. Keller and M. Chakravarty. Flattening Trees. In Proc. Euro-Par ’98: European Conference on Parallelism, pages 709–719. 1998. Google Scholar
Digital Library
- Y. Liu, Z. Hu, and K. Matsuzaki. Towards Systematic Parallel Programming over Mapreduce. In Proc. Euro-Par 2011: European Conference on Parallelism, pages 39–50. 2011. Google Scholar
Digital Library
- O. Lobachev and R. Loogen. Estimating Parallel Performance, a Skeleton-Based Approach. In Proc. HLPA ’10: Intl workshop on Highlevel Parallel Prog. and Appls., pages 25–34, 2010. Google Scholar
Digital Library
- K. Matsuzaki, Z. Hu, and M. Takeichi. Towards Automatic Parallelization of Tree Reductions in Dynamic Programming. In Proc. SPAA 2006: Symposium on Parallelism in Algorithms and Architecture, pages 39–48, 2006. Google Scholar
Digital Library
- E. Meijer, M. Fokkinga, and R. Paterson. Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire. In Proc. ICFP ’91: ACM Conf. on Functional Programming, pages 124–144, 1991. Google Scholar
Digital Library
- J. Misra. Powerlist: A Structure for Parallel Recursion. ACM Transactions on Programming Languages and Systems (TOPLAS), 16(6): 1737–1767, 1994. Google Scholar
Digital Library
- A. Morihata. A Short Cut to Parallelization Theorems. In Proc. ICFP 2013: 18th ACM Conf. on Functional Programming, pages 245–256, 2013. Google Scholar
Digital Library
- A. Morihata and K. Matsuzaki. Automatic Parallelization of Recursive Functions using Quantifier Elimination. In Proc. FLOPS ’10: Functional and Logic Programming, pages 321–336. 2010. Google Scholar
Digital Library
- K. Morita, A. Morihata, K. Matsuzaki, Z. Hu, and M. Takeichi. Automatic Inversion Generates Divide-and-Conquer Parallel Programs. In Proc. PLDI ’07: ACM Conf. on Programming Language Design and Implementation, pages 146–155, 2007. Google Scholar
Digital Library
- R. Pe˜na and C. Segura. Sized Types for Typing Eden Skeletons. In Proc. IFL ’01: Intl. Symposium on Implementation of Functional Languages, pages 1–17, 2001. Google Scholar
Digital Library
- F. A. Rabhi and S. Gorlatch. Patterns and Skeletons for Parallel and Distributed Computing. Springer, 2003. Google Scholar
Digital Library
- J. H. Reif. Synthesis of Parallel Algorithms. Morgan Kaufmann, 1993. Google Scholar
Digital Library
- D. B. Skillicorn. Models for Practical Parallel Computation. International Journal of Parallel Programming, 20(2):133–158, 1991.Google Scholar
Cross Ref
- D. B. Skillicorn. The Bird-Meertens Formalism as a Parallel Model. Springer, 1993.Google Scholar
Cross Ref
- D. B. Skillicorn and W. Cai. A Cost Calculus for Parallel Functional Programming. J. Parallel Distrib. Comput., 28(1):65–83, 1995. Google Scholar
Digital Library
- M. Steuwer, C. Fensch, S. Lindley, and C. Dubach. Generating Performance Portable Code Using Rewrite Rules. In Proc ICFP 2015: 20th ACM Conf. on Functional Prog. Lang. and Comp. Arch., pages 205–217, 2015. Google Scholar
Digital Library
- J. E. Stoy. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge, MA, USA, 1977. ISBN 0262191474. Google Scholar
Digital Library
- H. Yokouchi. Church-Rosser Theorem for a Rewriting System on Categorical Combinators. Theoretical Computer Science, 65(3):271– 290, 1989. Google Scholar
Digital Library
Index Terms
Farms, pipes, streams and reforestation: reasoning about structured parallel processes using types and hylomorphisms
Recommendations
Farms, pipes, streams and reforestation: reasoning about structured parallel processes using types and hylomorphisms
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingThe increasing importance of parallelism has motivated the creation of better abstractions for writing parallel software, including structured parallelism using nested algorithmic skeletons. Such approaches provide high-level abstractions that avoid ...
Automatically deriving cost models for structured parallel processes using hylomorphisms
Structured parallelism using nested algorithmic skeletons can greatly ease the task of writing parallel software, since common, but hard-to-debug, problems such as race conditions are eliminated by design. However, choosing the best combination of ...
Optimising the time cost of multiple groups of parallel branches with two communication nodes within parallel structure
Finding the optimal accessing order to the critical section within a parallel structure will result in saving time cost of the overall execution time of the parallel program. A parallel computation model is used to represent the detailed time cost of ...







Comments