Application of the Polytope Model to Functional Programs

  • Nils Ellmenreich
  • Christian Lengauer
  • Martin Griebl
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1863)


We propose an approach to the static parallelization of functional programs. In past work, implicit parallelism in functional programs has mostly been dynamic, i.e., implemented by parallel graph reduction. In a special application domain, scientific computing, a static parallelization method has been successful, which is based on a mathematical execution model, the polytope model. Since scientific computations are usually phrased imperatively, the study of the polytope model has focused on imperative programs. We show that the polytope model also applies to functional programs.

We describe the prerequisites for adapting the polytope model to Haskell, a non-strict functional language. Automatically generated parallel code in a subset of Haskell consists of instructions for an abstract parallel machine (APM). In future work, APM code can be translated further to native code for a parallel machine.

We demonstrate a parallelization in the polytope model on a functional program for LU decomposition.


Loop Nest Functional Program Source Program Functional Language Index Space 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    G. E. Blelloch, S. Chatterjee, J. C. Hardwick, J. Sipelstein, and M. Zagha. Implementation of a portable nested data-parallel language. In Principles and Practices of Parallel Programming, pages 102–111, 1993.Google Scholar
  2. 2.
    A. P. W. Böhm, R. R. Oldehoeft, D. C. Cann, and J. T. Feo. SISAL Reference Manual, Language Version 2.0. Colorado State University-Lawrence Livermore National Laboratory, 1992.Google Scholar
  3. 3.
    M. C. Chen. Placement and interconnection of systolic processing elements: A new LU-decomposition algorithm. In Proc. IEEE Int. Conf. on Computer Design (ICCD’86), pages 275–281. IEEE Press, 1986.Google Scholar
  4. 4.
    M. C. Chen, Y. Choo, and J. Li. Crystal: Theory and pragmatics of generating efficient parallel code. In B. K. Szymanski, editor, Parallel Functional Languages and Compilers, Frontier Series, chapter 7. ACM Press, 1991.Google Scholar
  5. 5.
    J.-F. Collard. Automatic parallelization of while-loops using speculative execution. Int. J. Parallel Programming, 23(2):191–219, 1995.CrossRefGoogle Scholar
  6. 6.
    M. Dion and Y. Robert. Mapping affine loop nests: New results. In B. Hertzberger and G. Serazzi, editors, High-Performance Computing & Networking (HPCN’95), LNCS 919, pages 184–189. Springer-Verlag, 1995.CrossRefGoogle Scholar
  7. 7.
    N. Ellmenreich, M. Griebl, and C. Lengauer. Applicability of the polytope model to functional programs. In H. Kuchen, editor, Proc. 7th Int. Workshop on Functional and Logic Programming. Institut für Wirtschaftsinformatik, Westf. Wilhelms-Universität Münster, Apr. 1998.Google Scholar
  8. 8.
    P. Feautrier. Some efficient solutions to the affine scheduling problem. Part I. One-dimensional time. Int. J. Parallel Programming, 21(5):313–348, 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    P. Feautrier. Toward automatic distribution. Parallel Processing Letters, 4(3):233–244, 1994.CrossRefGoogle Scholar
  10. 10.
    P. Feautrier. Automatic parallelization in the polytope model. InG.-R. Perrin and A.. Darte, editors, The Data Parallel Programming Model, LNCS 1132, pages 79–103. Springer-Verlag, 1996.Google Scholar
  11. 11.
    C. F. Gerald. Applied Numerical Analysis. Addison-Wesley, 2nd edition, 1978.Google Scholar
  12. 12.
    M. Griebl and C. Lengauer. The loop parallelizer LooPo—Announcement. In D. Sehr, U. Banerjee, D. Gelernter, A. Nicolau, and D. Padua, editors, Languages and Compilers for Parallel Computing (LCPC’96), LNCS 1239, pages 603–604. Springer-Verlag, 1997.CrossRefGoogle Scholar
  13. 13.
    M. Griebl, C. Lengauer, and S. Wetzel. Code generation in the polytope model. In Proc. Int. Conf. on Parallel Architectures and Compilation Techniques (PACT’98), pages 106–111. IEEE Computer Society Press, 1998.Google Scholar
  14. 14.
    C. A. Herrmann and C. Lengauer. On the space-time mapping of a class of divide-and-conquer recursions. Parallel Processing Letters, 6(4):525–537, 1996.CrossRefMathSciNetGoogle Scholar
  15. 15.
    C. A. Herrmann and C. Lengauer. Transformation of divide & conquer to nested parallel loops. In H. Glaser, P. Hartel, and H. Kuchen, editors, Programming Languages: Implementation, Logics, and Programs (PLILP’97), LNCS 1292, pages 95–109. Springer-Verlag, 1997.CrossRefGoogle Scholar
  16. 16.
    F. Irigoin and R. Triolet. Supernode partitioning. In Proceedings of the Fifteenth Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pages 319–329. ACM, 1988.Google Scholar
  17. 17.
    H. Le Verge, C. Mauras, and P. Quinton. The ALPHA language and its use for the design of systolic arrays. J. VLSI Signal Processing, 3:173–182, 1991.CrossRefGoogle Scholar
  18. 18.
    C. Lengauer. Loop parallelization in the polytope model. In E. Best, editor, CONCUR’93, Lecture Notes in Computer Science 715, pages 398–416. Springer-Verlag, 1993.Google Scholar
  19. 19.
    H.-W. Loidl and P. W. Trinder. Engineering large parallel functional programs. In C. Clack, K. Hammond, and T. Davie, editors, Implementation of Functional Languages (IFL 97), LNCS 1467. Springer-Verlag, September1997.Google Scholar
  20. 20.
    R. S. Nikhil. Id (Version 90.1) Reference Manual. CSG-Memo-284-2, MIT, Computation Structures Group, 1991.Google Scholar
  21. 21.
    R. S. Nikhil, Arvind, J. Hicks, S. Aditya, L. Augustsson, J.-W. Maessen, and Y. Zhou. pH Language Reference Manual, Version 1.0. CSG-Memo-369, Computation Structures Group, MIT, 1995.Google Scholar
  22. 22.
    J. O’Donnell and G. Rünger. A methodology for deriving abstract parallel programs with a family of parallel abstract machines. In C. Lengauer, M. Griebl, and S. Gorlatch, editors, EuroPar’97: Parallel Processing, LNCS 1300, pages 662–669. Springer-Verlag, 1997.CrossRefGoogle Scholar
  23. 23.
    S. Peyton-Jones and J. Hughes editors. Haskell 98, A Non-Strict, Purely Functional Language, February 1999.
  24. 24.
    R. Plasmeijer and M. v. Eekelen. Functional Programming and Parallel Graph Rewriting. International Computer Science Series. Addison-Wesley, 1993.Google Scholar
  25. 25.
    P. Quinton, S. Rajopadhye, and D. Wilde. Derivation of data parallel code from a functional program. In Proc. 9th Int. Parallel Processing Symposium (IPPS’95), pages 766–772. IEEE Computer Society Press, Apr. 1995.Google Scholar
  26. 26.
    D. K. Wilde. From alpha to Imperative Code: A Transformational Compiler for an Array Based Functional Language. PhD thesis, Department of Computer Science,Oregon State University, July 1995.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Nils Ellmenreich
    • 1
  • Christian Lengauer
    • 1
  • Martin Griebl
    • 1
  1. 1.Fakultät für Mathematik und InformatikUniversität PassauUSA

Personalised recommendations