2006 | OriginalPaper | Chapter
Interpreting Tree-to-Tree Queries
Authors : Michael Benedikt, Christoph Koch
Published in: Automata, Languages and Programming
Publisher: Springer Berlin Heidelberg
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
We establish correspondences between top-down tree building query languages and predicate logics. We consider the expressive power of the query language
XQ
, a clean core of the practitioner’s language XQuery. We show that all queries in
XQ
with only atomic equality are equivalent to “first-order interpretations”, an analog to first-order logic (FO) in the setting of transformations of tree-structured data. When
XQ
is considered with deep equality, we find that queries can be translated into FO with counting (
FO
(
Cnt
)). We establish partial converses to this, characterizing the subset of the FO resp.
FO
(
Cnt
) interpretations that correspond to
XQ
. Finally, we study the expressive power of fragments of
XQ
and obtain partial characterizations in terms of existential FO and a fragment of FO that is two-variable if the tree node labeling alphabet is assumed fixed.