On the power of walking for querying tree-structured data

XSLT is the prime example of an XML query language based on tree-walking. Indeed, stripped down, XSLT is just a tree-walking tree-transducer equipped with registers and look-ahead. Motivated by this connection, we want to pinpoint the computational power of devices based on tree-walking. We show that in the absence of unique identifiers even very powerful extensions of the tree-walking paradigm are not relationally complete. That is, these extensions do not capture all of first-order logic. In contrast, when unique identifiers are available, we show that various restrictions allow to capture LOGSPACE, PTIME, PSPACE, and EXPTIME. These complexity classes are defined w.r.t. a Turing machine model working directly on (attributed) trees. When no attributes are present, relational storage does not add power; whether look-ahead adds power is related to the open question whether tree-walking captures the regular tree languages.

[1]  Joost Engelfriet,et al.  Tree-Walking Pebble Automata , 1999, Jewels are Forever.

[2]  Nicolás Marín,et al.  Review of Data on the Web: from relational to semistructured data and XML by Serge Abiteboul, Peter Buneman, and Dan Suciu. Morgan Kaufmann 1999. , 2003, SGMD.

[3]  Thomas Schwentick,et al.  On the Power of Tree-Walking Automata , 2000, ICALP.

[4]  Joost Engelfriet,et al.  A Comparison of Tree Transductions Defined by Monadic Second Order Logic and by Attribute Grammars , 2000, J. Comput. Syst. Sci..

[5]  Thomas Schwentick,et al.  Towards Regular Languages over Infinite Alphabets , 2001, MFCS.

[6]  Pierre Deransart,et al.  Attribute Grammars: Definitions, Systems and Bibliography , 1988 .

[7]  Jianwen Su,et al.  Algebraic and Calculus Query Languages for Recursively Typed Complex Objects , 1993, J. Comput. Syst. Sci..

[8]  Dan Suciu,et al.  Data on the Web: From Relations to Semistructured Data and XML , 1999 .

[9]  Frank Neven,et al.  Expressiveness of structured document query languages based on attribute grammars , 2002, J. ACM.

[10]  Dan Suciu,et al.  Typechecking for XML transformers , 2000, J. Comput. Syst. Sci..

[11]  Frank Neven,et al.  A formal model for an expressive fragment of XSLT , 2002, Inf. Syst..

[12]  Jan-Pascal van Best,et al.  Trips on Trees , 1999, Acta Cybern..

[13]  Alfred V. Aho,et al.  Translations on a Context-Free Grammar , 1971, Inf. Control..

[14]  Thomas Schwentick,et al.  Query automata , 1999, PODS '99.

[15]  Yuri Gurevich,et al.  Metafinite Model Theory , 1994, Inf. Comput..

[16]  Sandra de Amo,et al.  Implicit Temporal Query Languages: Towards Completeness , 1999, FSTTCS.

[17]  Serge Abiteboul,et al.  Temporal Connectives Versus Explicit Timestamps to Query Temporal Databases , 1999, J. Comput. Syst. Sci..

[18]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[19]  Derick Wood,et al.  Caterpillars: A Context Specification Technique , 2000, Markup languages.

[20]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.