Skip to main content

Nonlinear pattern matching in trees

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1988)

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

Included in the following conference series:

  • 206 Accesses

Abstract

Tree pattern matching is a fundamental operation that is used in a number of programming tasks such as mechanical theorem proving, term rewriting, symbolic computation and nonprocedural programming languages. In this paper we present new sequential algorithms for nonlinear pattern matching in trees. Our algorithm improves upon known tree pattern matching algorithms in important aspects such as time performance, ease of integration with several reduction strategies and ability to avoid unnecessary computation steps on match attempts that fail. The expected time complexity of our algorithm is linear in the sum of the sizes of the two trees.

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, J. E. Hopcroft and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley Reading, MA, 1974.

    Google Scholar 

  2. A.V. Aho and M.J. Corasick, Efficient String Matching: An Aid to Bibliographic Search, CACM, Vol 18 No. 6, June 1975, pp. 333–340.

    Google Scholar 

  3. A.V. Aho and M. Ganapathy, Efficient Tree Pattern Matching: An Aid to Code Generation, Proceedings of the Eleventh ACM Symposium on Principles of Programming Languages, 1984 pp. 334–340.

    Google Scholar 

  4. R.S. Boyer and J.S. Moore, A Computational Logic, ACM Monograph Series, Academic Press 1979.

    Google Scholar 

  5. B. Buchberger and R. Loos, Algebraic Specification, Computer Algebra and Symbolic and Algebraic Computation, B. Buchberger G.E. Collins and R. Loos, ed., Computing Suppliments 4, Springer-Verlag 1982, pp 11–43.

    Google Scholar 

  6. D.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 

  7. M.J. O'Donnell, Equational Logic as a Programming Language, Foundations of Compution Series, MIT Press 1985.

    Google Scholar 

  8. P.J. Downey, R. Sethi and R.E. Tarjan, Variations on the Common Subexpression Problem, Journal of the ACM Vol 24 No. 4, 1980, pp. 758–771.

    Google Scholar 

  9. K. Futatsugi, J. Goguen, J.A. Jounnaud and J. Meseguer, Principles of OBJ2, Twelfth Annual Symposium on Principles of Programming Languages, New Orleans LA (1985).

    Google Scholar 

  10. J.A. Goguen and J. Meseguer, Equality, Types, Modules and Generics for Logic Programming, Proceedings of Second International Logic Programming Conference, Uppsala 1984, pp. 115–125.

    Google Scholar 

  11. J. Guttag, E. Horowitz and D. Musser, Abstract Data Types and Software Validation, Information Science Report ISI/RR-76-48, University of Southern California 1976.

    Google Scholar 

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

    Google Scholar 

  13. G. Huet and D. Oppen, Equations and Rewrite Rules: A survey, Formal Languages: Perspective and Open Problems, R. Book, ed., Academic Press 1980.

    Google Scholar 

  14. D. E. Knuth and P. Bendix, Simple word problems in Universal Algebras, Computational Problems in Abstract Algebra, J. Leech, ed., Pergammon Press, Oxford 1970, pp. 263–297.

    Google Scholar 

  15. H. Kron, Tree Templates and Subtree Transformational Grammars, Ph.D. Dissertation, University of California, Santa Cruz, 1975.

    Google Scholar 

  16. H. Lang, M. Schimmler and H. Schmeck, Matching Tree Patterns Sublinear on the Average, Technical Report, Dept. of Informatik, University of Kiel, W. Germany, 1980.

    Google Scholar 

  17. R. Milner, A Proposal for Standard ML, ACM Symposium on LISP and Functional Programming 1984, pp. 184–197.

    Google Scholar 

  18. J. Steyaert and P. Flajolet, Patterns and Pattern-Matching in Trees: An Analysis, Information and Control 58, 1983, pp. 19–58.

    Google Scholar 

  19. P.A. Subramanyam and J. You, FUNLOG = functions + logic: A Computational Model Integrating Functional and Logic Programming, IEEE International Symposium on Logic Prgramming 1984, pp 144–153.

    Google Scholar 

  20. J. van Leeuwen and M.H. Overmars, Rapid Subtree Identification Revisited, Technical Report CS-79-3, University of Utrecht, Netherlands, 1979.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Timo Lepistö Arto Salomaa

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ramesh, R., Ramakrishnan, I.V. (1988). Nonlinear pattern matching in trees. In: Lepistö, T., Salomaa, A. (eds) Automata, Languages and Programming. ICALP 1988. Lecture Notes in Computer Science, vol 317. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19488-6_135

Download citation

  • DOI: https://doi.org/10.1007/3-540-19488-6_135

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19488-0

  • Online ISBN: 978-3-540-39291-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics