<!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>Tractability Guarantees for DL-Lite Query Answering</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Meghyn Bienvenu</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Magdalena Ortiz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mantas Sˇ imkus</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guohui Xiao</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Information Systems, Vienna University of Technology</institution>
          ,
          <addr-line>Vienna</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Laboratoire de Recherche en Informatique, CNRS &amp; Universite ́ Paris Sud</institution>
          ,
          <addr-line>Orsay</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>It is a classic result in database theory that conjunctive query (CQ) answering, which is NP-complete in general, is feasible in polynomial time when restricted to acyclic queries. Subsequent results identified more general structural properties of CQs (like bounded treewidth) which ensure tractable query evaluation. In this paper, we lift these tractability results to knowledge bases formulated in the core dialect of DL-Lite. The proof exploits known properties of query matches in this logic and involves a query-dependent modification of the data. To obtain a more practical approach, we next propose a concrete polynomial-time algorithm for answering acyclic CQs based upon a rewriting into datalog. We also show how the algorithm can be extended to a larger class of (nearly acyclic) CQs. A preliminary evaluation of our proof-of-concept implementation suggests the interest of our approach for handling large acyclic CQs.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Description logics of the DL-Lite family [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] have become the languages of choice for
ontology-based data access, in no small part due to the very low data complexity of
conjunctive query (CQ) answering over knowledge bases formulated in these logics.
While low data complexity is rightfully considered important for scalability, it does not
by itself guarantee efficient query answering in practice. Indeed, most existing query
answering algorithms for DL-Lite proceed by rewriting the input CQ into a UCQ which
is then posed to the database. The query rewriting step typically results in a considerably
larger query, which can make this approach infeasible for queries of moderate size.
Even when the query rewriting phase is not too costly, the evaluation of the CQs over
the database can be challenging when the database is very large, since the problem is
known to be NP-complete in combined complexity, and all known algorithms require
exponential time in the size of the query.
      </p>
      <p>
        The NP-hardness of CQ answering in relational databases motivated the search for
classes of CQs which admit efficient evaluation. A well-known result in database theory
shows that CQ answering becomes feasible in polynomial time when restricted to the
class of acyclic CQs [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Later investigations lead to the identification of more general
structural properties, such as bounded treewidth, query width, or hypertree width [
        <xref ref-type="bibr" rid="ref4 ref7">4, 7</xref>
        ],
which guarantee tractable CQ answering. Since the NP-hardness of CQ answering in
DLs is inherited from relational databases, it is natural to ask whether these tractability
results also transfer to the DL setting. This would be very desirable since it is likely
that most of the queries that will actually occur in applications are acyclic. While there
are no collections of real-world CQs that can be used to support this claim in the DL
setting, one can find some compelling evidence by looking at the closely related setting
of SPARQL queries over RDF data, where it has been reported that acyclic queries (in
fact, acyclic conjunctive graph patterns) comprise more than 99% of the queries in a
log of around three million queries posed to the DBpedia endpoint [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Unfortunately,
lifting positive results from databases to the DL setting is often not possible, even for
DL-Lite. For instance, for the logic DL-LiteR, which underlies the QL profile of the
OWL 2 standard [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], CQ answering was recently shown to be NP-hard already for
acyclic queries [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>In this paper, we show that for plain DL-Lite (without role hierarchies) the picture
is brighter: all polynomial-time upper bounds for classes of CQs known from
relational databases carry over to DL-Lite. Although this general tractability result relies
on known properties of the logic, to our knowledge, it has not been pointed out before.
The proof reduces the problem of answering a CQ over a knowledge base K to
answering the same CQ over a database that results from a polynomial expansion of the
dataset in K. The algorithm arising from this reduction has a disadvantage: it involves
a query-dependent expansion of the data. For this reason, we propose an alternative
algorithm based on a rewriting into non-recursive datalog, which runs in polynomial time
for acyclic CQs. We also show how this approach can be extended to a larger family of
CQs that are almost acyclic. We have implemented a simple prototype of the rewriting
algorithm, and it shows promising results for answering large acyclic CQs.</p>
      <p>
        The general tractability result and rewriting algorithm for acyclic CQs are presented
in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]; the extension to nearly acyclic queries is new. Due to space restrictions, we
consider only DL-Lite in this paper and invite the interested reader to consult [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] to see
how our results can be adapted to E LH ontologies [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>
        Description Logics We briefly recall the syntax and semantics of DL-Lite and its
extension DL-LiteR [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Let NC, NR, and NI be countably infinite sets of concept names,
role names, and individuals, respectively, and let NR = NR [ fr j r 2 NRg be the set
of (complex) roles. For R 2 NR, R denotes r if R = r 2 NR, and r if R = r .
      </p>
      <p>An ABox is a finite set of assertions of the forms A(b) and r(b; c) with A 2 NC,
r 2 NR, and b; c 2 NI. A TBox is a finite set of axioms, which in DL-Lite are concept
inclusions of the form B1 v (:)B2, with B1; B2 of the form A 2 NC or 9R with
R 2 NR. In DL-LiteR, TBoxes may additionally contain role inclusions of the form
R1 v (:)R2 with R1; R2 2 NR. A knowledge base (KB) K = (T ; A) consists of a
TBox T and ABox A.</p>
      <p>
        The semantics of KBs is defined in terms of (DL) interpretations I = ( I ; I ) in
the usual way, see [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for details. I is a model of a KB K = (T ; A) if it satisfies every
axiom in T and assertion in A, and we call K consistent if it admits some model. We
use Ind(A) for the individuals occurring in A, and let IA be the interpretation with
      </p>
      <p>
        I = Ind(A) such that (i) c 2 AI iff A(c) 2 A, and (ii) (c; d) 2 rI iff r(c; d) 2 A.
Queries We first recall non-recursive datalog queries [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Let NV and ND be
countably infinite sets of variables and datalog relations, respectively. Each 2 ND has an
associated non-negative integer arity. Atoms are expressions of the form p(x), where
x 2 (NV)n, and (i) p 2 NC and n = 1, (ii) p 2 NR and n = 2, or (iii) p 2 ND and n is
the arity of p; atoms of forms (i) and (ii) are called DL-atoms. A rule is an expression
of the form h(x) 1; : : : ; m, where h(x); 1; : : : ; m are atoms, h is a datalog
relation, and every variable of x occurs in body ( ) = f 1; : : : ; mg. Abusing notation,
we write 2 instead of 2 body ( ). The variables in head ( ) are called the answer
variables of . Given a set of rules P , we let Dep(P ) = (V; E) be the directed graph
such that: (a) V is the set of all datalog relations occurring in P , and (b) (p1; p2) 2 E
whenever there is a rule 2 P where p1 is the relation in head ( ), and p2 occurs in
body ( ). A non-recursive datalog query is a pair Q = (P; q) where P is a set of rules
such that Dep(P ) has no cycle, and q is a datalog relation; its arity is the arity of q.
      </p>
      <p>Given a rule and a DL interpretation I, an assignment is a function that maps
every variable of to an object in I . For a concept atom A(x) 2 , we write I j=
A(x) if (x) 2 AI , and for a role atom r(x1; x2) 2 , we write I j= r(x1; x2) if
( (x1); (x2)) 2 rI . We call a match for in I if I j= for all DL-atoms 2 .
A tuple t is an answer to a query Q = (P; h) in an interpretation I if there exists a rule
= h(x) in P and a match for in I such that (i) t = (x) and (ii) for each
non-DL-atom p(y) 2 , (y) is an answer to (P; p) in I. We use ans(Q; I) to denote
the set of answers to Q in I. The set cert(Q; K) of certain answers to an n-ary query
Q over a KB K is defined as fa 2 (NI)n j aI 2 ans(Q; I) for any model I of Kg.</p>
      <p>A union of conjunctive queries (UCQ) is a non-recursive datalog query Q = (P; q)
such that every rule in P has head relation q and has only DL-atoms in its body. A
conjunctive query (CQ) is a UCQ of the form (f g; q). We typically represent a UCQ
as a set of CQs, and often use single rules (or rule bodies) to denote CQs.</p>
      <p>The query output tuple (QOT) problem takes as input a query Q, a KB (T ; A),
and a tuple of individuals a, and consists in deciding whether a 2 cert(Q; (T ; A)).
Whenever we talk about the complexity of query answering, we mean the complexity
of the QOT problem. We focus on combined complexity, which is measured in terms of
the size of the whole input (a, Q, T , A).</p>
      <p>Canonical Models Every consistent DL-Lite KB (T ; A) possesses a canonical model
IT ;A. Its domain T ;A consists of all words aR1 : : : Rn (n 0) such that: (i) a 2
Ind(A) and Ri 2 NR, (ii) if n 1, then T ; A j= 9R1(a), and (iii) for 1 i &lt; n,
Ri 6= Ri+1 and T j= 9Ri v 9Ri+1. We call w0 2 T ;A a child of w 2 T ;A if
w0 = wR for some R. The interpretation function is defined as follows:
aIT ;A = a for all a 2 Ind(A)
AIT ;A = fa 2 Ind(A) j T ; A j= A(a)g [ faR1 : : : Rn j n
1 and T j= 9Rn v Ag
rIT ;A = f(a; b) j r(a; b) 2 Ag [ f(w1; w2) j w2 = w1rg [ f(w2; w1) j w2 = w1r g
Note that IT ;A is composed of a core, which is obtained by restricting IT ;A to the
objects in Ind(A), and an anonymous part consisting of (possibly infinite) trees rooted
at objects in the core. It is well-known that IT ;A can be homomorphically mapped into
any model of T and A, which yields:
Fact 1 Let K be a consistent DL-Lite KB, and let IK be its canonical model. Then
cert(Q; K) = ans(Q; IK) for every non-recursive datalog query Q.</p>
    </sec>
    <sec id="sec-3">
      <title>General Tractability Result</title>
      <p>In this section, we observe that the answers to a CQ over a consistent DL-Lite KB
K = (T ; A) coincide with the answers to in an interpretation IT ;A; that can be
constructed in polynomial time from K and . As a consequence, we obtain that any
class of CQs that is tractable for plain databases is also tractable for DL-Lite KBs.</p>
      <p>
        To establish this result, we rely on the notion of tree witness introduced in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]:
Definition 1. Let be a CQ and let R(x; y) be such that either R(x; y) 2 or
R (y; x) 2 . A tree witness for R(x; y) in is a partial map f from the variables
in to words over the alphabet NR satisfying:
(a) f (y) = R,
(b) if f (z) = wS, S0(z; z0) 2 or S0 (z0; z) 2 , and S0 6= S , then f (z0) = wSS0,
(c) if f (z) = wS and S(z0; z) 2 or S (z; z0) 2 , then f (z0) = w.
and such that its domain is minimal (w.r.t. ) among partial maps satisfying (a)-(c).
      </p>
      <p>It follows from the definition that there can be at most one tree witness for each
R(x; y), which we denote by fR(x;y). Notice that each tree witness f for a CQ
naturally induces a tree-shaped CQ, denoted f , obtained by restricting to the variables in
the domain of f and unifying variables z; z0 with f (z) = f (z0).</p>
      <p>Definition 2. A tree witness fR(x;y) is valid w.r.t. T if for every word R1 : : : Rn in the
range of fR(x;y), and every 1</p>
      <p>i &lt; n, we have Ri 1 6= Ri and T j= 9Ri 1 v 9Ri.</p>
      <p>The notion of validity essentially mimics condition (iii) in the definition of IT ;A,
thereby ensuring that whenever a tree witness fR(x;y) is valid and there is an element of
the form wR in the anonymous part of IT ;A, then the element w is the root of a tree that
contains ww0 for every w0 in the range of fR(x;y). Moreover, the image of any match
for in IT ;A restricted to the elements in the anonymous part always corresponds to
a union of such trees. Hence, if a match for in IT ;A maps x and y to objects w
and wR respectively, then there is a tree witness fR(x;y) for R(x; y) in which is valid
w.r.t. T and such that (z) = wfR(x;y)(z) for each variable z in the domain of fR(x;y).
This means that by taking the range of all the valid tree witnesses, we can obtain all the
tree-shaped structures that can potentially participate in matches for subqueries of .
By appropriately augmenting the core with these structures, we obtain an interpretation
IT ;A; that is sufficient for retrieving all query answers. Formally, we have:
Definition 3. Let IT ;A; be the structure obtained by adding to the core:
(a) the objects aw such that w occurs in the range of a valid tree witness fR(x;y),</p>
      <p>T ; A j= 9R(a), and
(b) the objects xSw where x is a variable in and S; w satisfy:
(i) there is an individual a 2 Ind(A) and a chain of (possibly inverse) roles
R1; : : : ; Rn of length at most jT j such that Rn = S, T ; A j= 9R1(a), and
for each 1 &lt; i n, Ri 1 6= Ri, and T j= 9Ri 1 v 9Ri,
(ii) there exists a variable y and valid tree witness fR(x;y) with S 6= R and</p>
      <p>T j= 9S v 9R whose range contains w.</p>
      <p>Note that x is not an object of the domain of IT ;A; .</p>
      <p>To extend the interpretations of concept and role names to these new objects, we let
wR 2 AIT ;A; whenever T j= 9R v A, and (w; wR) 2 RIT ;A; for new w; wR.</p>
      <p>Item (a) of Definition 3 attaches to each individual a a copy of the tree structure
associated with tree witness f whenever the query qf has a match rooted at a. Item (b)
handles the situation in which there is match for a connected component 0 of the
query which maps all variables to objects in the anonymous part, in which case the
set f (y) j y is variable in 0g form a tree. By letting x be the variable in 0 mapped
closest to the ABox, and S be its incoming arc, the new objects xSw introduced in (b)
induce the same tree structure, allowing the match for 0 to be reproduced in IT ;A; .
Theorem 1. Let be a CQ, let (T ; A) be a consistent DL-Lite knowledge base, and let
IT ;A; be the interpretation defined above. The following statements hold:
1. For every tuple a of individuals, a 2 ans( ; IT ;A) iff a 2 ans( ; IT ;A; ).
2. IT ;A; can be built in polynomial time in , T and A.</p>
      <p>
        Proof (sketch). The “if” direction of statement 1 is immediate since IT ;A; corresponds
to a subinterpretation of IT ;A. For the “only if” direction, we must show how every
match for in IT ;A can be reproduced in IT ;A; . This is straightforward for
connected components of which contain an answer variable since we can directly use .
The remaining connected components are mapped into one of the tree-shaped structures
from item (b) of Definition 3. For statement 2, existence and validity of tree witnesses
can be tested in polynomial time. The existence of a role chain and individual having
the properties stated in (b) can be decided by initializing a set Reach with all roles S
such that T ; A j= 9S(a) for some a 2 Ind(A), and adding U to Reach whenever there
is V 2 Reach such that T j= 9V v 9U . Since there are only polynomially many
objects of the forms aw and bw as above, and instance checking and TBox reasoning
are tractable for DL-Lite KBs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], IT ;A; can be built in polynomial time.
      </p>
      <p>In light of Theorem 1 and Fact 1, to determine whether a 2 cert( ; (T ; A)), it is
sufficient to test the consistency of (T ; A) and then, if (T ; A) is consistent, to decide
whether a 2 ans( ; IT ;A; ). If we view IT ;A; as a plain relational database, the latter
check is just a special case of the QOT problem. Hence, we obtain:
Corollary 1. Let Q be a class of CQs for which the query output tuple problem over
plain relational structures is decidable in polynomial time. Then the query output tuple
problem for Q is also tractable for KBs formulated in DL-Lite.</p>
      <p>
        The construction of IT ;A; above is easily extended to DL-LiteR using the
definitions of canonical models and tree witnesses from [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. However, the construction is
no longer polynomial since there can be exponentially many tree witnesses for a single
atom R(x; y) in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and so we do not obtain an analogue of Theorem 1. Indeed, it
follows from results by Kikot et al. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] that the tuple output problem for tree-shaped CQs is
NP-complete for DL-LiteR KBs. Therefore, to obtain tractability results to DL-LiteR,
one must impose some syntactic restriction on T and that ensures a polynomial bound
on the number of tree witnesses, e.g. the absence of twisty roles proposed in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Answering Acyclic Queries</title>
      <p>The expansion technique presented in Section 3 allows us to convert any
polynomialtime algorithm for evaluating a class of CQs over plain databases into a polynomial-time
algorithm for evaluating the same class of queries over DL-Lite KBs. However, the
resulting algorithm would involve building the structure IT ;A; for each input query ,
which is clearly undesirable. We now present our main contribution: a polynomial-time
procedure for evaluating acyclic CQs which is based upon rewriting CQs into
nonrecursive datalog programs.</p>
      <p>We begin with some preliminaries. To prepare for the extension to nearly acyclic
queries in the next section, we will allow CQs to use a special concept name core,
whose purpose is to force some variables to be mapped to the core. Semantically, this
is achieved by defining cert( ; K) as the set of tuples a such that in every model I
of K, there is a match for the CQ obtained by removing all core atoms from , such
that maps the answer variables to a and maps every variable x with core(x) 2 to
an element aI (with a an individual in K). Note that for CQs with no core atoms, this
definition coincides with the earlier one. We say that a variable x is a core variable in
if it is an answer variable, or contains the atom core(x) or an atom of the form r(x; x).</p>
      <p>As usual, the query graph G( ) of a CQ is defined as the undirected graph whose
nodes are the variables of , and that has an edge between x and x0 if contains a
(body) atom r(x; x0) or r(x0; x). A CQ is acyclic if G( ) is acyclic, and rooted if
every connected component of G( ) has at least one core variable. We consider a slight
generalization of acyclicity: we say that a CQ is acyclic modulo core variables
(cacyclic for short) if the graph G ( ) is acyclic, where G ( ) is obtained by deleting
from G( ) each edge (x; x0) where x and x0 are core variables.</p>
      <p>Our rewriting procedure works on queries which are both rooted and c-acyclic (we
will discuss later how to handle the non-rooted case). To every rooted c-acyclic CQ ,
we associate the set of connected components fT1; : : : ; Tng of G ( ). Because is
rooted, every Ti is a connected acyclic graph containing at least one vertex which is a
core variable. We select an arbitrary core variable xi for each Ti and designate it as the
root of Ti, allowing us to view Ti as a tree. Then, given a pair of variables x; y of , we
say y is a child of x if y is a child of x in the (unique) tree Ti that contains x, and define
descendant as the transitive closure of child.</p>
      <p>Rewriting procedure for rooted queries Consider a rooted c-acyclic CQ = q(v)
and a DL-Lite TBox T . Let X and Xr denote respectively the set of core variables
and the set of root variables (recall that Xr X). For a variable x of , we denote by
x the tuple hy1; : : : ; yki consisting of the answer variables of that are descendants
of x. We rewrite the query into the non-recursive datalog program rewT ( ) = (P; q)
defined as follows. In addition to concepts and roles, and the relation q, the program uses
the following datalog relations: (i) (jx j + 1)-ary relations qx; qx0 for every variable x
of , and (ii) unary relations qA and q9R for every A 2 NC and R 2 NR occurring in .
We now describe the rules in P . There is a single top-level rule defining q:
q(v)
^ qx(x; x ) ^
x2Xr</p>
      <p>^
xi;xj2X^r(xi;xj)2
r(xi; xj )
For every variable x in , with Y = fy1; : : : ; yng the set of children of x in , we have
qx(x; x )</p>
      <p>^
A(x)2 ;A6=core
qA(x) ^
^ qy0(x; y )
and for all y 2 Y satisfying the following conditions:
(i) there is an atom R(x; y) 2 or R (y; x) 2 and the tree witness fR(x;y) exists
and is valid
(ii) for every u in the domain of fR(x;y) with fR(x;y)(u) = wS and A(u) 2 , we have</p>
      <p>T j= 9S v A
(iii) the set Z = fz j fR(x;y)(z) = " ^ z 6= xg contains all core variables in the domain
qy0(x; y)
q9R(x) ^
^ qz(x; z )
z2Z
Finally, for every B 2 NC [ f9R j R 2 NRg with qB a datalog relation in P , we have
and for every y 2 Y , we also have
qy0(x; y )</p>
      <p>^
r(x;y)2</p>
      <p>^
s(y;x)2
r(x; y) ^</p>
      <p>s(y; x) ^ qy(y; y )
qB(x)
qB(x)
qB(x)</p>
      <p>A(x)
s(x; y)
s(y; x)
for all A 2 NC such that T j= A v B
for all s 2 NR such that T j= 9s v B
for all s 2 NR such that T j= 9s
v B
Notice that the special concept core does not appear in the program rewT ( ).</p>
      <p>Intuitively, the relation qx corresponds to the query jx whose answer variables are
fxg [ x and whose body is obtained by restricting the body of to the atoms whose
arguments among x and its descendants; the relation qy0 corresponds to the query jxy
(with y a child of x) obtained by adding to jy the role atoms linking x and y. Rule (1)
stipulates that a tuple is in the answer to if it makes true all of the role atoms linking
two core variables and each of the queries jx associated with a root variable x of .
Then rule (2) states that to make jx hold at an individual, we must satisfy the concept
atoms for x and the query jxy for each child y of x. Rules (3) and (4) provide two
ways of satisfying jxy. The first way, captured by rule (3), is to map y to an ABox
individual, in which case the role atoms between x and y must occur in the ABox, and
the query jy must hold at this individual. The second possibility, treated by rule (4),
is that y is mapped to an element of the anonymous part of IT ;A which is a child of x.
For this to occur, several conditions must be verified. First, if y is an R-successor of x,
then the tree witness fR(x;y) must exist and be valid w.r.t. T . Second, we must ensure
that all concept atoms concerning variables that are mapped inside the anonymous part
by fR(x;y) are satisfied (this is checked in item (ii)). Finally, since core variables cannot
be mapped inside the anonymous part, we need condition (iii), which checks that every
core variable z in the domain of fR(x;y) is such that fR(x;y)(z) = ". If all of these
conditions are met, then rule (4) states that the query jxy can be satisfied by making
9R hold at x (thereby guaranteeing the existence of the required paths in the anonymous
part of IT ;A) and by satisfying the remainder of the query jxy (i.e. the query obtained
(3)
(4)
(5)
by removing the atoms mapped inside the anonymous part). The latter corresponds to
the union of the queries jz where z is a descendant of x with fR(x;y)(z) = " . Finally,
the rules in (5) provide the standard rewriting of concepts A and 9R w.r.t. T .</p>
      <p>We establish the correctness of our rewriting procedure.</p>
      <p>Theorem 2. Let be a rooted c-acyclic CQ and K = (T ; A) a DL-Lite KB. Then
cert( ; K) = ans(rewT ( ); IA).</p>
      <p>Proof (idea). The key step in the proof is showing that for every variable x in ,
cert( jx; K) = ans((rewT ( ); qx); IA). This can be proved by induction on the number
of variables in jx, utilizing Proposition 1 and properties of tree witnesses.</p>
      <p>The next theorem shows that our rewriting procedure provides a polynomial-time
algorithm for evaluating rooted c-acyclic conjunctive queries.</p>
      <p>
        Theorem 3. Given a rooted c-acyclic CQ and a DL-Lite KB (T ; A), the program
rewT ( ) can be computed in polynomial time in the size of and T , and deciding if
a 2 ans(rewT ( ); IA) can be done in polynomial time in the size of rewT ( ) and A.
Proof. For the first point, we observe that the number of relations in rewT ( ) is linear
in the number of atoms in and that each relation is defined using linearly many rules
in the size of and T . We also note that testing the conditions for rules of type (4) can
be done in polynomial time in the size of and T (cf. Section 3). The second statement
is true because once the answer variables in rewT ( ) have been instantiated with the
individuals in a, we have a non-recursive datalog program (with constants) where every
rule contains at most two variables. It is known that datalog programs of this form can
be evaluated in polynomial time (cf. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]).
      </p>
      <p>Handling non-rooted queries. We now show that non-rooted c-acyclic CQs can be
answered via a reduction to the rooted query case. Given an c-acyclic CQ over a KB
K = (T ; A), the set cert( ; K) can be computed using the following steps:
1. If is rooted, then return cert( ; K).
2. Choose a maximally connected component of that contains no core variable.
3. If has a match fully in the anonymous part of IT ;A, drop it and go to step 1.
4. If there is a variable x in such that the rooted query g(x) has a non-empty
answer over K, then drop from and go to step 1. Otherwise, return ;.
It is not hard to show that the condition in step 3 holds just in the case that there exists a
variable x and a role S 2 NR which is reachable in the canonical model (cf. Definition 3
b.i) such that there is a valid tree witness f for S(z; x) in S;x = [fS(z; x)g (z fresh)
such that: (i) if f (y) = , then y = z, and (ii) T j= 9R v A whenever f (y) = wR
and A(y) 2 . It follows that step 3 can be carried out in polynomial time, and thus we
obtain a polynomial-time procedure for arbitrary c-acyclic CQs.</p>
      <p>
        Answering UCQs Given a union of c-acyclic CQs Q = (P; q), we can decide whether
a 2 cert(Q; K) by testing whether a 2 cert( ; K) for some c-acyclic CQ 2 P .
Since there are only linearly many 2 P , and each check a 2 cert( ; K) takes only
polynomial time, we obtain a polynomial procedure for unions of c-acyclic CQs.
Answering acyclic queries in DL-LiteR To support role inclusions, we can replace
atoms r(x; y) by atoms qr(x; y), and add the corresponding rules qr(x; y) S(x; y)
with T j= S v r. Using the notion of tree witness in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], the modified rewriting can
be directly employed for DL-LiteR, although polynomiality can be guaranteed only in
the special cases in which the number of tree witnesses is polynomially bounded.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Answering Nearly Acyclic Queries</title>
      <p>We show how the rewriting algorithm from the previous section can be generalized to
queries which are “nearly” acyclic. Formally, we call a conjunctive query k-acyclic if
deleting k atoms from leads to a c-acyclic query3. Our goal is to show that, when k is
bounded by a constant, any k-acyclic query can be rewritten in polynomial time into
a union of c-acyclic CQs which is equivalent for the purposes of query answering.</p>
      <p>We start by showing the following:
Proposition 1. Assume is a k-acyclic CQ. Then we can obtain a UCQ Q such that:
1. each 0 2 Q is (k 1)-acyclic,
2. cert(Q; K) = cert( ; K) for any DL-Lite KB K, and
3. jQj 3.</p>
      <p>If k is bounded by a constant c, we can obtain Q in polynomial time in the size of .
Proof. Let be a -minimal set of atoms from such that n is c-acyclic. Observe
that the minimality of implies that contains only role atoms. Pick an atom =
R(x; y) in . The CQs in Q capture the three possible ways for a match to map
R(x; y) into the canonical model of K: (a) both (x); (y) are in the core, (b) (y) is
a child of (x), and (c) (x) is a child of (y). To capture (a), we consider the query
c obtained by adding to the atoms core(x) and core(y). For case (b), we compute
from the query # by marking the variables that must map into the anonymous part.
We start by marking the variable y in , and then exhaustively apply the following rule:
Suppose has an atom R1(x1; x2) or R1 (x2; x1) such that x2 is marked.
Suppose also has an atom R2(x2; x3) or R2 (x3; x2) such that x3 6= x and
x3 is not marked. If R2 = R1 , then replace in the variable x3 by x1. If
R2 6= R1 , then mark x3.</p>
      <p>The query ", which deals with case (c), is obtained from by marking x, and then
applying exhaustively the above rule modified by replacing “x3 6= x” with “x3 6= y”.
We call d (d 2 f#; "g) proper if the set of marked variables in d induces a
treeshaped query, and no core variable is marked. We let Q = f cg [ f d j d 2 f#; "g;
d is properg. It is not too difficult to show cert(Q; K) = cert( ; K) for any KB K.</p>
      <p>
        Let denote the query obtained by deleting from ; clearly is (k 1)-acyclic.
To see that c is (k 1)-acyclic, observe that c = [ fcore(x); R(x; y); core(y)g,
so G ( c n 0) = G ( n 0) for any 0 (recall that G is obtained from the query
graph by deleting edges between core variables). Thus, since is (k 1)-acyclic,
c must also be (k 1)-acyclic. Next take a proper query d, with d 2 f#; "g, and
3 We remark that k-acyclicity is inspired by the notion of bounded feedback edge sets often
considered in parameterized complexity, cf. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
let M be a simple cycle in G ( d) (if no cycle exists, d is trivially (k 1)-acyclic).
We note that M cannot use any edge involving a marked variable of d. Moreover, if
p(u; v) 2 d and none of u; v is marked, then p(u; v) 2 . This implies that M is
also a simple cycle in G ( ). In other words, G ( ) contains every simple cycle in
G ( d). Thus, since is (k 1)-acyclic, the query d is also (k 1)-acyclic.
      </p>
      <p>Provided is known, Q can be obtained in polynomial time in the size of . If k is
bounded by a constant, then can also be identified in polynomial time because the set
can be computed by considering all (polynomially many) subsets of at most k atoms.</p>
      <p>Repeated applications of Proposition 1 yield the desired polynomial reduction to
c-acyclic UCQs:
Corollary 2. For any k-acyclic query there is a UCQ Q such that:
1. each 0 2 Q is c-acyclic,
2. cert(Q; K) = cert( ; K) for any DL-Lite KB K, and
3. jQj 3k.</p>
      <p>If k is bounded by a constant, Q can be computed in polynomial time in the size of .</p>
      <p>Since c-acyclic UCQs can be answered in polynomial time using the rewriting
technique from Section 4, we obtain a polynomial-time procedure for k-acyclic CQs.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Preliminary Evaluation</title>
      <p>
        We developed a prototype rewriting system that takes as input a rooted acyclic CQ
and a DL-LiteR TBox T , and outputs an SQL statement expressing the resulting
nonrecursive datalog program rewT ( ) (using common table expressions). We evaluated
the result over ABoxes stored in a relational database, using the PostgreSQL database
system, and Owlgres [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] for loading the data.
      </p>
      <p>
        To test our prototype, we used the LUBM290 ontology described in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], which adds
concept inclusions with additional concept names, and with existential concepts on the
right hand side, to the original LUBM ontology [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. We considered three acyclic queries
from the benchmark in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] (q2, q4, and q5 from the 6 provided queries), which are
rather small (at most 4 atoms), and created three additional large acyclic queries, with
13 to 34 atoms, and 7 to 17 variables (q7, q8, and q9). We note that the new queries are
also significantly larger than the ones of the REQUIEM test suite ( 7 atoms). The
importance of handling such larger queries in practice has been previously argued in [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ].
      </p>
      <p>
        We compared our rewriting procedure with REQUIEM [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and IQAROS [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] which,
like most of the existing query rewriting systems for the DL-Lite family, generate unions
of CQs rather that non-recursive datalog programs. For the three large queries, both
REQUIEM and IQAROS did not terminate (within ten minutes). Even for the small q4
and q5, the generated rewritings were too large to be posed directly to an off-the-shelf
RDBMs: REQUIEM generated tens of thousands of queries for both, and IQAROS almost
15 thousand for q4, and almost one thousand for q5. In contrast, for our approach, the
rewriting times were negligible for all queries (under half a second). The rewritings
produced by our approach have less than 30 rules for all queries, disregarding the rules
(5) of the algorithm (since the latter are independent of the query, we computed them
separately and stored them using a database view per concept/role name).
      </p>
      <p>
        We also tested the feasibility of evaluating our rewritings over large ABoxes. For
this, we used the modified LUBM data generator [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] (with 5% incompleteness). Each
university has approximately 17k individuals, 28K concept assertions, and 47K role
assertions. We carried out our experiments on ABoxes with 20 – 200 universities,
resulting in very large ABoxes (up to ca. 1.5 GB on disk). The results reported in Table 1
show that the algorithm scales well.
      </p>
      <p>
        Finally, we note that a performance comparison with PRESTO [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], which also
outputs non-recursive datalog programs, was not possible because this system is not
publicly available. However, we can observe that its underlying algorithm may
produce exponential-size rewritings for acyclic CQs, as witnessed by the family of queries
q(x) r(x; y) ^ V0 i n p(y; zi) ^ p(ui; zi) ^ Bi(ui) coupled with e.g. the empty
TBox.4 Intuitively, the PRESTO algorithm generates a separate rule for every possible
way to select a collection of variables from fu1; : : : ; ung and identify them with y. This
exponential blow-up suggests that our positive results are not merely an artifact of the
datalog representation, but derive also from acyclicity.
      </p>
    </sec>
    <sec id="sec-7">
      <title>7 Future Work</title>
      <p>
        We plan to generalize our rewriting technique to larger tractable classes of CQs, like
bounded treewidth CQs, and also to try to identify suitable restrictions for more
expressive DLs that allow for tractable query answering. Our proof-of-concept
implementation raises hopes that efficient evaluation of large (nearly) acyclic queries is feasible,
but many challenges remain. For example, we observe that breaking down the queries
into small rules as is done by our rewriting may lead to a loss of structure that could be
used by database management systems for optimized evaluation. There are many other
aspects, not directly related to the rewriting technique, that must also be taken into
account to achieve practicable query answering, such as exploring more efficient forms of
representing data in ABoxes, using different kinds of indexes, and considering different
translations of our programs into SQL. Using semantic indexes [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] for handling the
rules of type (5) appears particularly promising.
      </p>
      <p>Acknowledgements This work was supported by a Universite´ Paris-Sud Attractivite´
grant and ANR project PAGODA ANR-12-JS02-007-01 (Bienvenu), FWF project
T515N23 (Ortiz), FWF project P25518-N23 and WWTF project ICT12-015 ( Sˇimkus),
Vienna PhD School of informatics and EU project Optique FP7-318338 (Xiao).
4 In fact, the exponential blowup occurs even without the atoms Bi(ui), but some quite obvious
modifications to the algorithm would resolve the issue. With these atoms present, it appears
non-trivial changes to the algorithm would be required.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brandt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Pushing the EL envelope</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <fpage>364</fpage>
          -
          <lpage>369</lpage>
          (
          <year>2005</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>Ortiz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simkus</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Tractable queries for lightweight description logics</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <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>Tractable reasoning and efficient query answering in description logics: The DL-Lite family</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          <volume>39</volume>
          (
          <issue>3</issue>
          ),
          <fpage>385</fpage>
          -
          <lpage>429</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Chekuri</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rajaraman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Conjunctive query containment revisited</article-title>
          .
          <source>In: Proc. of ICDT</source>
          . pp.
          <fpage>56</fpage>
          -
          <lpage>70</lpage>
          . Springer (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Dantsin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Voronkov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Complexity and expressive power of logic programming</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>33</volume>
          (
          <issue>3</issue>
          ),
          <fpage>374</fpage>
          -
          <lpage>425</lpage>
          (
          <year>Sep 2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Festa</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pardalos</surname>
            ,
            <given-names>P.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Resende</surname>
            ,
            <given-names>M.G.C.</given-names>
          </string-name>
          :
          <article-title>Feedback set problems</article-title>
          .
          <source>In: Handbook of Combinatorial Optimization</source>
          . pp.
          <fpage>209</fpage>
          -
          <lpage>258</lpage>
          . Kluwer Academic Publishers (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Hypertree decompositions and tractable queries</article-title>
          .
          <source>In: Proc. of the Eighteenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems</source>
          . pp.
          <fpage>21</fpage>
          -
          <lpage>32</lpage>
          . ACM Press (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heflin</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>LUBM: A benchmark for OWL knowledge base systems</article-title>
          .
          <source>J. Web Sem</source>
          .
          <volume>3</volume>
          (
          <issue>2-3</issue>
          ),
          <fpage>158</fpage>
          -
          <lpage>182</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kikot</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>On (in)tractability of OBDA with OWL 2 QL</article-title>
          . In: Description Logics (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Kikot</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Conjunctive query answering with OWL 2 QL</article-title>
          . In
          <source>: Proc. of KR</source>
          . AAAI Press (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The combined approach to query answering in DL-Lite</article-title>
          .
          <source>In: Proc. of KR</source>
          . AAAI Press (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Levy</surname>
            ,
            <given-names>A.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rousset</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          :
          <article-title>Combining Horn rules and description logics in CARIN</article-title>
          . Artif. Intell.
          <volume>104</volume>
          (
          <issue>1-2</issue>
          ),
          <fpage>165</fpage>
          -
          <lpage>209</lpage>
          (
          <year>1998</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>Seylan</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The combined approach to OBDA: Taming role hierarchies using filters (with appendix)</article-title>
          .
          <source>In: Proc. of SSWS+HPCSW</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. OWL Working Group, W.:
          <article-title>OWL 2 Web Ontology Language: Document Overview</article-title>
          . W3C
          <string-name>
            <surname>Recommendation</surname>
          </string-name>
          (
          <year>2009</year>
          ), available at http://www.w3.org/TR/owl2-overview/
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Pe</surname>
          </string-name>
          <article-title>´rez-</article-title>
          <string-name>
            <surname>Urbina</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.:</given-names>
          </string-name>
          <article-title>A comparison of query rewriting techniques for DL-Lite</article-title>
          . In: Description Logics.
          <article-title>CEUR-WS.org (</article-title>
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Picalausa</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vansummeren</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>What are real SPARQL queries like</article-title>
          ?
          <source>In: Proc. of SWIM. ACM</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>High performance query answering over DL-Lite ontologies</article-title>
          .
          <source>In: Proc. of KR</source>
          . pp.
          <fpage>308</fpage>
          -
          <lpage>318</lpage>
          . AAAI Press (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almatelli</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Improving query answering over DL-Lite ontologies</article-title>
          .
          <source>In: Proc. of KR</source>
          . AAAI Press (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Stocker</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Owlgres: A scalable OWL reasoner</article-title>
          .
          <source>In: Proc. of OWLED. CEURWS.org</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Venetis</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stoilos</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamou</surname>
            ,
            <given-names>G.B.</given-names>
          </string-name>
          :
          <article-title>Incremental query rewriting for OWL 2 QL</article-title>
          . In: Description Logics.
          <article-title>CEUR-WS.org (</article-title>
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Yannakakis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Algorithms for acyclic database schemes</article-title>
          .
          <source>In: Proc. of VLDB</source>
          . pp.
          <fpage>82</fpage>
          -
          <lpage>94</lpage>
          . IEEE Computer Society (
          <year>1981</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>