<!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>DL-Lite and Conjunctive Queries Extended by Optional Matching (Extended Abstract)?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Shqiponja Ahmetaj</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wolfgang Fischl</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Reinhard Pichler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mantas Simkus</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Skritek</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Information Systems</institution>
          ,
          <addr-line>TU Vienna</addr-line>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Introduction
Conjunctive Queries (CQs) constitute the core of most query languages and
have been studied intensively in several areas. For querying incomplete data,
CQs however su er one major drawback: they require the complete query to be
matched into the data to return answers. One extension of CQs that tries to
overcome this problem are well-designed pattern trees (wdPTs) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Developed
in the context of the Semantic Web, wdPTs are equivalent to a well-behaved
fragment of fAND; OPTg-queries of SPARQL [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and allow a user to retrieve
partial answers to a query.
      </p>
      <p>
        Because of this feature, however, wdPTs are nonmonotone. This is problematic
for query answering in the presence of implicit knowledge { expressed e.g. by
an ontology speci ed in some Description Logic (DL) { since the usual certain
answer semantics turns out to be unsatisfactory in this setting. We observe that
the recently released recommendation of the SPARQL entailment regimes [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
provides a semantics exactly for this case. However, it is de ned in a simpler and
less expressive way than the certain answers semantics, and does not utilize the
full potential of the implicit information.
      </p>
      <p>The goal of this work is to introduce an intuitive certain answer semantics
for the class of well-designed pattern trees under DL-LiteR (which provides the
theoretical underpinning of the OWL 2 QL entailment regime). After introducing
wdPTs, we rst discuss some of the problems with an adoption of a certain
answer semantics for them and propose a suitable modi ed de nition. We then
brie y present results on the complexity of typical reasoning tasks.</p>
      <p>
        Related Work to our ndings includes the work our approaches are based
upon [3{6]. There is a huge body of results on CQ answering under di erent DLs
(cf. [
        <xref ref-type="bibr" rid="ref11 ref13 ref4 ref5">4, 5, 11, 13</xref>
        ]). For SPARQL recent work [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] presents a stronger semantics,
where entire mappings are discarded, whose possible extensions to optional
subqueries would imply inconsistencies in the knowledge base. Further related
work includes [
        <xref ref-type="bibr" rid="ref10 ref2 ref7">2, 7, 10</xref>
        ] which is discussed in the long version of this paper.
? A longer version of this paper has been accepted for publication at WWW 2015 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        DL-LiteR and Well-designed Pattern Trees
We assume the reader to be familiar with DL-LiteR [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. A DL-LiteR knowledge
base (KB) is a tuple K = hA; T i, where A is an ABox and T is a TBox. The
de nition of an interpretation I = ( I ; I ) is the usual one. In addition, we
make the standard name assumption (SNA), i.e. we assume that I contains all
individuals, and that aI = a for each individual a.
      </p>
      <p>A well-designed pattern tree P is a tuple (T; ; x) such that:
1. T is a rooted tree and maps each node t in T to a conjunctive query (CQ).</p>
      <p>A CQ here is a set of atoms, where atoms are built as usual, i.e. from concept
and role names together with individuals and variables.
2. For every variable y occurring in T , the set of nodes containing y is connected.
3. x is a tuple of variables from T , called the free variables of P.
Intuitively, the parent-child relationships in the tree express optional matching.
I.e., the result of the \parent-CQ" shall be extended by the \child-CQ" if possible
| otherwise the child shall be ignored, and only the result of the parent is returned.
Finally x are the \output" variables.</p>
      <p>A mapping is any partial function whose domain dom( ) contains only
variables. We say a mapping 1 is subsumbed by another mapping 2, denoted
by 1 v 2, if dom( 1) dom( 2) and 1(x) = 2(x) for all x 2 dom( 1). Also,
for a mapping and some property A, we shall say that is v-maximal w.r.t.
A if satis es A, and there is no 0 such that v 0, 0 6v , and 0 satis es A.
For any mapping and a tuple of variables x, we denote by x the restriction of
to the variables in x.</p>
      <p>
        The notion of a mapping that is a match for a CQ q in an interpretation I is
de ned in the standard way. Assume a wdPT P = (T; ; x) and an interpretation
I. For an initial segment T 0 of T , i.e. a connected subgraph containing the root
of T , we de ne qT 0 to be the CQ St2T 0 (t). Then a match for P in I is any
mapping such that is a match for qT 0 in I for some initial segment T 0 of
T . Let M be the set of all v-maximal matches from P to I. Then the result of
evaluating P over I, projected to x, is the set JPKI = f x j 2 M g. Note that
the order of child nodes in such tress does not a ect the query answer (see [
        <xref ref-type="bibr" rid="ref12 ref9">9,
12</xref>
        ]).
      </p>
      <p>In the following example, we illustrate wdPTs as well as the reason why the
usual certain answer semantics (i.e., a tuple is a certain answer if it is present in
every model) turns out to be unsatisfactory in our setting:
Example 1. Let P be the wdPT (T; ; x) where T consists of the root r with
the single child t, (r) = fteaches(x; y)g, (t) = fknows(y; z)g, and x = fx; zg.
Consider the KB K consisting of an ABox A = fProf(b)g, and a TBox T =
f(Prof v 9teaches)g. Let I be as follows: ProfI = f(b)g. Clearly, I j= K. The
query yields in I as only answer the mapping = fx ! bg. Clearly, also the
interpretation I0, where ProfI0 = f(b)g, teachesI0 = f(b; c)g and knowsI0 =
f(c; d)g is a model of K. But in I0, is no longer an answer since can be
extended to answer 0 = fx ! b; z ! dg. Hence, there is no mapping which is
an answer in every possible model of K.</p>
      <p>De nition 1. Let K = (A; T ) be a KB and P = (T; ; x) a wdPT. A mapping
is a certain answer to P over K if it is a v-maximal mapping s.t. (1) v JPKI
for every model I of K, and (2) vars(qT 0 ) \ x = dom( ) for some initial segment
T 0 of T . We denote by cert(P; K) the set of certain answers to P over K.
The reason for restricting the set of certain answers to v-maximal mappings is
that wdPTs in general may have \subsumed" answers, i.e. mappings s.t. also
some proper extension is an answer. But then { with set semantics { we cannot
recognize the reason why some subsumed answer is possibly not an answer in some
possible world. Therefore, in our rst step towards extending CQs by optional
matching, we allow only \maximal" answers as certain answers.</p>
      <p>
        Property (2) ensures that the domain of such an answer adheres to the tree
structure of the wdPT. However, we can show that this can be enforced in
a simple post-processing step. Likewise, also projection can be deferred to a
post-processing step. The task is thus to compute a set certp(P; K) of certain
pre-answers (i.e., mappings that satisfy De nition 1 except property (2), ignoring
projection), which can be done via the canonical model. For a given KB K, we
assume a canonical model of K, denoted as can(K), to be de ned as in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
Theorem 1. Let K = (A; T ) be a KB and P a wdPT. Then, certp(P; K) =
MAX(JPKcan(K) #), where MAX(M ) is the set of v-maximal mappings in M ,
M #:= f #j 2 M g ( # is the restriction of to those variables which are
mapped to the individual names that occur in A).
      </p>
      <p>
        To cope with the potential in nite canonical model, query rewriting algorithms
have been developed in the literature. By introducing several adaptations and
extensions of the rewriting-based CQ evaluation for DL-Lite from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], we develop
two di erent algorithms to answer wdPTs over DL-LiteR KBs. 1 Based on these
rewriting algorithms, we analyze the complexity of query answering and of several
static query analysis tasks such as query containment and equivalence. We are
able to show that the additional power of our new semantics comes without
additional costs in terms of complexity.
      </p>
      <p>For future work, we want to investigate further more expressive DLs under our
certain answer semantics. The implementation of the rewriting algorithms and the
development of suitable benchmarks, is a challenging task as well. Additionally,
we will extend our work to allow TBox queries and other fragments of SPARQL.
Acknowledgements
This work was supported by the Vienna Science and Technology Fund (WWTF),
project ICT12-15 and by the Austrian Science Fund (FWF): P25207-N23 and
W1255-N23.
1 Note that, in the full version we consider a fragment of well-designed SPARQL under</p>
      <p>OWL 2 QL entailment, which corresponds exactly to what we consider here.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Ahmetaj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Fischl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pichler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Simkus</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Skritek</surname>
          </string-name>
          .
          <source>Towards reconciling SPARQL and certain answers</source>
          ,
          <year>2014</year>
          .
          <article-title>Accepted for publication</article-title>
          ,
          <source>WWW</source>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Gottlob, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Pieris</surname>
          </string-name>
          .
          <article-title>Expressive languages for querying the semantic web</article-title>
          .
          <source>In Proc. of PODS</source>
          <year>2014</year>
          , pages
          <fpage>14</fpage>
          {
          <fpage>26</fpage>
          . ACM,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          .
          <article-title>Querying semantic web data with SPARQL</article-title>
          .
          <source>In Proc. of PODS</source>
          <year>2011</year>
          , pages
          <fpage>305</fpage>
          {
          <fpage>316</fpage>
          . ACM,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lenzerini</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Rosati</surname>
          </string-name>
          .
          <article-title>Tractable reasoning and e cient query answering in description logics: The DL-Lite family</article-title>
          .
          <source>J. Autom. Reasoning</source>
          ,
          <volume>39</volume>
          (
          <issue>3</issue>
          ):
          <volume>385</volume>
          {
          <fpage>429</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ortiz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Simkus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Tran</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Xiao</surname>
          </string-name>
          .
          <article-title>Query rewriting for HornSHIQ plus rules</article-title>
          .
          <source>In Proc. of AAAI</source>
          <year>2012</year>
          . AAAI Press,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>B.</given-names>
            <surname>Glimm</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Ogbuji</surname>
          </string-name>
          .
          <source>SPARQL 1</source>
          .
          <article-title>1 Entailment Regimes</article-title>
          .
          <source>W3C Recommendation</source>
          , W3C, Mar.
          <year>2013</year>
          . http://www.w3.org/TR/sparql11-entailment.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rezk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rodriguez-Muro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Xiao</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          .
          <article-title>Answering SPARQL queries over databases under OWL 2 QL entailment regime</article-title>
          .
          <source>In Proc. of ISWC</source>
          <year>2014</year>
          , pages
          <fpage>552</fpage>
          {
          <fpage>567</fpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>E. V.</given-names>
            <surname>Kostylev</surname>
          </string-name>
          and
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Grau</surname>
          </string-name>
          .
          <article-title>On the semantics of SPARQL queries with optional matching under entailment regimes</article-title>
          .
          <source>In Proc. of ISWC</source>
          <year>2014</year>
          , pages
          <fpage>374</fpage>
          {
          <fpage>389</fpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letelier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pichler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Skritek</surname>
          </string-name>
          .
          <article-title>Static analysis and optimization of semantic web queries</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>38</volume>
          (
          <issue>4</issue>
          ):
          <fpage>25</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>L.</given-names>
            <surname>Libkin</surname>
          </string-name>
          .
          <article-title>Incomplete data: what went wrong, and how to x it</article-title>
          .
          <source>In Proc. PODS</source>
          <year>2014</year>
          , pages
          <fpage>1</fpage>
          <lpage>{</lpage>
          13. ACM,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>M. Ortiz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Calvanese</surname>
            , and
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Eiter</surname>
          </string-name>
          .
          <article-title>Data complexity of query answering in expressive description logics via tableaux</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          ,
          <volume>41</volume>
          (
          <issue>1</issue>
          ):
          <volume>61</volume>
          {
          <fpage>98</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>J. Perez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Arenas</surname>
            , and
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Gutierrez</surname>
          </string-name>
          .
          <article-title>Semantics and complexity of SPARQL</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>34</volume>
          (
          <issue>3</issue>
          ),
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>R.</given-names>
            <surname>Rosati</surname>
          </string-name>
          .
          <article-title>On conjunctive query answering in EL</article-title>
          .
          <source>In Proc. DL</source>
          <year>2007</year>
          .
          <article-title>CEUR-WS</article-title>
          .org,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>