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.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho, J. E. Hopcroft and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley Reading, MA, 1974.
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.
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.
R.S. Boyer and J.S. Moore, A Computational Logic, ACM Monograph Series, Academic Press 1979.
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.
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.
M.J. O'Donnell, Equational Logic as a Programming Language, Foundations of Compution Series, MIT Press 1985.
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.
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).
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.
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.
C.M. Hoffmann and M.J. O'Donnell, Pattern Matching in Trees, JACM 29, 1, 1982 pp. 68–95.
G. Huet and D. Oppen, Equations and Rewrite Rules: A survey, Formal Languages: Perspective and Open Problems, R. Book, ed., Academic Press 1980.
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.
H. Kron, Tree Templates and Subtree Transformational Grammars, Ph.D. Dissertation, University of California, Santa Cruz, 1975.
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.
R. Milner, A Proposal for Standard ML, ACM Symposium on LISP and Functional Programming 1984, pp. 184–197.
J. Steyaert and P. Flajolet, Patterns and Pattern-Matching in Trees: An Analysis, Information and Control 58, 1983, pp. 19–58.
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.
J. van Leeuwen and M.H. Overmars, Rapid Subtree Identification Revisited, Technical Report CS-79-3, University of Utrecht, Netherlands, 1979.
Author information
Authors and Affiliations
Editor information
Rights 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