Skip to main content

Left-to-right tree pattern matching

  • Conference paper
  • First Online:
Rewriting Techniques and Applications (RTA 1991)

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

Included in the following conference series:

Abstract

We propose a new technique to construct left-to-right matching automata for trees. Our method is based on the novel concept of prefix unifcation which is used to compute a certain closure of the pattern set. From the closure a kind of deterministic matching automaton can be derived immediately. We also point out how to perform the construction incrementally which makes our approach suitable for applications in which pattern sets change dynamically, such as in the Knuth-Bendix completion algorithm.

Our method, like most others, is restricted to linear patterns (the case of non-linear matching can be handled as usual by checking the consistency of variable bindings in a separate pass following the matching phase).

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. Augustsson, Lennart: Compiling pattern matching. Proc. Functional Programming Languages and Architectures '85. Berlin (etc.): Springer, 1985, pp. 369–381. (Lecture Notes in Computer Science 201).

    Google Scholar 

  2. Birkhoff, G.: Lattice theory. New York: American Mathematical Society, 1948.

    Google Scholar 

  3. Christian, Jim: Fast Knuth-Bendix completion: summary. Proc. Rewriting Techniques and Applications '89. Berlin (etc.): Springer, 1989, pp. 551–555. (Lecture Notes in Computer Science 355).

    Google Scholar 

  4. Gécseg, Ferenc; Magnus Steinby: Tree automata. Budapest: Akadémia Kiadó, 1984.

    Google Scholar 

  5. Gräf, Albert: Efficient pattern matching for term rewriting. Johannes Gutenberg-Universität Mainz, 1990. (Technical Report 3/90).

    Google Scholar 

  6. Hemerik, C.; J.P. Katoen: Bottom-up tree acceptors. Science of Computer Programming, 13, 1989, pp. 51–72.

    Google Scholar 

  7. Hoffmann, C.M.; M.J. O'Donnell: Pattern matching in trees. Journal of the ACM, 29, 1, 1982, pp. 68–95.

    Google Scholar 

  8. Knuth, D.E.; P.B. Bendix: Simple word problems in universal algebras. Proc. of the Conference on Computational Problems in Abstract Algebra 1967. Oxford: Pergamon Press, 1970, pp. 263–298.

    Google Scholar 

  9. Laville, A.: Implementation of lazy pattern matching algorithms. Proc. European Symposium on Programming '88. Berlin (etc.): Springer, 1988, pp. 298–316. (Lecture Notes in Computer Science 300).

    Google Scholar 

  10. Peyton Jones, Simon L.: The implementation of functional programming languages. Englewood Cliffs, N.J. (etc.): Prentice Hall, 1987. (International Series in Computer Science).

    Google Scholar 

  11. Schnoebelen, Ph.: Refined compilation of pattern matching for functional languages. Science of Computer Programming, 11, 1988, pp. 133–159.

    Google Scholar 

  12. Toyama, Yoshihito: Fast Knuth-Bendix completion with a term rewriting system compiler. Information Processing Letters, 32, 1989, pp. 325–328.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ronald V. Book

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gräf, A. (1991). Left-to-right tree pattern matching. In: Book, R.V. (eds) Rewriting Techniques and Applications. RTA 1991. Lecture Notes in Computer Science, vol 488. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53904-2_107

Download citation

  • DOI: https://doi.org/10.1007/3-540-53904-2_107

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-53904-9

  • Online ISBN: 978-3-540-46383-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics