Parallelization with Tree Skeletons

  • Kiminori Matsuzaki
  • Zhenjiang Hu
  • Masato Takeichi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2790)


Trees are useful data structures, but to design efficient parallel programs over trees is known to be more difficult than to do over lists. Although several important tree skeletons have been proposed to simplify parallel programming on trees, few studies have been reported on how to systematically use them in solving practical problems; it is neither clear how to make a good combination of skeletons to solve a given problem, nor obvious even how to find suitable operators used in a single skeleton. In this paper, we report our first attempt to resolve these problems, proposing two important transformations, the tree diffusion transformation and the tree context preservation transformation. The tree diffusion transformation allows one to use familiar recursive definitions to develop his parallel programs, while the tree context preservation transformation shows how to derive associative operators that are required when using tree skeletons. We illustrate our approach by deriving an efficient parallel program for solving a nontrivial problem called the party planning problem, the tree version of the famous maximum-weight-sum problem.


Parallel Skeletons Tree Algorithms Parallelization Program Transformation Algorithm Derivation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Chin, W.N., Takano, A., Hu, Z.: Parallelization via context preservation. IEEE Computer Society International Conference on Computer Languages (ICCL 1998), May 1998, pp. 153–162 (1998)Google Scholar
  2. 2.
    Cole, M.: Parallel programming, list homomorphisms and the maximum segment sum problems. Report CSR-25-93, Department of Computing Science, The University of Edinburgh (May 1993)Google Scholar
  3. 3.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  4. 4.
    Gibbons, J.: Algebras for Tree Algorithms. PhD thesis, Programming Research Group, Oxford University, Available as Technical Monograph PRG-94 (1991)Google Scholar
  5. 5.
    Gibbons, J.: Computing downwards accumulations on trees quickly. In: Gupta, G., Mohay, G., Topor, R. (eds.) Proceedings of 16th Australian Computer Science Conference, February 1993. Australian Computer Science Communications, vol. 15 (1), pp. 685–691 (1993)Google Scholar
  6. 6.
    Gorlatch, S.: Systematic efficient parallelization of scan and other list homomorphisms. In: Fraigniaud, P., Mignotte, A., Robert, Y., Bougé, L. (eds.) Euro-Par 1996. LNCS, vol. 1124, pp. 401–408. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  7. 7.
    Hu, Z., Iwasaki, H., Takeichi, M.: Construction of list homomorphisms by tupling and fusion. In: Penczek, W., Szałas, A. (eds.) MFCS 1996. LNCS, vol. 1113, pp. 407–418. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  8. 8.
    Hu, Z., Takeichi, M., Iwasaki, H.: Diffusion: Calculating efficient parallel programs. In: 1999 ACM SIGPLAN Workshop on Partial Evaluation and Semantics- Based Program Manipulation (PEPM 1999), San Antonio, Texas, January 1999. BRICS Notes Series NS-99-1, pp. 85–94 (1999)Google Scholar
  9. 9.
    Peyton Jones, S., Hughes, J. (eds.): Haskell 98: A Non-strict, Purely Functional Language (February 1999), Available online:
  10. 10.
    Matsuzaki, K., Hu, Z., Takeichi, M.: Implementation of parallel tree skeletons on distributed systems. In: Proceedings of The Third Asian Workshop on Programming Languages And Systems, Shanghai, China, pp. 258–271 (2002)Google Scholar
  11. 11.
    Matsuzaki, K., Hu, Z., Takeichi, M.: Parallelization with tree skeletons. Technical Report METR 2003-21, Mathematical Informatics, Graduate School of Information Science and Technology, University of Tokyo (2003)Google Scholar
  12. 12.
    Reid-Miller, M., Miller, G.L., Modugno, F.: List ranking and parallel tree contraction. In: Reif, J.H. (ed.) Synthesis of Parallel Algorithms, ch. 3, pp. 115–194. Morgan Kaufmann Publishers, San Francisco (1996)Google Scholar
  13. 13.
    Skillicorn, D.B.: Foundations of Parallel Programming. Cambridge University Press, Cambridge (1994)CrossRefGoogle Scholar
  14. 14.
    Skillicorn, D.B.: Parallel implementation of tree skeletons. Journal of Parallel and Distributed Computing 39(2), 115–125 (1996)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Kiminori Matsuzaki
    • 1
  • Zhenjiang Hu
    • 1
    • 2
  • Masato Takeichi
    • 1
  1. 1.Graduate School of Information Science and TechnologyUniversity of TokyoJapan
  2. 2.PRESTO21Japan Science and Technology CorporationJapan

Personalised recommendations