<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Saturation, De nability, and Separation for XPath on Data Trees</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sergio Abriola</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mar a Emilia Descotte</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Santiago Figueira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CONICET</institution>
          ,
          <country country="AR">Argentina</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Buenos Aires</institution>
          ,
          <country country="AR">Argentina</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We study the expressive power of some fragments of XPath equipped with (in)equality tests over data trees. Our main results are the de nability theorems, which give necessary and su cient conditions under which a class of data trees can be de ned by a node expression or set of node expressions, and our separation theorems, which give su cient conditions under which two disjoint classes of data trees can be separated by a class of data trees de nable in XPath.</p>
      </abstract>
      <kwd-group>
        <kwd>XPath data tree bisimulation ultraproduct saturation separation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        de nability
rst-order logic
The abstraction of an XML document is a data tree, i.e. a tree whose every
node contains a tag or label (such as LastName) from a nite domain, and a
data value (such as Smith) from an in nite domain. XPath is the most widely
used query language for XML documents; it is an open standard and
constitutes a World Wide Web Consortium (W3C) Recommendation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. XPath= has
syntactic operators to navigate the tree using the `child', `parent', `sibling', etc.
accessibility relations, and can make tests on intermediate nodes. It can express
properties of the underlying tree structure of the XML document, such as \the
root of the tree has a child labeled a and a child labeled b", and it can express
conditions on the actual data contained in the attributes, such as \the root of
the tree has two children with same tag a but di erent data value".
      </p>
      <p>First, we provide notions of saturation and ultraproducts that are adequate
for XPath=, and show that bisimulation coincides with logical equivalence over
saturated data trees. Using these tools, we show de nability theorems, giving
necessary and su cient conditions under which a class of data trees can be
de ned by a node expression or set of node expressions of XPath=. Finally we
give separation results, providing su cient conditions under which two disjoint
classes of data trees can be separated by a class of data trees de nable in XPath=.</p>
      <p>While on this work we will only show results for the fragment of XPath that
can only navigate via the `child' accessibility relation, similar results hold for the
vertical fragment having both the `child' and `parent' navigational operators.</p>
      <p>
        The results on de nability of this paper appeared originally in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>Data trees. We say that T is a data tree if it is a tree from Trees(A D), where
A is a nite set of labels and D is an in nite set of data values. The data of
a node x is denoted data(x), and its label is label (x). The set of nodes of a data
tree T is denoted T .</p>
      <p>Downward XPath with data tests. We consider a fragment of XPath that
corresponds to the navigational part of XPath 1.0 with data equality and inequality.
XPath= is a two-sorted language, with path expressions (that we write ; ; )
and node expressions (that we write '; ; ). The downward XPath,
notated XPath#= is de ned by mutual recursion as follows:</p>
      <p>;
';
::= o j ['] j
::= a j :' j ' ^
j
[
j ' _
j h i j h = i j h 6= i
o 2 f"; #g
a 2 A</p>
      <p>Node expressions represent properties on nodes. They are evaluated in nodes,
and, intuitively, h = i is true at x if there are two paths starting in x, one
satisfying the property , and the other satisfying the property , which end
in nodes with equal data value. On the other hand, path expressions represent
properties on paths. They are evaluated in pairs of nodes. For instance # is true
at (x; y) if y is a child of x, and ['] is true at x; y if x = y and x satis es '.</p>
      <p>Let T and T 0 be data trees, and let u 2 T , u0 2 T 0. We say that T ; u and
T 0; u0 are logically equivalent for XPath#= if no XPath#= can distinguish node
u from u0.</p>
      <p>Bisimulations. Notions of bisimulation present a way to determine whether two
pointed data trees can be distinguished by a series of moves in XPath. We do
not reproduce them here, but it is worth mentioning that they are forms of
back-and-forth conditions over two data trees.</p>
      <p>
        The main previous result in the literature establishing the connection between
bisimulation and equivalence is the following:
Theorem 1. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] If T ; u is bisimilar to T 0; u0, then they are logically equivalent.
If T and T 0 are nitely branching, the other implication also holds.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Saturation and quasi-ultraproducts</title>
      <p>We introduce a notion of saturation for the downward fragment of XPath, and
show that the reverse implication of Theorem 1 is true over saturated data trees.
Saturation is the key ingredient to show the De nability theorems, but their use
lays hidden in the proof.</p>
      <p>Saturation. Let h 1; : : : ; ni and h 1; : : : ; mi be tuples of sets of
XPath#=formulas. Given a data tree T and u 2 T , we say that h 1; : : : ; ni and h 1; : : : ; mi
are =#n;m-satis able [resp. 6=#n;m-satis able] at T ; u if there exist v0 ! v1 !
! vn 2 T and w0 ! w1 ! ! wm 2 T such that u = v0 = w0 and
1. for all i 2 f1; : : : ; ng, T ; vi j= i;
2. for all j 2 f1; : : : ; mg, T ; wj j= j ; and
3. data(vn) = data(wm) [resp. data(vn) 6= data(wm)].</p>
      <p>We say that h 1; : : : ; ni and h 1; : : : ; mi are =#n;m- nitely satis able [resp.
6=#n;m- nitely satis able] at T ; u if for every nite i0 i and nite j0 j ,
we have that h 10; : : : ; n0i and h 10; : : : ; m0i are =#n;m-satis able [resp.
6=#n;msatis able] at T ; u.</p>
      <p>De nition 2. We say that a data tree T is #-saturated if for every n; m 2 N,
every pair of tuples h 1; : : : ; ni and h 1; : : : ; mi of sets of XPath#=-formulas,
every u 2 T , and ? 2 f=; 6=g, the following is true:
if h 1; : : : ; ni and h 1; : : : ; mi are ?#n;m- nitely satis able at T ; u then
h 1; : : : ; ni and h 1; : : : ; mi are ?#n;m-satis able at T ; u.</p>
      <p>Proposition 3. For #-saturated data trees, bisimulation coincides with logical
equivalence.</p>
      <p>Quasi-ultraproducts We introduce the notion of quasi-ultraproduct, a variant
of the usual notion of rst-order model theory, which will be needed for the
de nability theorems. Some of our results for quasi-ultraproducts make use of
the fundamental theorem of ultraproducts (see e.g. [2, Thm. 4.1.9]).
De nition 4. Suppose (Ti; ui)i2I is a family of pointed data trees, U is an
ultra lter over I, T is the ultraproduct of (Ti; ui)i2I , and u is the ultralimit of
(ui)i2I . The #-quasi ultraproduct of (Ti; ui)i2I modulo U is the pointed data
tree (T ju ; u ), where T ju denotes the subtree of T induced by al the
descendants of u . As a particular case one has the notion of #-quasi ultrapower.
4</p>
    </sec>
    <sec id="sec-4">
      <title>De nability</title>
      <p>De nability theorems address the question of which properties of models can be
de ned via formulas of the logic. If K is a class of pointed data trees, we denote
its complement by K.</p>
      <p>Theorem 5. Let K be a class of pointed data trees. Then K is de nable by a
set of XPath#=-formulas i K is closed under #-bisimulations and #-quasi
ultraproducts, and K is closed under #-quasi ultrapowers.</p>
      <p>Theorem 6. Let K be a class of pointed data trees. Then K is de nable by an
XPath#=-formula i both K and K are closed under #-bisimulations and #-quasi
ultraproducts.</p>
      <p>The notion of `-bisimulation is a restricted version of #-bisimulations. It has
been shown to coincide with the notion of `-equivalence, which informally means
indistinguishable by XPath#= formulas that cannot \see" beyond ` `child'-steps
from the current point of evaluation.</p>
      <p>Theorem 7. Let K be a class of pointed data trees. Then K is de nable by a
formula of XPath#= i K is closed by `-bisimulations for XPath#= for some `.</p>
    </sec>
    <sec id="sec-5">
      <title>Separation</title>
      <p>Separation theorem provide conditions under which two disjoint classes of pointed
models can be separated by a class de nable in the logic.</p>
      <p>Theorem 8. Let K1 and K2 be two disjoint classes of pointed data trees such
that K1 is closed under #-bisimulations and #-quasi ultraproducts and K2 is
closed under #-bisimulations and #-quasi ultrapowers. Then there exists a third
class K which is de nable by a set of XPath#=-formulas, contains K1 and is
disjoint from K2.</p>
      <p>Theorem 9. Let K1 and K2 be two disjoint classes of pointed data trees closed
under #-bisimulations and #-quasi ultraproducts. Then there exists a third class
K which is de nable by an XPath#=-formula, contains K1 and is disjoint from
K2.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Sergio</given-names>
            <surname>Abriola</surname>
          </string-name>
          ,
          <article-title>Mar a Emilia Descotte, and Santiago Figueira</article-title>
          .
          <article-title>De nability for downward and vertical Xpath on data trees</article-title>
          .
          <source>In Logic, Language</source>
          , Information, and Computation - 21st International Workshop, WoLLIC 2014,
          <article-title>Valpara so</article-title>
          ,
          <source>Chile, September 1-4</source>
          ,
          <year>2014</year>
          . Proceedings, pages
          <volume>20</volume>
          {
          <fpage>35</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>C.C.</given-names>
            <surname>Chang</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.J.</given-names>
            <surname>Keisler</surname>
          </string-name>
          .
          <article-title>Model theory. Studies in logic and the foundations of mathematics</article-title>
          . North-Holland,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>J.</given-names>
            <surname>Clark</surname>
          </string-name>
          and
          <string-name>
            <surname>S. DeRose.</surname>
          </string-name>
          <article-title>XML path language (XPath)</article-title>
          .
          <source>Website</source>
          ,
          <year>1999</year>
          . W3C Recommendation. http://www.w3.org/TR/xpath.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>D.</given-names>
            <surname>Figueira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Figueira</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Areces</surname>
          </string-name>
          .
          <article-title>Basic model theory of XPath on data trees</article-title>
          .
          <source>In ICDT</source>
          , pages
          <volume>50</volume>
          {
          <fpage>60</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>