An efficient parallel algorithm for term matching
Term matching is a compute-intensive problem that often arises in symbolic manipulation systems like term rewriting, and in functional and equational programming. A parallel algorithm for term matching on the CREW PRAM model was recently described by Dwork, Kanellakis and Stockmeyer. This algorithm requires O(n2) processors and takes either O(logn) or O(log2n) time. In this paper we describe a new parallel algorithm that performs term matching in O(log2n) time using O(n) processors. In our algorithm, we represent the two terms as labeled directed trees. We then construct equivalence classes of nodes in these two trees such that two nodes are in the same class iff they have the same sequence of edge-labels on the path to their respective roots. This is the basis of our parallel algorithm for term matching.
Unable to display preview. Download preview PDF.
- [DKM84]C. Dwork, P. Kanellakis and J. C. Mitchell, “On The Sequential Nature Of Unification”, J. Logic Programming, 1, (1984), 35–50.Google Scholar
- [DKS86]C. Dwork, P. Kanellakis and L. Stockmeyer, “Parallel Algorithms for Term Matching”, 8th Intl. Conf. on Automatic Deduction; Springer Verlag LNCS 230, July 1986, 416–430.Google Scholar
- [FoW78]S. Fortune and J. Wyllie, “Parallelism In Random Access Machines”, Proc 10th ACM Annual ACM Symp. on Theory of Computing, 1978, 114–118.Google Scholar
- [Hir78]D. S. Hirschberg, “Fast Parallel Sorting Algorithms”, Comm. ACM, 21, 8 (Aug. 1978), 657–661.Google Scholar
- [MaK85]J. Maluszynski and H. J. Komorowski, “Unifcation-free Execution Of Logic Programs”, Symposium on Logic Programming, July 1985, 78–86.Google Scholar
- [PaW78]M. S. Paterson and M. N. Wegman, “Linear Unification”, J. Computer and System Sciences, 16, (1978), 158–167.Google Scholar
- [Rob65]J. A. Robinson, “A Machine Oriented Logic Based On The Resolution Principle”, J. ACM, 12, (1965), 23–41.Google Scholar