Skip to main content

Term matching on parallel computers

  • Parallel And Distributed Computing
  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1987)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 267))

Included in the following conference series:

Abstract

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(n 1−∈) processors and takes O(n εlog n) time. If ε=0 the same algorithm will run in O(log 2 n) time. The only other known parallel algorithm for this problem is due to Dwork, Kanellakis and Stockmeyer that requires O(n 2) processors and takes either O(log n) or O(log 2 n) 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.

Research supported in part by NSF under grant number ECS-84-04399 and in part by ONR under contract N00014-84-K-0530

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho and M. V. Ganapathi, Efficient Tree Pattern Matching: an Aid to Code Generation, Proceedings of the Eleventh Annual ACM Symposium on Principles of, Programming Languages pp. 334–340.

    Google Scholar 

  2. A. V. Aho, J. E. Hopcroft and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley Reading, MA, 1974.

    Google Scholar 

  3. I. Bar-On and U. Vishkin, Optimal Parallel Generation of a Computation Tree Form, ACM Transactions on Programming Languages and Systems, Vol 7, No 2, April 1985, pp. 348–357.

    Google Scholar 

  4. R. P. Brent, The Parallel Evaluation of General Arithmetic Expressions, JACM 21,2 (1974), pp. 201–206.

    Article  Google Scholar 

  5. David R. Chase, An Improvement to Bottom-up Tree Pattern Matching, Fourteenth Annual ACM Symposium on Principles of Programming Languages Munich, West Germany, Jan 1987.

    Google Scholar 

  6. E. Dekel and S. Sahni, Parallel Generation of Postfix and Tree Forms, ACM Transactions on Programming Languages and Systems, Vol 5, No 3, (1983) pp. 300–317.

    Google Scholar 

  7. C. Dwork, P. Kanellakis and J. C. Mitchell, On the Sequential Nature of Unification, Journal of Logic Programming, 1, (1984) pp. 35–50.

    Article  Google Scholar 

  8. C. Dwork, P. Kanellakis and L. Stockmeyer, Parallel Algorithm for Term Matching, Eighth Conference on Automated Deduction July 1986, Oxford University, July 1986.

    Google Scholar 

  9. S. Fortune and J. Wyllie, Parallelism in Random Access Machines, Proceedings of Tenth ACM STOC, 1978 pp. 114–118.

    Google Scholar 

  10. C. M. Hoffman and M. J. O'Donnell, Pattern Matching in Trees, JACM 29, 1, 1982 pp. 68–95.

    Article  Google Scholar 

  11. D. S. Hirschberg, A. K. Chandra and D. V. Sarwate, Computing Connected Components on Parallel Computers, CACM, 22, 8 (1979), pp. 461–464.

    Google Scholar 

  12. C. P. Kruskal, L. Rudolph and M. Snir, Efficient Parallel Algorithms for Graph problems, Proceeding 1986 International Conference on Parallel Processing, pp. 180–185.

    Google Scholar 

  13. J. Maluszynski and H. J. Komorowski, Unification-Free Execution of Horn-Clause Programs, Proceedings of Second Logic Symposium, July 1985, pp. 78–86.

    Google Scholar 

  14. G. Miller and J. H. Reif, Parallel Tree Contraction and its Application, Proceedings of 26th IEEE FOCS Oct 1985, pp. 478–489.

    Google Scholar 

  15. D. Nath and S. N. Maheshwari, Parallel Algorithms for The Connected Components and Minimal Spanning Tree Problems, Information Processing Letters 12, 1 pp. 7–11.

    Google Scholar 

  16. M. S. Paterson and M. N. Wegman, Linear Unification JCSS, 16, (1978) pp. 158–167.

    Google Scholar 

  17. J. A. Robinson, A Machine Oriented Logic Based on The Resolution Principle, JACM, 12, (1965) pp. 23–41.

    Article  Google Scholar 

  18. R. E. Tarjan and U. Vishkin, Finding Bi-Connected Components and Computing Tree Functions in Logarithmic Parallel Time, Proceedings 25th IEEE FOCS 1984 pp. 12–20.

    Google Scholar 

  19. R. M. Verma, T. Krishnaprasad, I.V. Ramakrishnan, An Efficient Parallel Algorithm for Term Matching, Sixth International Conference on Foundations of Software Technology and Theoretical Computer Science, Lecture notes in Computer Science 241, Springer-Verlag, December 1986, pp. 504–518

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Thomas Ottmann

Rights and permissions

Reprints and permissions

Copyright information

© 1987 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ramesh, R., Verma, R.M., Krishnaprasad, T., Ramakrishnan, I.V. (1987). Term matching on parallel computers. In: Ottmann, T. (eds) Automata, Languages and Programming. ICALP 1987. Lecture Notes in Computer Science, vol 267. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-18088-5_28

Download citation

  • DOI: https://doi.org/10.1007/3-540-18088-5_28

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-18088-3

  • Online ISBN: 978-3-540-47747-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics