Design and Implementation of General Tree Skeletons

Kiminori MATSUZAKI,HU Zhenjiang,Masato TAKEICHI METR
2005-01-01
Abstract:Trees are important datatypes that are often used in representing structured data such as XML. Though trees are widely used in sequential programming, it is hard to write efficient parallel programs manipulating trees of arbitrary shapes, because of their irregular and ill-balanced structures. In this paper, we propose a solution for them based on the skeletal approach, in particular for general trees of arbitrary shapes, often called rose trees. We formalize a set of skeletons (abstracted computational patterns) for rose trees based on the theory of Constructive Algorithmics. The formalization of the skeletons is an extension of those proposed for other data structures such as lists and binary trees. We then prove that the skeletons can be computed efficiently in parallel, by implementing each rose-tree skeleton in terms of parallel binary-tree skeletons for which an efficient parallel implementation is already known. To encourage users to write efficient parallel programs in terms of parallel rose-tree skeletons, we propose a systematic method for deriving efficient skeletal programs from recursively defined sequential programs. We show the expressiveness of our parallel skeletons by three non-trivial examples. We also show a practical implementation of the rose-tree skeletons by adopting function objects and the template mechanism in C++. As far as we are aware, we are the first who formalized and implemented a set of simple but expressive skeletons for rose trees.
What problem does this paper attempt to address?