<!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>
      <journal-title-group>
        <journal-title>DL</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Complexity Landscape for Counting Queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Extended Abstract</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Meghyn Bienvenu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Quentin Manière</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michaël Thomazo</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CNRS, University of Bordeaux</institution>
          ,
          <addr-line>Bordeaux INP, LaBRI, Talence</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Inria, DI ENS, ENS, CNRS, University PSL</institution>
          ,
          <addr-line>Paris</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>35</volume>
      <fpage>7</fpage>
      <lpage>10</lpage>
      <abstract>
        <p>We summarize our recent work [1] on extending the study of counting queries to Horn description logics outside the DL-Lite family.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Ontology-mediated query answering</kwd>
        <kwd>counting queries</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Ontology-mediated query answering (OMQA) facilitates access to data through the use of
ontologies, which provide a convenient vocabulary for query formulation and capture domain
knowledge that can be exploited to obtain more complete query results. The OMQA approach
has been extensively studied over the past fifteen years [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ], leading to the identification
of ontology languages that are well suited to OMQA due to their attractive computational
properties. Particular attention has been paid to Horn description logics of the DL-Lite and ℰ ℒ
families [5, 6].
      </p>
      <p>While most work on OMQA considers that the user query is a conjunctive query (CQ), there
has been significant interest in exploring the possibility of adopting more expressive query
languages for OMQA. In particular, several works have investigated ways of equipping CQs
with some form of counting [7, 8, 9]. A recent approach, proposed in [10] as a generalization of
[8], considers counting conjunctive queries (CCQs) that are syntactically defined like standard
CQs except that some variables may be designated as counting variables. In each model of the
knowledge base, we can count the number of possible assignments to the counting variables
that make the query answer hold. As the count value may difer between models, the goal is to
identify intervals that provide upper and lower bounds on the count values across all models.</p>
      <p>The problem of answering CCQs is intractable, in both data and combined complexity, for
common DL-Lite dialects such as DL-Litecore and DL-Litecℋore[8]. Recent works have shown that
intractability arises even for simple forms of CCQs [11, 12]. However, some interesting tractable
cases have also been identified, notably, rooted CCQs [ 10, 11, 13] and cardinality queries [12]
† coNP</p>
      <p>NL
2EXP
coNP
coNP
coNEXP†</p>
      <sec id="sec-1-1">
        <title>DL-Litepos</title>
        <p>NL</p>
        <p>NL
coNEXP†</p>
      </sec>
      <sec id="sec-1-2">
        <title>DL-Litecore</title>
      </sec>
      <sec id="sec-1-3">
        <title>Concept</title>
      </sec>
      <sec id="sec-1-4">
        <title>Role CCQ</title>
        <p>† coNP
† coNP
2EXP</p>
      </sec>
      <sec id="sec-1-5">
        <title>DL-Litepℋos</title>
      </sec>
      <sec id="sec-1-6">
        <title>DL-Litecℋore</title>
        <p>ℰℒ(ℋ⊥), ℰℒ(ℋℐ)</p>
        <p>EXP
EXP
2EXP
ℰℒ(ℋ)ℐ⊥
coNEXP
coNEXP
2EXP
coupled with DL-Litecore ontologies. Query rewriting techniques have also begun to be explored
[14]. However, despite these advances, we still have only a partial understanding of CCQ
answering in common DL-Lite dialects, and the precise combined complexity has remained
elusive: the current bounds for DL-Litecℋore are between coNEXP and coN2EXP [8]. Moreover,
to the best of our knowledge, CCQ answering has not yet been studied for DLs outside the
DL-Lite family.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Contributions</title>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we extend the study of CCQ answering to other well-known Horn description logics,
such as ℰ ℒ and the more expressive ℰ ℒℋℐ⊥. The techniques used in the DL-Lite context do not
readily transfer to ℰ ℒ due to the presence of conjunction, and in any case, our results show that
they do not achieve the optimal combined complexity even for DL-Lite. We therefore develop a
new approach based upon the observation that there exists a model minimizing the count value
that consists of an arbitrary structure ℐ* containing all assignments for the counting variables,
augmented with structures that are tree-shaped, provided we ignore edges to and from ℐ* .
Importantly, we can bound the size of the central component ℐ* , which enables us to explore
all possible options for ℐ* . Checking whether a given ℐ* can be extended to a model preserving
the minimum count value can be done by specifying a set of patterns (intuitively representing a
pair of adjacent elements), and testing via local consistency conditions whether they can be
coherently assembled. This latter step takes inspiration from a CQ answering technique for
existential rules [15], and is also similar in spirit to type-elimination style procedures, which
have been employed for reasoning with expressive DLs, see e.g. [16, 17].
      </p>
      <p>Using this new approach, we are able to establish a 2EXP upper bound in combined complexity
