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.
[1]
Daniel S. Hirschberg.
Fast parallel sorting algorithms
,
1978,
CACM.
[2]
John C. Mitchell,et al.
On the Sequential Nature of Unification
,
1984,
J. Log. Program..
[3]
Cynthia Dwork,et al.
Parallel Algorithms for Term Matching
,
1988,
SIAM J. Comput..
[4]
J. A. Robinson,et al.
A Machine-Oriented Logic Based on the Resolution Principle
,
1965,
JACM.
[5]
Mike Paterson,et al.
Linear unification
,
1976,
STOC '76.
[6]
Jan Maluszynski,et al.
Unification-Free Execution of Logic Programs
,
1985,
SLP.
[7]
Steven Fortune,et al.
Parallelism in random access machines
,
1978,
STOC.