Skip to main content
Log in

On regular tree languages and deterministic pushdown automata

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

The theory of formal string languages and of formal tree languages are both important parts of the theory of formal languages. Regular tree languages are recognized by finite tree automata. Trees in their postfix notation can be seen as strings. This paper presents a simple transformation from any given (bottom-up) finite tree automaton recognizing a regular tree language to a deterministic pushdown automaton accepting the same tree language in postfix notation. The resulting deterministic pushdown automaton can be implemented easily by an existing parser generator because it is constructed for an LR(0) grammar, and its size directly corresponds to the size of the deterministic finite tree automaton. The class of regular tree languages in postfix notation is a proper subclass of deterministic context-free string languages. Moreover, the class of tree languages which are in their postfix notation deterministic context-free string languages is a proper superclass of the class of regular tree languages.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aho A.V., Ullman J.D.: The Theory of Parsing, Translation and Compiling, vol. 1: Parsing, vol. 2: Compiling. Prentice Hall, New York (1972)

    Google Scholar 

  2. Aho A.V., Sethi R., Ullman J.D.: Compilers: Principles, Techniques, and Tools. Addison Wesley, Reading, Mass (1986)

    Google Scholar 

  3. Alblas, H., Melichar, B. (eds): Attribute Grammars, Applications and Systems. LNCS 545. Springer, Berlin (1991)

    Google Scholar 

  4. Alur, R.: Marrying words and trees. In: 26th ACM symposium on principles of database systems, pp. 233–242. ACM, New York (2007)

  5. Alur, R., Madhusudan, P.: Visibly pushdown languages. In: 36th ACM symposium on theory of computing, pp. 202–211. ACM, New York (2004)

  6. Arbology www pages: Available on: http://www.arbology.org. Aug (2009)

  7. Aycock J., Horspool N., Janoušek J., Melichar B.: Even faster generalized LR parsing. Acta Inform. 37(9), 633–651 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  8. Bison-GNU parser generator: Available on: http://www.gnu.org/software/bison/. May (2008)

  9. Chase, D.: An improvement to bottom up tree pattern matching. In: Proceedings of 14th annual ACM symposium on principles of programming languages, pp. 168–177 (1987)

  10. Cleophas, L.: Tree algorithms. Two taxonomies and a toolkit. Ph.D. thesis, Technische Universiteit Eindhoven, Eindhoven (2008)

  11. Comon, H., Dauchet, M., Gilleron, R., Löding, C., Jacquemard, F., Lugiez, D., Tison, S., Tommasi, M.: Tree Automata Techniques and Applications. Available on: http://www.grappa.univ-lille3.fr/tata (2007). Release 12 Oct 2007

  12. Crochemore, M., Hancart, Ch.: Automata for matching patterns. In: Linear Modeling: Backgroung and Application. Handbook of Formal Languages, vol. 2, pp. 399–462. Springer, Berlin, Heidelberg (1997)

  13. Crochemore M., Rytter W.: Jewels of Stringology. World Scientific, New Jersey (1994)

    Google Scholar 

  14. Deransart, P., Jourdan, M. (eds): Attribute Grammars and Their Applications. LNCS 461. Springer, Berlin (1990)

    Google Scholar 

  15. Engelfriet, J.: Tree Automata and Tree Grammars. Lecture Notes. DAIMI FN-IO, University of Aarhus, Denmark (1975)

  16. Ferdinand Ch., Seidl H., Wilhelm R.: Tree automata for code selection. Acta Inform. 31(8), 741–760 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  17. Fleuri, T., Janoušek, J., Melichar, B.: Subtree matching by deterministic pushdown automata. In: Proceedings of WAPL’09 Conference, Mragowo (2009)

  18. Fraser Ch.W., Hanson D.A., Proebsting T.A.: Engineering a simple, efficient code generator generator. ACM Lett. Program. Lang. Sys. 1, 3, 213–226 (1992)

    Article  Google Scholar 

  19. Fraser Ch.W., Henry R.R., Proebsting T.A.: BURG: fast optimal instruction selection and tree parsing. ACM SIGPLAN Notices 27, 68–76 (1992)

    Article  Google Scholar 

  20. Gecseg F.: Tree Automata. Akademiai Kiado, Budapest (1984)

    MATH  Google Scholar 

  21. Gecseg, F., Steinby, M.: Tree languages. In: Beyond Words. Handbook of Formal Languages, vol. 3, pp. 1–68. Springer, Berlin, Heidelberg (1997)

  22. Glanville, R.S., Graham, S.L.: A new approach to compiler code generation. In: Proceedings of 5th ACM Symposium on Principles of Programming Languages, pp. 231–240 (1978)

  23. Hemerik C., Katoen J.P.: Bottom-up tree acceptors. Sci. Comput. Program. 13(1), 51–72 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  24. Hoffmann C.M., O’Donnell M.J.: Pattern matching in trees. J. ACM 29(1), 68–95 (1982)

    Article  MATH  MathSciNet  Google Scholar 

  25. Hopcroft J.E., Motwani R., Ullman J.D.: Introduction to Automata Theory, Languages, and Computation. 2nd edn. Addison-Wesley, New York (2001)

    MATH  Google Scholar 

  26. Janoušek, J.: String suffix automata and subtree pushdown automata. In: Proceedings of the Prague Stringology Conference 2009, pp. 160–172. Czech Technical University in Prague, Prague (2009)

  27. Janoušek, J., Melichar, B.: Subtree and tree pattern pushdown automata for trees in prefix notation. Submitted for publication (2009)

  28. Johnson, S.: Yacc-yet another compiler compiler. Tech. Rep. TR 32, AT & T, Bell Laboratories, New Jersey (1975)

  29. Kamimura T., Slutzki G.: Parallel and two-way automata on directed ordered acyclic graphs. Inform. Control 49(1), 10–51 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  30. Klarlund, N., Damgaard, N., Schwartzbach, M.I.: YakYak: parsing with logical side constraints. In: Developments in Language Theory, Foundations, Applications, and Perspectives, pp. 286–301. World Scientific, New Jersey (2000)

  31. Kron, H.: Tree templates and subtree transformational grammars. Ph.D. thesis, University of California, Santa Cruz (1975)

  32. London Stringology Days 2009 Conference presentations: Available on: http://www.dcs.kcl.ac.uk/events/LSD&LAW09/ (2009). King’s College London, Feb 2009

  33. Madhavan M., Shankar P., Siddhartha R., Ramakrishna U.: Extending Graham–Glanville techniques for optimal code generation. ACM Trans. Program. Lang. Sys. 22(6), 973–1001 (2000)

    Article  Google Scholar 

  34. Melichar, B., Holub, J., Polcar, J.: Text Searching Algorithms. Available on: http://stringology.org/athens/ (2005). Release Nov 2005

  35. Melichar, B., Janoušek, J.: Repeats in Trees by Subtree and Tree Pattern Pushdown Automata. Draft (2009)

  36. Shankar P., Gantait A., Yuvaraj A., Madhavan M.: A new algorithm for linear regular tree pattern matching. Theor. Comput. Sci. 242(1–2), 125–142 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  37. Sikkel, K., Salomaa, A. (eds.): Word, language, grammar. In: Handbook of Formal Languages, vol. 1. Springer, Berlin, Heidelberg (1997)

  38. Sikkel K., Salomaa A. (eds): Handbook of Formal Languages. Springer, Berlin, Heidelberg (1997b)

    Google Scholar 

  39. van Best, J.P.: Tree-walking automata and monadic second order logic. M.Sc. thesis, Leiden University (1998)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jan Janoušek.

Additional information

This research has been partially supported by the Czech Ministry of Education, Youth and Sports under research program MSMT 6840770014, and by the Czech Science Foundation as project No. 201/09/0807.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Janoušek, J., Melichar, B. On regular tree languages and deterministic pushdown automata. Acta Informatica 46, 533–547 (2009). https://doi.org/10.1007/s00236-009-0104-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-009-0104-9

Keywords

Navigation