for ℰ ℒℋℐ⊥. A matching lower bound, which applies to both ℰ ℒ and DL-Litepℋos, is obtained by
establishing a novel connection between CCQ answering and OMQA with closed predicates. This
yields 2EXP-completeness for a wide range of Horn DLs and closes the combined complexity
gap for CCQ answering in DL-Litecℋore. We further prove a coNEXP lower bound for DL-Litepos,
which matches an existing coNEXP upper bound, yielding the precise combined complexity for
DL-Litecore as well. We also explore how to shrink the size of the models implicitly generated by
our procedure, producing models with bounded size which we use to show that CCQ answering
is coNP-complete in data complexity for all logics between ℰ ℒ and ℰ ℒℋℐ⊥.</p>
      <p>In addition to CCQs, we also investigate the special case of cardinality queries, which
correspond to Boolean atomic CCQs and allow us to ask for (bounds on) the number of members
of a given concept or role. We obtain a complete picture of data and combined complexity of
answering cardinality queries in ℰ ℒℋℐ⊥ and its various sublogics. While the data complexity
is coNP-complete for all considered logics, the combined complexity ranges from NL or coNP
in DL-Lite logics to EXP or coNEXP for ℰ ℒ and its extensions. We achieve these results using
a variety of techniques: refinements of our approach for general CCQs, adaptations of existing
constructions, and further reductions involving closed predicates. Table 1 summarizes the
combined complexity results for both CCQs and cardinality queries.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Perspectives</title>
      <p>
        We have extended the study of CCQ answering to Horn DLs outside the DL-Lite family,
establishing a complete picture of the combined and data complexity of the problems of answering
CCQs and cardinality queries in ℰ ℒℋℐ⊥ and its various sublogics. Interestingly, the new
techniques we devised not only allowed us to close some open questions concerning the combined
complexity of CCQ answering in DL-Lite, but also extend to non-Horn DLs: the 2EXP procedure
can be adapted to handle ℒℋℐ KBs as our investigations, not presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], have shown.
      </p>
      <p>Going forward, the main challenge is to develop practical algorithms. A first direction is
to look for restrictions on the query or ontology that ensure polynomial data complexity for
logics of the ℰ ℒ family. Unfortunately, our results on cardinality queries show that restrictions
as have been considered for DL-Lite [11, 10, 12] are not suficient to obtain tractability in ℰ ℒ,
so novel restrictions need to be identified. Second, it would be desirable, for ℰ ℒ but also for
DL-Lite, to develop more refined coNP procedures that are amenable to implementation using
SAT solvers. We believe that our improved understanding of the structure of optimal models
will prove helpful for both of these research directions.</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgments</title>
      <p>Partially supported by ANR project CQFD (ANR-18-CE23-0003).
[5] D. Calvanese, G. D. Giacomo, D. Lembo, M. Lenzerini, R. Rosati, Tractable reasoning and
eficient query answering in description logics: The DL-Lite family, Journal of Automated
Reasoning (JAR) 39 (2007) 385–429.
[6] F. Baader, S. Brandt, C. Lutz, Pushing the ℰ ℒ envelope, in: Proceedings of the 19th
international joint conference on Artificial intelligence (IJCAI), 2005, pp. 364–369.
[7] D. Calvanese, E. Kharlamov, W. Nutt, C. Thorne, Aggregate queries over ontologies, in:
Proceedings of the 2nd International Workshop on Ontologies and Information Systems
for the Semantic Web (ONISW), 2008, pp. 97–104.
[8] E. V. Kostylev, J. L. Reutter, Complexity of answering counting aggregate queries over</p>
      <p>DL-Lite, Journal of Web Semantics (JWS) (2015) 94–111.
[9] C. Feier, C. Lutz, M. Przybylko, Answer counting under guarded TGDs, in: Proceedings of
the 24th International Conference on Database Theory (ICDT), 2021.
[10] M. Bienvenu, Q. Manière, M. Thomazo, Answering counting queries over DL-Lite
ontologies, in: Proceedings of the 29th International Joint Conference on Artificial Intelligence
(IJCAI), 2020, pp. 1608–1614.
[11] D. Calvanese, J. Corman, D. Lanti, S. Razniewski, Counting query answers over a DL-Lite
knowledge base, in: Proceedings of the 29th International Joint Conference on Artificial
Intelligence (IJCAI), 2020, pp. 1658–1666.
[12] M. Bienvenu, Q. Manière, M. Thomazo, Cardinality queries over DL-Lite ontologies, in:
Proceedings of the 30th International Joint Conference on Artificial Intelligence (IJCAI),
2021, pp. 1801–1807.
[13] C. Nikolaou, E. V. Kostylev, G. Konstantinidis, M. Kaminski, B. C. Grau, I. Horrocks,
Foundations of ontology-based data access under bag semantics, Journal of Artificial
Intelligence (AIJ) (2019) 91 – 132.
[14] D. Calvanese, J. Corman, D. Lanti, S. Razniewski, Rewriting count queries over DL-Lite
TBoxes with number restrictions, in: Proceedings of the 33rd International Workshop on
Description Logics (DL), 2020.
[15] M. Thomazo, J. Baget, M. Mugnier, S. Rudolph, A generic querying algorithm for greedy
sets of existential rules, in: Proceedings of the 13th International Conference on Principles
of Knowledge Representation and Reasoning (KR), 2012.
[16] S. Rudolph, M. Krötzsch, P. Hitzler, Type-elimination-based reasoning for the description
logic ℋℐ using decision diagrams and disjunctive datalog, Logical Methods in
Computer Science (LMCS) 8 (2012).
[17] T. Eiter, C. Lutz, M. Ortiz, M. Simkus, Query answering in description logics: the knots
approach, in: Proceedings of the 16th International Workshop on Logic, Language,
Information and Computation (WoLLIC), 2009, pp. 26–36.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bienvenu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Manière</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Thomazo</surname>
          </string-name>
          ,
          <article-title>Counting queries over ℰ ℒℋℐ⊥ ontologies</article-title>
          ,
          <source>in: Proceedings of the 19th International Conference on Principles of Knowledge Representation and Reasoning (KR)</source>
          ,
          <year>2022</year>
          , p. (To appear).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lenzerini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rosati</surname>
          </string-name>
          ,
          <article-title>Linking data to ontologies</article-title>
          ,
          <source>Journal of Data Semantics (JoDS) 10</source>
          (
          <year>2008</year>
          )
          <fpage>133</fpage>
          -
          <lpage>173</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bienvenu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ortiz</surname>
          </string-name>
          ,
          <article-title>Ontology-mediated query answering with data-tractable description logics</article-title>
          ,
          <source>in: Tutorial Lectures of the 11th Reasoning Web International Summer School (RW)</source>
          ,
          <year>2015</year>
          , pp.
          <fpage>218</fpage>
          -
          <lpage>307</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G.</given-names>
            <surname>Xiao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rosati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>Ontology-based data access: a survey</article-title>
          ,
          <source>in: Proceedings of the 27th International Joint Conference on Artificial Intelligence (IJCAI)</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>5511</fpage>
          -
          <lpage>5519</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>