Term Matching on Parallel Computers

Term matching is an important problem that arises very often in term rewriting and in functional and equational programming. In this paper, we present a new parallel algorithm for the term-matching problem on the EREW (Exclusive Read Exclusive Write) model of parallel computation. Our algorithm assumes a string representation of the two terms as its input. The string representation is first transformed into two labeled ordered trees and term matching is then performed on these two trees. If n is the length of the input terms then for any constant ∈, (0<#x2208;≤1) our algorithm uses O(n1−∈) processors and takes O(nelog n) time. If e=0 the same algorithm will run in O(log2n) time. The only other known parallel algorithm for this problem is due to Dwork, Kanellakis and Stockmeyer that requires O(n2) processors and takes either O(log n) or O(log2n) time. However, their algorithm uses the stronger CREW (Concurrent Read Exclusive Write) model of parallel computation and assumes a DAG (Directed Acyclic Graph) representation of the two terms as its input. The techniques used in our algorithm are novel and have wide applicability.

[1]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[2]  Dilip V. Sarwate,et al.  Computing connected components on parallel computers , 1979, CACM.

[3]  Cynthia Dwork,et al.  Parallel Algorithms for Term Matching , 1986, CADE.

[4]  John C. Mitchell,et al.  On the Sequential Nature of Unification , 1984, J. Log. Program..

[5]  Richard P. Brent,et al.  The Parallel Evaluation of General Arithmetic Expressions , 1974, JACM.

[6]  Christoph M. Hoffmann,et al.  Pattern Matching in Trees , 1982, JACM.

[7]  Jan Maluszynski,et al.  Unification-Free Execution of Logic Programs , 1985, SLP.

[8]  Steven Fortune,et al.  Parallelism in random access machines , 1978, STOC.

[9]  I. V. Ramakrishnan,et al.  An Efficient Parallel Algorithm for Term Matching , 1986, FSTTCS.

[10]  Robert E. Tarjan,et al.  Finding Biconnected Components and Computing Tree Functions in Logarithmic Parallel Time (Extended Summary) , 1984, FOCS.

[11]  David R. Chase,et al.  An improvement to bottom-up tree pattern matching , 1987, POPL '87.

[12]  Gary L. Miller,et al.  Parallel tree contraction and its application , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[13]  I. V. Ramakrishnan,et al.  Optimal Speedups for Parallel Pattern Matching in Trees , 1987, RTA.

[14]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[15]  S. N. Maheshwari,et al.  Parallel Algorithms for the Connected Components and Minimal Spanning Tree Problems , 1982, Inf. Process. Lett..

[16]  Mike Paterson,et al.  Linear unification , 1976, STOC '76.

[17]  Sartaj Sahni,et al.  Parallel Generation of Postfix and Tree Forms , 1983, TOPL.

[18]  Alfred V. Aho,et al.  Efficient Tree Pattern Matching: An Aid to Code Generation. , 1985 .

[19]  Uzi Vishkin,et al.  Optimal parallel generation of a computation tree form , 1985, TOPL.

[20]  I. V. Ramakrishnan,et al.  Optimal Time Bounds for Parallel Term Matching , 1988, CADE.