skip to main content
article
Free Access

Nonlinear pattern matching in trees

Authors Info & Claims
Published:01 April 1992Publication History
Skip Abstract Section

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 know 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.

References

  1. 1 AHO, A. V., HOPCROFT, J. E., AND ULLMAN, J. D. The Desigtz atzd Analysis of Computer Algorithms. Addison-Wesley, Reading, Mass, 1974. Google ScholarGoogle Scholar
  2. 2 AHO, A. V., AND CORASICK, M.J. Efficient string matching: An aid to bibliographic search. Commun. ACM 18, 6 (June 1975), 333-340. Google ScholarGoogle Scholar
  3. 3 BUCHBERGER, B., AND Loos, R. Algebraic specification, computer algebra and symbolic and algebraic computation. B. Buchberger, G. E. Collins, and R. Loos, eds. Computing Supplements Vol. 4. Springer-Verlag, New York, 1982, pp. 11-43.Google ScholarGoogle Scholar
  4. 4 CHASE, D.R. An Improvement to bottom-up tree pattern matching. In Proceedings of the ldth Annual ACM Symposium on Principles of Progranzmzng Languages (Munich, West Germany, Jan. 21-23). ACM, New York, 1987, pp. 168-177. Google ScholarGoogle Scholar
  5. 5 O'DoNNELL, M.J. Equational logic as a programming language. In Foundations of Computatzon Series. MIT Press, Cambridge, Mass., 1085. Google ScholarGoogle Scholar
  6. 6 DOWNEY, P. J., SETHI, R., AND TARJAN, R. E. Variations on the common subexpression problem. J. ACM 24, 4 (Oct. 1980), 758-771. Google ScholarGoogle Scholar
  7. 7 FUTATSUGI, K., GOGUEN, J., JOUNNAUD, J. A., ~kND MESEGUER, J. Principles of OBJ2. In Proceedings" of the 12th Annual Sympostum on Print(pies of Prograrnmb~g Languages (New Orleans, La. Jan. 14-16). ACM, New York, 1985, pp. 52-66. Google ScholarGoogle Scholar
  8. 8 GUTTAG, J., HOROWITZ, E., AND MUSSER. D. Abstract data types and software validation. Information Science Report ISI/RR-76-48. Univ. Southern California, Los Angeles, Calif, 1976.Google ScholarGoogle Scholar
  9. 9 HOFFMAN, C. M., AND O'DONNELL, M.J. Pattern matching in trees. JACM 29, 1 (Jan. 1982), 68-95. Google ScholarGoogle Scholar
  10. 10 KNUT~, D. E., AND BENDIX, P. Simple word problems in universal algebras. J. Leech, ed., In Computattonal Problems in Abstract Algebra. Pergammon Press, Oxford, England, 1970, pp. 263-297.Google ScholarGoogle Scholar
  11. 11 KaoN, H. Tree templates and subtree transformational grammars. Ph.D. Dissertation, Univ. California, Santa Cruz, Calif., 1975. Google ScholarGoogle Scholar
  12. 12 LANG, H., SCHIMMLER, M., AND SCHMECK, H. Matching tree patterns sublinear on the average. Tech. Rep. Dept. of Informatik, Univ. KieI, Kiel, Germany, 1980.Google ScholarGoogle Scholar
  13. 13 M~LNER, R. A proposal for standard ML. In Proceedmgs of the ACM Syrnposmm on LISP and Functional Programming. ACM, New York, 1984, pp. 184-197. Google ScholarGoogle Scholar
  14. 14 STEYAERT, J., AND FLAJOLET, P. Patterns and pattern-matching in trees: An analysis. Inf. Coptt. 58, 1983, 19-58. Google ScholarGoogle Scholar
  15. 15 VAN LEELIWEN, J., AND OVERMARS, M.H. Rapid subtree identification revisited. Tech. Rep. CS-79-3. Univ. Utrecht, Utrecht, The Netherlands, 1979.Google ScholarGoogle Scholar

Index Terms

  1. Nonlinear pattern matching in trees

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in

                Full Access

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader