Nested Regular Expressions Can Be Compiled to Small Deterministic Nested Word Automata

  • Iovka Boneva
  • Joachim Niehren
  • Momar SakhoEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12159)


We study the problem of whether regular expressions for nested words can be compiled to small deterministic nested word automata (NWAs). In theory, we obtain a positive answer for small deterministic regular expressions for nested words. In practice of navigational path queries, nondeterministic NWAs are obtained for which NWA determinization explodes. We show that practical good solutions can be obtained by using stepwise hedge automata as intermediates.


Automata Regular expressions Nested words XPath 


  1. 1.
    Alur, R.: Marrying words and trees. In: 26th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 233–242. ACM Press (2007).
  2. 2.
    Alur, R., Kumar, V., Madhusudan, P., Viswanathan, M.: Congruences for visibly pushdown languages. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 1102–1114. Springer, Heidelberg (2005). Scholar
  3. 3.
    Alur, R., Madhusudan, P.: Visibly pushdown languages. In: 36th ACM Symposium on Theory of Computing, pp. 202–211. ACM Press (2004).
  4. 4.
    Benedikt, M., Jeffrey, A., Ley-Wild, R.: Stream firewalling of XML constraints. In: ACM SIGMOD International Conference on Management of Data, pp. 487–498. ACM Press (2008)Google Scholar
  5. 5.
    Bozzelli, L., Sánchez, C.: Visibly rational expressions. Acta Inf. 51(1), 25–49 (2014). Scholar
  6. 6.
    Brüggemann-Klein, A.: Regular expressions into finite automata. Theor. Comput. Sci. 120(2), 197–213 (1993). Scholar
  7. 7.
    Brüggemann-Klein, A., Wood, D.: One-unambiguous regular languages. Inf. Comput. 142(2), 182–206 (1998)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Carme, J., Niehren, J., Tommasi, M.: Querying unranked trees with stepwise tree automata. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 105–118. Springer, Heidelberg (2004). Scholar
  9. 9.
    Champavère, J., Gilleron, R., Lemay, A., Niehren, J.: Efficient inclusion checking for deterministic tree automata and XML schemas. Inf. Comput. 207(11), 1181–1208 (2009). Scholar
  10. 10.
    Comon, H., et al.: Tree automata techniques and applications, October 2007. Accessed 1997
  11. 11.
    D’Antoni, L., Alur, R.: Symbolic visibly pushdown automata. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 209–225. Springer, Cham (2014). Scholar
  12. 12.
    Debarbieux, D., Gauwin, O., Niehren, J., Sebastian, T., Zergaoui, M.: Early nested word automata for XPath query answering on XML streams. Theor. Comput. Sci. 578, 100–125 (2015). Scholar
  13. 13.
    Fischer, M.J., Ladner, R.E.: Propositional dynamic logic of regular programs. J. Comput. Syst. Sci. 18(2), 194–211 (1979). Scholar
  14. 14.
    Franceschet, M.: XPathMark performance test. Accessed 30 Mar 2020
  15. 15.
    Gauwin, O., Niehren, J.: Streamable fragments of forward XPath. In: Bouchou-Markhoff, B., Caron, P., Champarnaud, J.-M., Maurel, D. (eds.) CIAA 2011. LNCS, vol. 6807, pp. 3–15. Springer, Heidelberg (2011). Scholar
  16. 16.
    Gauwin, O., Niehren, J., Tison, S.: Earliest query answering for deterministic nested word automata. In: Kutyłowski, M., Charatonik, W., Gębala, M. (eds.) FCT 2009. LNCS, vol. 5699, pp. 121–132. Springer, Heidelberg (2009). Scholar
  17. 17.
    Gottlob, G., Koch, C., Pichler, R.: The complexity of XPath query evaluation. In: 22nd ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 179–190 (2003)Google Scholar
  18. 18.
    Grez, A., Riveros, C., Ugarte, M.: A formal framework for complex event processing. In: Barceló, P., Calautti, M. (eds.) 22nd International Conference on Database Theory, ICDT 2019. LIPIcs, Lisbon, Portugal, 26–28 March 2019, vol. 127, pp. 5:1–5:18. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2019).
  19. 19.
    Hosoya, H., Pierce, B.C.: XDuce: a statically typed XML processing language. ACM Trans. Internet Technol. 3(2), 117–148 (2003). Scholar
  20. 20.
    Martens, W., Niehren, J.: On the minimization of XML-schemas and tree automata for unranked trees. J. Comput. Syst. Sci. 73(4), 550–583 (2007). Special issue of DBPL 05MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Mozafari, B., Zeng, K., Zaniolo, C.: From regular expressions to nested words: unifying languages and query execution for relational and XML sequences. PVLDB 3(1), 150–161 (2010).
  22. 22.
    Mozafari, B., Zeng, K., Zaniolo, C.: High-performance complex event processing over XML streams. In: Candan, K.S., et al. (eds.) SIGMOD Conference, pp. 253–264. ACM (2012).
  23. 23.
    Neumann, A., Seidl, H.: Locating matches of tree patterns in forests. In: Arvind, V., Ramanujam, S. (eds.) FSTTCS 1998. LNCS, vol. 1530, pp. 134–145. Springer, Heidelberg (1998). Scholar
  24. 24.
    Olteanu, D.: SPEX: streamed and progressive evaluation of XPath. IEEE Trans. Know. Data Eng. 19(7), 934–949 (2007). Scholar
  25. 25.
    Pitcher, C.: Visibly pushdown expression effects for XML stream processing. In: PlanX (2005)Google Scholar
  26. 26.
    Thatcher, J.W.: Characterizing derivation trees of context-free grammars through a generalization of automata theory. J. Comput. Syst. Sci. 1, 317–322 (1967)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Université de LilleLilleFrance
  2. 2.Inria LilleLilleFrance

Personalised recommendations