<!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>Classifying the Complexity of Ontology-Mediated Queries in E L: Atomic Queries to Conjunctive Queries (Extended Abstract)?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carsten Lutz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leif Sabellek</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Bremen</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Substantial research e orts have been invested into understanding the computational properties and expressive power of ontology-mediated queries (OMQs). Two important topics are the data complexity of OMQ evaluation [10, 12, 17, 5, 1], where only the data is considered to be the input while the OMQ is xed, and the rewritability of OMQs into more standard database query languages such as SQL (which in this context is often equated with rst-order logic) and Datalog [7, 3, 1, 11, 9]. Both subjects are thoroughly intertwined. In particular, rewritability into rst-order logic (FO) is closely related to AC0 data complexity while rewritability into Datalog is closely related to PTime data complexity. Traditionally, data complexity and rewritability have mostly been studied on the level of OMQ languages (L; Q) de ned by an ontology language L such as E L and a query language Q such as conjunctive queries (CQs). A more ne-grained analysis has been initiated in [16, 1], the aim being to understand the exact complexity and rewritability status of every OMQ from relevant OMQ languages (L; Q), see also [18, 15]. For expressive DLs, this turns out to be closely related to the complexity classi cation of constraint satisfaction problems (CSPs) with a xed template [8]. Very important progress has recently been made in this area with the proof that CSPs enjoy a dichotomy between PTime and NP [4, 19]. Via the results in [1], this implies that OMQ evaluation in languages such as (ALCI; UCQ) enjoys a dichotomy between PTime and coNP. However, the complexity of CSPs and OMQs is still far from being fully understood. For example, neither in CSP nor in expressive OMQ languages it is known whether there is a dichotomy between NL and PTime, and whether containment in NL coincides with rewritability into linear Datalog, a well-known fragment of Datalog that allows only linear recursion. It has been conjectured that both of this is the case. We report on [14], which carries out a ne-grained analysis of the data complexity and rewritability of OMQs from (E L; CQ), achieving a complete classication. This extends the results of [13] where the same was achieved for the OMQ language (E L; AQ) that only admits atomic queries, that is, conjunctive queries of the very simple form A(x). For every Q 2 (E L; CQ), let eval(Q) be</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>the problem to decide, given an ABox A and a tuple of individuals a, whether
a is a certain answer to Q on A. Our main result is the following trichotomy.
Theorem 1. For every OMQ Q 2 (E L; CQ), one of the following is true:
1. eval(Q) is in AC0 and Q is rewritable into FO (actually into a UCQ with
equality atoms);
2. eval(Q) is NL-complete and Q is rewritable into linear Datalog;
3. eval(Q) is PTime-complete and Q is rewritable into monadic Datalog.
Consequently, eval(Q) is in NL if and only if Q is rewritable into linear Datalog
unless NL = PTime.</p>
      <p>An important aspect of the proof of Theorem 1 are semantic characterizations
of the three cases, which are also interesting in their own right. The
characterizations are easiest to state for AQs. For Q 2 (E L; AQ), let MQ denote the
set of all tree shaped ABoxes whose root is a certain answer to Q and that are
minimal with that property regarding set inclusion. We say that Q has bounded
depth if there is a constant bound on the depth of the trees in MQ and Q has
bounded pathwidth if there is a constant bound on the pathwidth of the trees in
MQ; recall that pathwidth measures the similarity of a structure to a path with
lower number meaning more similar. For CQs, the de nitions are similar, but
for de ning MQ we consider ABoxes of a certain pseudo-tree shape instead of
tree shaped ones.</p>
      <p>
        While it is known that bounded depth of an OMQ from (E L; CQ) implies
FO-rewritability [2], we prove that
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) if Q does not have bounded depth, then eval(Q) is NL-hard;
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) if Q has bounded pathwidth, then Q is rewritabe into linear Datalog (and
thus, eval(Q) is in NL);
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) if Q does not have bounded pathwidth, then eval(Q) is PTime-hard and Q
is not rewritable into linear Datalog.
      </p>
      <p>
        The proofs are technically subtle, especially the hardness proofs (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) and (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) for
Boolean CQs. Furthermore, the proof of (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) yields a way to construct linear
Datalog rewritings if they exist, and the rewritings have smaller width (number
of variables in rule heads) than the linear Datalog rewritings given in [13]. We
also show that all relevant decision problems, such as whether a given OMQ
is rewritable into linear Datalog and whether it is PTime-hard, are
ExpTimecomplete. The upper bounds are proved by reduction to the emptiness problem
of tree automata.
      </p>
      <p>There are several natural directions into which our results can be
generalized. One is to consider the OMQ language (E L; UCQ). We conjecture that this
generalization is not di cult. In fact, we only refrained from covering it since
it makes all proofs more technical and distracts from the main ideas. An
important direction for future work is to extend our analysis to E LI, that is, to
add inverse roles. Even the case of (E LI; AQ) appears to be challenging. In fact,
we observe that a complexity classi cation of (E LI; AQ) is equivalent to a
complexity classi cation of all CSPs that have tree obstructions, which is an open
Classifying the Complexity of Ontology-Mediated Queries in EL
problem. It is easy to see that (E LI; AQ) contains OMQs that are L-complete
and we conjecture that AC0, L, NL, and PTime are the only complexities that
occur. We also conjecture that L-completeness coincides with rewritability into
symmetric Datalog [6].</p>
      <p>Acknowledgments. This research was supported by ERC consolidator grant
647289 CODA.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>ten Cate</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Ontology-based data access: A study through disjunctive datalog, CSP, and MMSNP</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .
          <volume>39</volume>
          (
          <issue>4</issue>
          ),
          <volume>33</volume>
          :1{
          <fpage>33</fpage>
          :
          <fpage>44</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hansen</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>First order-rewritability and containment of conjunctive queries in Horn description logics</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <volume>965</volume>
          {
          <fpage>971</fpage>
          . IJCAI/AAAI Press (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>First order-rewritability of atomic queries in horn description logics</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <volume>754</volume>
          {
          <fpage>760</fpage>
          . IJCAI/AAAI (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bulatov</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          :
          <article-title>A dichotomy theorem for nonuniform csps</article-title>
          .
          <source>In: Proc. of FOCS</source>
          . pp.
          <volume>319</volume>
          {
          <issue>330</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Giacomo</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Data complexity of query answering in description logics</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>195</volume>
          ,
          <issue>335</issue>
          {
          <fpage>360</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Egri</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Larose</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tesson</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Symmetric datalog and constraint satisfaction problems in LogSpace</article-title>
          .
          <source>Electronic Colloquium on Computational Complexity (ECCC)</source>
          <volume>14</volume>
          (
          <issue>024</issue>
          ),
          <volume>1</volume>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ortiz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simkus</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tran</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
          </string-name>
          , G.:
          <article-title>Query rewriting for HornSHIQ plus rules</article-title>
          .
          <source>In: Proc. of AAAI</source>
          . AAAI Press (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Feder</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          , M.Y.:
          <article-title>The computational structure of monotone monadic SNP and constraint satisfaction: A study through datalog and group theory</article-title>
          .
          <source>SIAM J. Comput</source>
          .
          <volume>28</volume>
          (
          <issue>1</issue>
          ),
          <volume>57</volume>
          {
          <fpage>104</fpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuusisto</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Rewritability in monadic disjunctive datalog, MMSNP, and expressive description logics</article-title>
          .
          <source>Logical Methods in Computer Science</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Hustadt</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>Data complexity of reasoning in very expressive description logics</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <volume>466</volume>
          {
          <fpage>471</fpage>
          . Professional Book Center (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nenov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>B.C.</given-names>
          </string-name>
          :
          <article-title>Datalog rewritability of disjunctive datalog programs and its applications to ontology reasoning</article-title>
          .
          <source>In: Proc. of AAAI</source>
          . pp.
          <volume>1077</volume>
          {
          <fpage>1083</fpage>
          . AAAI Press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Krisnadhi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Data complexity in the EL family of description logics</article-title>
          .
          <source>In: Proc. of LPAR. LNAI</source>
          , vol.
          <volume>4790</volume>
          , pp.
          <volume>333</volume>
          {
          <fpage>347</fpage>
          . Springer (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sabellek</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Ontology-mediated querying with the description logic el: Trichotomy and linear datalog rewritability</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <volume>1181</volume>
          {
          <fpage>1187</fpage>
          . ijcai.
          <source>org</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sabellek</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>A complete classi cation of the complexity and rewritability of ontology-mediated queries based on the description logic EL</article-title>
          . submitted to Journal
          <source>of Arti cial Intelligence Research (JAIR)</source>
          (
          <year>2019</year>
          ), http://arxiv.org/abs/
          <year>1904</year>
          .12533
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seylan</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Ontology-mediated queries with closed predicates</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <volume>3120</volume>
          {
          <fpage>3126</fpage>
          . AAAI Press (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Non-uniform data complexity of query answering in description logics</article-title>
          .
          <source>In: Proc. of KR</source>
          . AAAI Press (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>The limits of querying ontologies</article-title>
          .
          <source>In: Proc. of ICDT. LNCS</source>
          , vol.
          <volume>4353</volume>
          , pp.
          <volume>164</volume>
          {
          <fpage>178</fpage>
          . Springer (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kikot</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gerasimova</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Towards a data complexity classi - cation of ontology-mediated queries with covering</article-title>
          .
          <source>In: Proc. of DL. CEUR Workshop Proceedings</source>
          , vol.
          <volume>2211</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Zhuk</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>A proof of CSP dichotomy conjecture</article-title>
          .
          <source>In: Proc. of FOCS</source>
          . pp.
          <volume>331</volume>
          {
          <issue>342</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>