Abstract
Node selecting tree automata (NSTAs) constitute a general formalism defining unary queries over trees. Basically, a node is selected by an NSTA when it is visited in a selecting state during an accepting run. We consider twig patterns as an abstraction of XPath. Since the queries definable by NSTAs form a strict superset of twig-definable queries, we study the complexity of the problem to decide whether the query by a given NSTA is twig-definable. In particular, we obtain that the latter problem is EXPTIME-complete. In addition, we show that it is also EXPTIME-complete to decide whether the query by a given NSTA is definable by a node selecting string automaton.
Similar content being viewed by others
Notes
Filter is sometimes also called predicate, e.g., in the XPath specification by the World Wide Web Consortium.
Recall that L a b e l s(r) is the set of symbols occurring in regular expressions r.
References
Albert, J., Giammerresi, D., Wood, D.: Normal form algorithms for extended context free grammars. Theor. Comput. Sci. 267(1–2), 35–47 (2001)
Antonopoulos, T., Hovland, D., Martens, W., Neven, F.: Deciding twig-definability of node selecting tree automata. In: Deutsch, A. (ed.) ICDT, pp 61–73. ACM (2012)
Benedikt, M., Fan, W., Geerts, F.: XPath satisfiability in the presence of DTDs. J. ACM 55(2) (2008)
Benedikt, M., Fan, W., Kuper, G.M.: Structural properties of XPath fragments. Theor. Comput. Sci. 336(1), 3–31 (2005)
Benedikt, M., Koch, C.: XPath leashed. ACM Comput. Surv. 41(1) (2008)
Benedikt, M., Segoufin, L.: Regular tree languages definable in FO and in FO m o d . ACM Trans. Comput. Log. 11(1) (2009)
Bojańczyk, M.: Tree-walking automata. In: International Conference on Language and Automata Theory and Applications (LATA), pp 1–2 (2008)
Bojańczyk, M., Muscholl, A., Schwentick, T., Segoufin, L.: Two-variable logic on data trees and XML reasoning. J. ACM 56(3) (2009)
Bojańczyk, M., Parys, P.: XPath evaluation in linear time. J. ACM. To appear
Bojańczyk, M., Segoufin, L.: Tree languages defined in first-order logic with one quantifier alternation. Logical Methods Comput. Sci. 6(4) (2010)
Bojańczyk, M., Walukiewicz, I.: Characterizing EF and EX tree logics. Theor. Comput. Sci. 358(2–3), 255–272 (2006)
Calvanese, D., Giacomo, G.D., Lenzerini, M., Vardi, M.Y.: Node selection query languages for trees. In: AAAI Conference on Artificial Intelligence (AAAI) (2010)
Carme, J., Niehren, J., Tommasi, M.: Querying unranked trees with stepwise tree automata. In: International Conference on Rewriting Techniques and Applications (RTA), pp. 105–118 (2004)
Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Löding, C., Tison, S., Tommasi, M.: Tree Automata Techniques and Applications. Available on http://tata.gforge.inria.fr/ (2007)
Consens, M.P., Milo, T.: Algebras for querying text regions. Expressive power and optimization. J. Comput. Syst. Sci. 57(3), 272–288 (1998)
Frick, M., Grohe, M., Koch, C.: Query evaluation on compressed trees (extended abstract). In: IEEE Symposium on Logic in Computer Science (LICS), pp. 188 (2003)
Gelade, W., Idziaszek, T., Martens, W., Neven, F.: Simplifying XML Schema: single-type approximations of regular tree languages. In: ACM Symposium on Principles of Database Systems (PODS), pp. 251–260 (2010)
Goris, E., Marx, M.: Looping caterpillars. In: Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 51–60 (2005)
Gottlob, G., Koch, C.: Monadic datalog and the expressive power of languages for web information extraction. J. ACM 51(1), 74–113 (2004)
Gottlob, G., Koch, C., Pichler, R.: Efficient algorithms for processing XPath queries. ACM Trans. Database Syst. 30(2), 444–491 (2005)
Gottlob, G., Koch, C., Pichler, R., Segoufin, L.: The complexity of xpath query evaluation and XML typing. J. ACM 52(2), 284–335 (2005)
Martens, W., Neven, F., Schwentick, T.: Complexity of decision problems for XML schemas and chain regular expressions. SIAM J. Comput. 39(4), 1486–1530 (2009)
Martens, W., Neven, F., Schwentick, T., Bex, G.J.: Expressiveness and complexity of XML Schema. ACM Trans. Database Syst. 31(3), 770–813 (2006)
Marx, M.: Conditional XPath. ACM Trans. Database Syst. 30(4), 929–959 (2005)
Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)
Neven, F.: Design and Analysis of Query Languages for Structured Documents. PhD thesis, Limburgs Universitair Centrum (1999)
Neven, F.: Automata theory for XML researchers. SIGMOD Record 31(3), 39–46 (2002)
Neven, F.: Attribute grammars for unranked trees as a query language for structured documents. J. Comput. Syst. Sci. 70(2), 221–257 (2005)
Neven, F., den Bussche, J.V.: Expressiveness of structured document query languages based on attribute grammars. J. ACM 49(1), 56–100 (2002)
Neven, F., Schwentick, T.: Expressive and efficient pattern languages for tree-structured data. In: ACM Symposium on Principles of Database Systems (PODS), pp. 145–156 (2000)
Neven, F., Schwentick, T.: Query automata over finite trees. Theor. Comput. Sci. 275(1-2), 633–674 (2002)
Neven, F., Schwentick, T.: On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logical Methods Comput. Sci. 2(3) (2006)
Place, T., Segoufin, L.: Deciding definability in FO2(<) (or XPath) on trees. In: Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 253–262 (2010)
Schwentick, T.: XPath query containment. SIGMOD Record 33(1), 101–109 (2004)
Seidl, H.: Deciding equivalence of finite tree automata. SIAM J. Comput. 19 (3), 424–437 (1990)
ten Cate, B., Lutz, C.: The complexity of query containment in expressive fragments of XPath 2.0. J. ACM 56(6) (2009)
ten Cate, B., Segoufin, L.: Transitive closure logic, nested tree walking automata, and XPath. J. ACM 57(3) (2010)
Thomas, W.: Languages, automata, and logic. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, volume 3, chapter 7, Springer (1997)
Author information
Authors and Affiliations
Corresponding author
Additional information
An extended abstract of this paper appeared in [2]
We acknowledge the financial support of the Future and Emerging Technologies (FET) programme within the Seventh Framework Programme for Research of the European Commission, under the FET-Open grant agreement FOX, number FP7-ICT-233599.
Supported by grant number MA 4938/2–1 from the Deutsche Forschungsgemeinschaft (Emmy Noether Nachwuchsgruppe).
Rights and permissions
About this article
Cite this article
Antonopoulos, T., Hovland, D., Martens, W. et al. Deciding Twig-definability of Node Selecting Tree Automata. Theory Comput Syst 57, 967–1007 (2015). https://doi.org/10.1007/s00224-015-9623-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-015-9623-7