<!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>Using the TBox to Optimise SPARQL Queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Birte Glimm</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yevgeny Kazakov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ilianna Kollia</string-name>
          <email>ilianna2@mail.ntua.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgos Stamou</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Technical University of Athens</institution>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Ulm</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present an approach for using schema knowledge from the TBox to optimise the evaluation of SPARQL queries. The queries are evaluated over an OWL ontology using the OWL Direct Semantics entailment regime. For conjunctive instance queries, we proceed by transforming the query into an ABox. We then show how the TBox and this (small) query ABox can be used to build an equivalent query where the additional query atoms can be used for reducing the set of possible mappings for query variables. We also consider arbitrary SPARQL queries and show how the concept and role hierarchies can be used to prune the search space of possible answers based on the polarity of variable occurrences in the query.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In this paper, we consider the SPARQL 1.1 query language [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which was recently
standardised by the World Wide Web Consortium (W3C). SPARQL 1.1 includes
several entailment regimes [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] in order to use entailment when evaluating a query. In this
paper, we consider SPARQL queries evaluated using OWL’s Direct Semantics
Entailment [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. In this setting, the WHERE clause or query pattern of a query can be seen
as a set of extended OWL or Description Logic (DL) axioms, which can have variables
in place of concept, role or individual names. Our goal in this paper is to optimise the
evaluation of such query patterns.
      </p>
      <p>
        Over the last decade, much e ort has been spent on optimising standard reasoning
tasks such as entailment checking, classification, or realisation (i.e., the computation
of instances of all concepts and roles) [
        <xref ref-type="bibr" rid="ref18 ref22 ref3">3, 18, 22</xref>
        ]. The optimisation of query
answering algorithms has, however, mostly been addressed for conjunctive queries in OWL
profiles, most notably the OWL 2 QL profile [
        <xref ref-type="bibr" rid="ref13 ref16 ref2 ref24">2, 13, 16</xref>
        ]. An exception to this are the
works on nRQL [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], SPARQL-DL [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], and our previous work [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].3 The query
language nRQL is supported by Racer Pro [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and allows for queries that go beyond ABox
queries, e.g., one can retrieve sub- or super-concepts of a given concept. SPARQL-DL is
a fragment of SPARQL implemented in the Pellet reasoner [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. The kinds of SPARQL
queries that are supported in SPARQL-DL are those that can directly be mapped to
reasoner tasks. Furthermore, KAON2 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] supports SPARQL queries, but restricted to
ABox queries/conjunctive instance queries. In our previous work [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], we propose
algorithms for arbitrary SPARQL queries and optimisation techniques mainly based on
cost-based query planning. The system is implemented as a SPARQL Wrapper that can
3 An implementation is available at http://code.google.com/p/owl-bgp/
be used with any reasoner that implements the OWLReasoner interface of the OWL
API [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Finally, TrOWL4 supports SPARQL queries based on our SPARQL wrapper,
but the reasoning in TrOWL is approximate, i.e., an OWL DL ontology is rewritten into
an ontology that uses a less expressive language before reasoning is applied [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. A
promising, but still very preliminary work is also the Semantic Web Entailment Regime
Translation and Inference Architecture (Swertia);5 a generic Semantic Web reasoning
framework that is based on first-order logic (FOL) reasoning.
      </p>
      <p>
        The contribution of this paper is two-fold: first, we present an optimisation that is
applicable to conjunctive instance queries. We show that one can compute an equivalent
query qˆ for a given query q by replacing the variables in q with fresh individual names.
We then perform realisation, i.e., we materialise entailed concept and role assertions,
for the queried TBox and (small) query ABox. Replacing the individual names again
with the corresponding variable names then yields qˆ. The additional query atoms in qˆ
can then be used for reducing the set of possible mappings for query variables. Second,
we propose an optimisation for also reducing the possible mappings for concept and
role variables by exploiting the polarity of variable occurrences in the query and the
(precomputed) concept and role hierarchies. We provide a prototypical implementation
and evaluation of the polarity based optimisation, which shows that it can lead to an
improvement of up to two orders of magnitude in the execution times of some queries.
The polarity based optimisation can be found in more detail in our earlier work [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>
        Due to lack of space, we do not introduce the Description Logic SH IQ, which we use
throughout the paper. For further details, we refer interested readers to the DL handbook
[
        <xref ref-type="bibr" rid="ref1 ref23">1</xref>
        ]. We assume that a knowledge base K is a pair (T ; A) with T a TBox that possibly
includes role inclusion axioms and A an ABox.
      </p>
      <p>In this paper, we consider conjunctive instance queries and complex queries, which
can also contain axioms with variables in place of concept or role names. Such queries
are important in the context of SPARQL since SPARQL’s OWL Direct Semantics
entailment regime allows for such queries. Conjunctive instance queries are a subset of all
such SPARQL queries, but they di er from database-style conjunctive queries in that
they do not allow for existentially quantified or non-distinguished variables.
Definition 1 (Conjunctive Instance and Complex Queries). Let S = (NC; NR; NI) be
a signature, K a knowledge base over S, and V = VC ]VR ]VI a countably infinite set of
variable names (concept variables in VC, role variables in VR, and individual variables
in VI) disjoint from NC, NR, and NI. Let A 2 NC, r 2 NR, and x; y 2 VI. A concept atom is
an expression A(x) and a role atom is an expression r(x; y). A conjunctive instance query
q is a non-empty set of (concept or role) atoms. The set of SH IQ concept templates
(or concept templates for short) over S and V is built as the set of SH IQ concepts,
where a concept variable can be used in place of a concept name, and a role variable
in place of a role name. A role axiom template has the form r v s where r; s 2 NR [ VR.
4 http://trowl.eu
5 http://swertia.org</p>
      <sec id="sec-2-1">
        <title>A concept axiom template has the form c v d with c; d concept templates. We again</title>
        <p>abbreviate c v d and d v c as c d. A finite set of role axiom templates, concept axiom
templates, and (concept or role) atoms is called a complex query. We use Var(q) for
the set of variables in q. and jVar(q)j is called the arity of q.</p>
        <p>Let q = fat1; : : : ; atng be a (conjunctive instance or complex) query. A total function
: Var(q) ! NC [NR [NI is a mapping for q over K if (v) 2 NC if v 2 VC, (v) 2 NR if
v 2 VR, and (v) 2 NI if v 2 VI. Let X = fx1; : : : ; xng Var(q) a subset of the variables
of q, and M = f 1; : : : ; mg a set of mappings for q. The projection of X over M is the
set MjX = ffx 7! ag j 2 M; x 2 X and (x) = ag. A mapping is a certain answer
for q over K if K j= (at) for each at 2 q, written K j= (q), where (at) ( (q)) is the
result of replacing each v 2 Var(at) (Var (q)) with (v). We denote the set of all certain
answers for q over K with ans(K ; q).
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Query Answering via Approximate Instance Retrieval</title>
      <p>
        In this section, we use the DL SH IQ and we present a technique that uses
approximate reasoning algorithms in order to optimise the evaluation of conjunctive instance
queries. Approximate reasoning algorithms can either be sound and incomplete [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
i.e., they underapproximate the set of certain or known answers or they can be complete
but unsound [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], i.e., they overapproximate the set of certain answers. Typical
examples of such algorithms rewrite a knowledge base into a simpler logic in such a way
that computing the results over the simplified knowledge base yields the desired
underor overapproximation. Another possibility is to use a pre-model or complete and clash
free tableau generated by a DL reasoner [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. One can then read-o certain instances of
concepts or roles by analysing which concept and role facts have been added
deterministically to the pre-model, i.e., one can obtain an underapproximation for concept and
role instances. Similarly, one can analyse the non-deterministically added and absent
concept and role facts to compute an overapproximation. More formally, we define an
approximate instance retrieval algorithm as follows:
Definition 2 (Approximate Instance Retrieval Algorithm). Let K = hT ; Ai be a
knowledge base and at a concept or role atom such that the concept or role is from the
signature of K . An approximate instance retrieval algorithm inst(K ; at) returns a pair
of sets of (total) functions from Var(at) to individual names from K , hK[at]; P[at]i, such
that:
1. if 2 K[at], then K j= (at), and
2. for each total function from Var(at) to individual names from K such that K j=
(at), 2 K[at] [ P[at].
      </p>
      <p>Similarly, we define approximate query answering algorithms:
Definition 3 (Approximate Query Answering Algorithm). Let K = hT ; Ai be a
knowledge base, and q a conjunctive instance query. An approximate query
answering algorithm apprQA(K ; q) returns a pair of sets of (total) functions from Var(q) to
individual names from K hK[q]; P[q]i such that:
1. if 2 K[q], then 2 ans(K ; q), and</p>
      <sec id="sec-3-1">
        <title>2. for each total function from V ar(q) to individual names from K such that ans(K ; q), 2 K[q] [ P[q].</title>
        <p>Without loss of generality, in the rest of the paper we assume that for every
approximate instance retrieval or query answering algorithm K[ ] \ P[ ] = ; holds. It is not
di cult to see that an obvious approach to develop an approximate query answering
algorithm apprQA is to use an approximate instance retrieval algorithm inst. A naive
method to do this is to execute inst and take K[ ] [ P[ ] for each query atom and then
compute the join of these sets, where we straightforwardly interpret the mappings as
relations. The following example illustrates that some possible answers can be easily
rejected.</p>
        <p>For ease of presentation we represent mappings as tuples in the examples that
follow, i.e., abusing notation, K[at] is a set of individuals for concept atoms and a set of
pairs of individuals for role atoms and K[q] is a set of n-tuples, n being the arity of q.
Example 1. Let K = hT ; Ai be a knowledge base and q = fC(x); r(x; y); D(y)g a query
with variables hx; yi. Suppose that (possibly as a result of inst(K ; C(x)), inst(K ; r(x; y))
and inst(K ; D(y))) we have K[C(x)] = fag, P[C(x)] = fbg, K[r(x; y)] = fha; ci)g,
P[r(x; y)] = fhb; di; hb; eig, K[D(y)] = fcg and P[D(y)] = fdg. Even if we do not know K ,
we can conclude that ha; ci is a certain answer to q, since a 2 K[C(x)], ha; ci 2 K[r(x; y)]
and c 2 K[D(y)]. However, only hb; di is a possible answer for q since b 2 P[C(x)],
hb; di 2 P[r(x; y)] and d 2 P[D(y)]; hb; ei cannot be an answer for q since although
hb; ei 2 P[r(x; y)] and b 2 P[C(x)], e &lt; K[D(y)] [ P[D(y)].</p>
        <p>Algorithm intersecQans (see Algorithm 1) formalises this idea, which we also illustrate
in Example 2:
Example 2. If we take q from Example 1 in the order given, we first initialise K[q] to
fag and P[q] to fbg. During the next iterations, the (preliminary) set K[q] is extended
by performing a natural join with the known answers for the current atom at. The set
P[q] is extended by performing a natural join of P[q] with both K[at] and P[at] and
of K[q] with P[at]. For Example 1, we next process r(x; y) and obtain K[q] = fha; cig
and P[q] = fhb; di; hb; eig. We finally process D(y) and keep K[q] = fha; cig and P[q] =
fhb; dig.</p>
        <sec id="sec-3-1-1">
          <title>Lemma 1. Algorithm intersecQans is an approximate query answering algorithm.</title>
          <p>Concerning the optimisation of algorithm intersecQans, in practice, one would use
well-known ordering strategies from the area of databases for the atoms in q in order to
reduce the number of intermediate results, e.g., one would prefer joins over connected
atoms and join a small relation with a bigger one where possible. The question now is:
given a knowledge base K and a query q, how we can further reduce the cardinality of
P[q] computed by intersecQans with the aid of inst.</p>
          <p>Example 3. Suppose that we have K and q = fC(x); r(x; y); D(y)g as in Example 1 and,
in addition, we are given that K j= 9r:&gt; u C v B and inst(K ; B(x)) = hfag; ;i. From
Example 2, we have K[q] = fha; cig and P[q] = fhb; dig. In this case, hb; di is no longer
Algorithm 1 intersecQans(K ; q)
Require: K = hT ; Ai: a SH IQ knowledge base</p>
          <p>q: a conjunctive query
Ensure: hK[q]; P[q]i: K[q]; P[q] sets of known and possible answers for q
1: for at 2 q do
2: hK[at]; P[at]i := inst(K ; at)
3: if K[q] and P[q] not initialised then
4: hK[q]; P[q]i := hK[at]; P[at]i
5: else
6: K[q] := K[q] ./ K[at]
7: P[q] := (P[q] ./ P[at]) [ (K[q] ./ P[at]) [ (P[q] ./ K[at])
8: end if
9: end for
10: return hK[q]; P[q]i
a possible answer of q. If b would be a possible mapping for x, it would have an
rsuccessor (since r(x; y) 2 q) and it would be an instance of C (since C(x) 2 q) and,
hence, b should be in K[B(x)] [ P[B(x)] to satisfy the entailed axiom.
We now define the notion of restricting atoms such as B(x).</p>
          <p>Definition 4 (Restricting Atoms). Let K = hT ; Ai be a knowledge base, q a
conjunctive instance query, at a query atom with V ar(at) V ar(q), and inst an approximate
instance retrieval algorithm. Then we say that at restricts q if</p>
          <p>P[q]jVar(at) \ (K[at] [ P[at])</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>P[q]jVar(at)</title>
        <p>where hK[q]; P[q]i = intersecQans(K ; q) and hK[at]; P[at]i = inst(K ; at).
Example 4. Going back to Example 3, we find that B(x) is indeed a restricting atom
for q according to Definition 4 since we have P[q]jfxg = fbg and P[q]jfxg \ (K[B(x)] [
P[B(x)]) = ;, which clearly is a subset of P[q]jfxg.</p>
        <p>If we want to preserve the certain answers of q, we should only use restricting atoms
that do not change the answers of q. Let q and q0 be conjunctive instance queries such
that q0 = q [ fatg. If q and q0 are equivalent queries, i.e., q and q0 yield the same
answers over a fixed TBox and any ABox, and at restricts q, then we can safely prune
the set of possible answers for q with the help of at. Obviously, we could also use more
than one restricting atom to even further restrict q. Since such atoms are not given as
input, we address the problem of (e ciently) computing such restricting atoms within
an approximate query answering algorithm after showing that using restricting atoms
for queries indeed preserves the certain answers.</p>
        <p>Lemma 2. Let K = hT ; Ai be a knowledge base, q and q0 two queries such that q0 =
q [ fatg, ans(K ; q) = ans(K ; q0), hK[q]; P[q]i = intersecQans(K ; q), hK[at]; P[at]i =
inst(K ; at), and at restricts P[q].</p>
      </sec>
      <sec id="sec-3-3">
        <title>1. An algorithm that returns hK[q]; f 2 P[q] j jVar(at) 2 (K[at] [ P[at])gi given K</title>
        <p>and q as input is an approximate query answering algorithm and</p>
        <p>
          In order to define an improved approximate query answering algorithm based on
Lemma 2, we need to find a way of computing such restricting atoms. In the following,
we will see how we can use the TBox for this aim. The proposed query extension
technique is analogous to the use of the chase technique in relational database theory to
reason about conjunctive query containment [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>Definition 5 (Query Extension). Let T be a TBox, q a query, and f a total and bijec</title>
        <p>tive function from Var(q) to a set of individual names from NI . The canonical ABox for
q w.r.t. f is defined as follows:</p>
        <p>Aqf = fB( f (x)) j B(x) 2 qg [ fr( f (x); f (y)) j r(x; y) 2 qg
The extended canonical ABox Aˆqf for q w.r.t. f is defined as:</p>
        <p>Aˆqf = fB(a) j B 2 NC; a 2 Ind(Aqf ) and hT ; Aqf i j= B(a)g [</p>
        <p>fr(a; b) j r 2 NR; a; b 2 Ind(Aqf ) and hT ; Aqf i j= r(a; b)g:
The extended query qˆ w.r.t. f and Aˆqf is:
qˆ = fB( f (a)) j B(a) 2 Aq g [ fr( f (a); f (b)) j r(a; b) 2 Aˆqf g:</p>
        <p>ˆ f
fErxoammEplxeam5.pSleu3p.pIonsethwisechaasvee, KthesucacnhotnhiactaKlAj=Bo9xr:o&gt;fuqCisvABqf a=ndfCq(=ax)fC;r((xa)x;;ra(yx);;yD);(Day()yg)g
where f maps a variable v 2 fx; y; zg to the individual name av. The extended canonical
ABox for the query q w.r.t. f is Aˆqf = fC(ax); r(ax; ay); D(ay); B(ax)g and the extended
query w.r.t. Aˆqf is qˆ = fC(x); r(x; y); D(y); B(x)g. Please note that qˆ has the same answers
as q (w.r.t. any ABox), because K j= 9r:&gt; u C v B.</p>
        <sec id="sec-3-4-1">
          <title>Lemma 3. The extended query qˆ created as in Definition 5 is unique.</title>
          <p>Intuitively (see Example 5), the extended query qˆ w.r.t. Aˆqf adds atoms to q that do not
change the set of answers of q, which we formalise by the following Theorem:</p>
        </sec>
      </sec>
      <sec id="sec-3-5">
        <title>Theorem 1. Let T be a TBox, q a query, and qˆ the extended query as in Definition 5. Then, T j= q qˆ, i.e., for any ABox A0, ans(hT ; A0i; q) = ans(hT ; A0i; qˆ)</title>
        <p>Given a conjunctive instance query q and a knowledge base K = hT ; Ai, we can
now compute the known and possible answers with Algorithm 1. We then compute the
extended canonical ABox Aˆqf and the extended query qˆ for some suitable bijection f .
Note that we do not have to consider the (often large) ABox A from K for computing qˆ.
For each atom at 2 qˆ n q, we can then use our approximate instance retrieval algorithm
to check whether at restricts q and reduce the set of possible answers P[q] accordingly.</p>
        <p>Although K[ ] and P[ ] are often fast to compute (due to the use of simpler
approximate reasoning algorithms or since the sets are simply extracted from a pre-model) and
often cached, it is not very e cient to always retrieve all required such sets from the
reasoner in order to perform the required joins. Hence, in our future work, we plan to
just use the cardinalities of the sets K[ ] and P[ ]. The idea is to use the cardinalities of
restricting atoms from qˆ to more precisely estimate the cardinalities of atoms in q. This
will allow for a better ordering of the query atoms in cost-based query planning.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Beyond Conjunctive Instance Queries</title>
      <p>Since conjunctive instance queries are only a subset of the queries that are important
in the context of SPARQL, we present, in this section, an optimisation that aims at
improving the performance for evaluating arbitrary complex queries. In general for a
complex query q = fat1; : : : ; atng, we partition q into two sets qs and qc such that qs is the
maximal conjunctive instance sub-query of q and qc contains the axiom templates. We
first evaluate qs, e.g., by employing optimisation techniques as described in the previous
section. The intermediate results can then already be used to reduce the possible answers
for qc. In order to optimise the evaluation of qc, we assume that the concepts and roles
are classified (this is often done before a system accepts any queries), which means that
axiom templates of the form x v A with x 2 VC, A 2 NC require only cache lookups.
We use the hierarchies to prune the search space of solutions in the evaluation of certain
axiom templates as illustrated with the following example:
Example 6. Let q = fInfection v 9hasCausalLinkTo:xg with x 2 VC a concept variable
and K some knowledge base. If, mapping x to the concept name A, does not yield
an entailed axiom and K j= B v A holds, then B is also not a certain answer. Thus,
when searching for certain answers, we choose the next binding to test by traversing the
concept hierarchy top-down. When we find a non-answer A, the subtree rooted in A of
the concept hierarchy can safely be pruned. Queries over ontologies with a large number
of concepts and a deep concept hierarchy can, therefore, gain the maximum advantage
from this optimisation. We employ similar optimisations using the role hierarchy.</p>
      <p>In the example above, we can prune the subconcepts of A because x has positive
polarity in the axiom, i.e., x occurs positively and not under a negation. In case a variable
occurs negatively, e.g., directly or indirectly under a negation or positively on the
lefthand side of an axiom, one can, instead, prune the superclasses. We next specify more
precisely the polarity of a concept variable in a concept axiom template.
Definition 6. Let x 2 VC be a concept variable and C; C1; C2; D concept axiom
templates, r a role, and n 2 IN0. We define the polarity of x in D as follows: x occurs
positively in x. Furthermore, x occurs positively (negatively) in
– :C if x occurs negatively (positively) in C,
– C1 u C2 or C1 t C2 if x occurs positively (negatively) in C1 or C2,
– 9r:C, 8r:C, or &gt; n r:C if x occurs positively (negatively) in C,
– 6 n r:C if x occurs negatively (positively) in C
– = n r:C if x occurs in C.</p>
      <sec id="sec-4-1">
        <title>We further say that x occurs positively (negatively) in C1 v C2 if x occurs negatively</title>
        <p>(positively) in C1 or positively (negatively) in C2. We further define a partial function
polc that maps a concept variable x and a concept template C (axiom template of the
form C1 v C2) to pos if x occurs only positively in C (C1 v C2) and to neg if x occurs
only negatively in C (C1 v C2).</p>
        <p>Note that x can also occur both positively and negatively. Note also that no matter
whether x occurs positively or negatively in a concept C, in any concept of the form
(= n r:C), x occurs positively as well as negatively. This is due to the fact that (= n r:C)
is equivalent to the concept template 6 n r:C u &gt; n r:C in which x occurs positively as
well as negatively in C.</p>
        <p>Since the function polc is not defined for variables that appear both positively and
negatively, the concept hierarchy cannot be exploited in this case. For example, consider
the concept axiom template :x t 9r:x with x 2 VC (i.e., x v 9r:x), where x appears
negatively in :x and positively in 9r:x. Now, let 2 I be an arbitrary element from a
model I = ( I; I) of the queried knowledge base. It is obvious that if is an instance
of :A t 9r:A and either A v B or B v A holds, we cannot deduce that is an instance
of :B t 9r:B.</p>
        <p>The following theorem holds for every axiom template of the form C1 v C2. We
use C (x)=A with A 2 NC to denote the concept obtained by applying the extension of
that also maps x to A.</p>
        <p>Theorem 2. Let K be a knowledge base, A; B concept names such that K j= A v B,
C1; C2 concept templates, C = :C1 t C2, x 2 VC a concept variable occurring in C,
and a mapping that covers all variables of C apart from x.
1. If polc(x; C) = pos and K 6j= (C1 v C2) (x)=B, then K 6j= (C1 v C2) (x)=A.
2. If polc(x; C) = neg and K 6j= (C1 v C2) (x)=A, then K 6j= (C1 v C2) (x)=B.
We now extend this optimisation to the case of role variables and we first define the
polarity of a role variable in a concept axiom template.</p>
        <p>Definition 7. Let x 2 VR be a role variable, C; C1; C2; D concept templates, r a role,
and n 2 IN0. We define the polarity of x in D as follows: x occurs positively in 9x:C,
9x :C, &gt; n x:C, &gt; n x :C, = n x:C, and = n x :C; x occurs negatively in 8x:C,
8x :C, 6 n x:C, 6 n x :C, = n x:C, and = n x :C. Furthermore, x occurs positively
(negatively) in
– :C if x occurs negatively (positively) in C,
– C1 u C2 or C1 t C2 if x occurs positively (negatively) in C1 or C2,
– 9r:C, 9x:C, 9x :C, &gt; n r:C, &gt; n x:C, &gt; n x :C, 8r:C, 8x:C, or 8x :C if x occurs
positively (negatively) in C,
– 6 n r:C, 6 n x:C, or 6 n x :C if x occurs negatively (positively) in C,
– = n r:C if x occurs in C.</p>
      </sec>
      <sec id="sec-4-2">
        <title>We further say that x occurs positively (negatively) in C1 v C2 if x occurs negatively</title>
        <p>(positively) in C1 or positively (negatively) in C2. We define a partial function polr that
maps a role variable x and a concept template C (axiom template of the form C1 v C2)
to pos if x occurs only positively in C (C1 v C2) and to neg if x occurs only negatively
in C (C1 v C2).</p>
        <p>We now show, that the hierarchy optimisation is also applicable to role variables,
provided they occur only positively or only negatively.</p>
        <p>Theorem 3. Let K be a knowledge base, r; s role names such that K j= r v s, C1; C2
concept templates, C = :C1 t C2, x 2 VR a role variable occurring in C, and a
mapping that covers all variables of C apart from x.</p>
        <p>Algorithm 2 getPossibleConceptVarMappings(x; ; at; K )
Require: x: a concept variable, : a partial mapping with x 2 dom( )
at: an axiom template in which x occurs, K : a SHIQ knowledge base
Ensure: a set of possible answers for x
if polc(x; at) == pos then</p>
        <p>return f 0 j 0(x) =C; C is direct subconcept of (x) in K ; 0(y) = (y) for y 2 dom( )nfxgg
else</p>
        <p>return f 0 j 0(x) =C; C is direct superconcept of (x) in K ; 0(y) = (y) for y 2 dom( )nfxgg
end if
1. If polr(x; C) = pos and K 6j= (C1 v C2) (x)=s, then K 6j= (C1 v C2) (x)=r.
2. If polr(x; C) = neg and K 6j= (C1 v C2) (x)=r, then K 6j= (C1 v C2) (x)=s.</p>
        <p>Algorithm 2 shows how we use the above theorems to create possible concept
mappings for a concept variable x that appears only positively or only negatively in an axiom
template C1 v C2. We can define a similar algorithm for role variables. Hence, an
algorithm for evaluating complex queries can call these algorithms to prune the search
space once a solution for such a concept or role variable has been found, e.g., by
checking entailment for an instantiated axiom template.
4.1</p>
        <p>Complex Axiom Template Evaluation
In the absence of suitable standard benchmarks for complex queries or SPARQL queries
over OWL ontologies, we created a custom set of queries as shown in Tables 1 and 2
for the GALEN and the FBbt XP ontology, respectively. Systems that fully support
the SPARQL Direct Semantics entailment regime are still under development, which
makes it hard to compare our results for these kinds of queries with other systems. All
experiments were performed on a Mac OS X Lion machine with a 2.53 GHz Intel Core
i7 processor and Java 1.6 allowing 1GB of Java heap space. We measure the time for
one-o tasks such as classification separately since such tasks are usually performed
before the system accepts queries. The ontologies and all code required to perform
the experiments are available online.6 For the evaluation we have used the HermiT7
hypertableau reasoner.</p>
        <p>GALEN is a biomedical knowledge base. Its expressivity is (Horn-)SH IF and
it consists of 2,748 concepts and 413 abstract roles. FBbt XP is an ontology taken
from the Open Biological Ontologies (OBO) Foundry.8 Its expressivity is SH I and the
knowledge base consists of 7,221 concepts and 21 roles. We only consider the TBox
part of FBbt XP since the ABox is not relevant for showing the e ects of the
optimisation for concept axiom templates. GALEN took 3.7 s to load and 11.1 s to classify
(concepts and roles), while FBbt XP took 1.5 s to load and 7.4 s to classify.</p>
        <p>For each query, we tested the execution once with (bold results) and once without
the proposed optimisation. The tables also show the number of consistency checks that
were performed for the evaluation of each query.
6 http://code.google.com/p/query-ordering/
7 http://www.hermit-reasoner.com/
8 http://www.obofoundry.org/</p>
        <p>GALEN Queries: As expected, an increase in the number of variables within an
axiom template leads to a significant increase in the query execution time because the
number of mappings that have to be checked grows exponentially in the number of
variables. This can, in particular, be observed from the di erence in execution time between
the first two queries, where it is also evident that the use of the hierarchy exploitation
optimisation leads to a decrease in execution time of up to two orders of magnitude. In
the last query, the hierarchy exploitation optimisation does not improve the execution
time since the variables on which the hierarchy optimisation can be applied, are already
bound when it comes to the evaluation of the complex templates. Hence, the running
times with and without the hierarchy exploitation are similar. The number of
consistency checks for this query is significantly lower than the number of answers because
the overall results are computed by taking the cartesian products of the results for the
two connected components of the query. Although our optimisations can significantly
improve the query execution time, the required time can still be quite high. In practice,
it is, therefore, advisable to add as many restrictive axiom templates (axiom templates
which require only cache lookups) for query variables as possible. For example, the
addition of y v Shape to the forth query reduces the runtime from 1.12 s to 0.65 s.</p>
        <p>FBbt XP Queries: We observe that in some queries the e ect of the hierarchy
exploitation is more profound than in others. More precisely, the smaller the ratio of
the result size to the number of consistency checks without the hierarchy optimisation,
the more pronounced is the e ect when enabling this optimisation. In other words,
when more tested mappings are indeed solutions, one can prune fewer parts of the
hierarchy since pruning can only be performed when we find a non-solution. For the
second query, we even observe a slight increase in running time when the hierarchy
optimisation is used. This is because the optimisation can only prune few candidate
mappings, which does not outweigh the overhead caused by maintaining information
about which hierarchy parts have already been tested. For the last query, the number of
consistency checks with the hierarchy optimisation is less than the result size (32; 490
versus 43; 338) since only the third axiom template of the query requires consistency
checks, whereas bindings for y and x1 can be looked up from the cached concept and
role hierarchy.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In the current paper we presented an approach for using the TBox of a knowledge
base to optimise SPARQL queries evaluated using the OWL Direct Semantics
entailment regime. For conjunctive instance queries we showed how we can build equivalent
queries with additional atoms which can be exploited to reduce the set of possible
mappings for query variables. Conditions were defined for this purpose which identify the
cases in which such a reduction is achieved. For queries that go beyond conjunctive
instance queries we provide a highly e ective and frequently applicable optimisation
which prunes the number of candidate solutions that have to be checked by
exploiting the concept and role hierarchy. One can, usually, assume that these hierarchies are
computed before a system accepts queries. Our empirical evaluation shows that this
optimisation can reduce the query evaluation times up to two orders of magnitude.
Acknowledgements This work was supported by IKY in collaboration with DAAD in
the program IKYDA: Automatic data generation for description logic knowledge bases.</p>
    </sec>
    <sec id="sec-6">
      <title>Proofs</title>
      <sec id="sec-6-1">
        <title>Lemma (1). Algorithm intersecQans is an approximate query answering algorithm.</title>
        <p>Proof (Proof of Lemma 1). We prove the lemma by induction on the length of the
query q given as input to the algorithm intersecQans(K ; q). For q = fatg the two
conditions of the definition of approximate query answering algorithms are satisfied. Indeed,</p>
        <p>(at) (since inst(K ; at) is an approximate
instance retrieval algorithm), which means that K j=
(q).
2. for each total function
from Var(q) to individual names from K such that
2
ans(K ; q), i.e.,
2 ans(K ; at), i.e., K j
=
(at), it holds
2 K[at] [ P[at] (since
inst(K ; at) is an approximate instance retrieval algorithm), i.e.,
2 K[q] [ P[q].
algorithm by showing that the two conditions of Definition 3 hold for q0.
Let q0 = q [ fatg and let us assume that intersecQans(K ; q) is an approximate query
answering algorithm. We prove that inst(K ; q0) is also an approximate query answering
1. If</p>
        <p>2 K[q0], this means that jVar(q) 2 K[q] and jVar(at) 2 K[at] (it can easily be
seen from the construction K[q0] in intersecQans(K ; q0)). By induction
hypothesis jVar(q) 2 ans(K ; q) and, since inst(K ; at) is an approximate instance retrieval
algorithm, K j=
jVar(at)(at). Since
= jVar(q) ./ jVar(at), it holds
2 ans(K ; q0).
2. For each total function
from Var(q) to individual names from K such that
2
ans(K ; q0), it holds jVar(q) 2 ans(K ; q) and K j=
jVar(at)(at). By the induction
hypothesis, jVar(q) 2 K[q] [ P[q] and jVar(at) 2 K[at] [ P[at]. It holds
= jVar(q) ./
jVar(at). We distinguish between the following cases:
– if jVar(q) 2 K[q] and jVar(at) 2 K[at], then
2 K[q0]
– if jVar(q) 2 K[q] and jVar(at) 2 P[at], then
– if jVar(q) 2 P[q] and jVar(at) 2 K[at], then
– if jVar(q) 2 P[q] and jVar(at) 2 P[at], then
We see from the above that in any case
2 P[q0]
2 P[q0]
2 P[q0]
2 K[q0] [ P[q0].</p>
        <p>tu
inst(K ; at), and at restricts P[q].</p>
        <p>Lemma (2). Let K = hT ; Ai be a knowledge base, q and q0 two queries such that q0 =
q [ fatg, ans(K ; q) = ans(K ; q0), hK[q]; P[q]i = intersecQans(K ; q), hK[at]; P[at]i =
and q as input is an approximate query answering algorithm and</p>
        <sec id="sec-6-1-1">
          <title>1. An algorithm that returns hK[q]; f</title>
        </sec>
        <sec id="sec-6-1-2">
          <title>2 P[q] j jVar(at) 2 (K[at] [ P[at])gi given K 2. jf 2 P[q] j jVar(at) 2 (K[at] [ P[at])gj &lt; jP[q]j.</title>
          <p>Proof (Proof of Lemma 2). For the first claim, according to Lemma 1, intersecQans(K ; q)
is an approximate query answering algorithm. Hence, the first condition on
approximate query answering algorithms is satisfied. For the second condition and in
contrary to what is to be shown, assume there is some
such that
&lt; K[q] [ f 2 P[q] j jVar(at) 2 (K[at] [ P[at])g, i.e., jVar(at) &lt; K[at] [ P[at]. By
Definition 4 and since at restricts P[q], we have Var(at)
Var(q) and all variables from at
are in the domain of . Since inst(K ; at) is an approximate instance retrieval algorithm,
2 ans(K ; q), but
Then, T j= q</p>
          <p>qˆ, i.e., for any ABox A0, ans(hT ; A0i; q) = ans(hT ; A0i; qˆ).</p>
        </sec>
        <sec id="sec-6-1-3">
          <title>Theorem (1). Let T be a TBox, q a query, and qˆ the extended query as in Definition 5.</title>
        </sec>
      </sec>
      <sec id="sec-6-2">
        <title>Proof (Proof of Theorem 1).</title>
        <p>We want to prove that for any ABox A, ans(hT ; Ai; q) = ans(hT ; Ai; qˆ), i.e.,
ans(hT ; Ai; q)
ans(hT ; Ai; qˆ) and ans(hT ; Ai; qˆ)
ans(hT ; Ai; q). From
Definition 5 it is easily seen that Var(q) = Var(qˆ) and since q has more atoms (is more
restricting) than q, it holds ans(hT ; Ai; qˆ)
ans(hT ; Ai; q). We will now show that
ans(hT ; Ai; q)
i.e., hT ; Ai j=
2 ans(hT ; Ai; qˆ).</p>
        <p>ans(hT ; Ai; qˆ). Let
be a mapping such that
2 ans(hT ; Ai; q),
Var(q) to a set of individual names from NI , hT ; Aqf i j= Aˆqf . Hence, hT ; Aqi j= Aˆq
(q). From Definition 5 it is obvious that for any total function f from
or hT ; (q)i j=
(qˆ) which means hT ; A [
(q)i j=
erty of description logics, which means that hT ; Ai j=
(qˆ) (since hT ; Ai j= (q)), i.e.,
(qˆ) due to the monotonicity
propthis means K 6j</p>
        <p>=
ans(K ; q) = ans(K ; q0).</p>
        <p>jVar(at)(at), but this means that
&lt; ans(K ; q0), which contradicts
subset of fP[q]g by Definition 4 and since at restricts q.</p>
      </sec>
      <sec id="sec-6-3">
        <title>Lemma (3). The extended query qˆ created as in Definition 5 is unique.</title>
        <p>The second claim follows since f
2 P[q] j
jVar(at) 2 (K[at] [ P[at])g is a strict
Proof (Proof of Lemma 3). It is obvious that the extended query qˆ does not depend on
the function f that is used for its construction since the canonical ABoxes and
consequently the extended canonical ABoxes produced w.r.t. di erent functions f are
isomorphic to each other, i.e., identical modulo renaming of individuals.
and</p>
        <p>a mapping that covers all variables of C apart from x.</p>
        <p>Theorem (2). Let K be a knowledge base, A; B concept names such that K j= A v B,
C1; C2 concept templates, C = :C1 t C2, x 2 VC a concept variable occurring in C,
1. If polc(x; C) = pos and K 6j= (C1 v C2) (x)=B, then K 6j= (C1 v C2) (x)=A.
2. If polc(x; C) = neg and K 6j= (C1 v C2) (x)=A, then K 6j= (C1 v C2) (x)=B.
Proof (Proof Sketch of Theorem 2). The claim can be shown by induction on the
structure of the concept template C. We only consider the case of polc(x; C) = pos; the case
of polc(x; C) = neg is analogous. It su
model I = ( I; I) of K and some element
ces to show (in contrapositive form) for some
2</p>
        <p>I, if
2 (C (x)=A)I, then
2 (C (x)=B)I.</p>
        <p>For the base case, C = x, x occurs positively in C. Now, if
2 AI and, hence,
2 BI since K j= A v B by assumption. Hence,
2 (x (x)=A)I, then
2 (x (x)=B)I.</p>
        <p>We show the induction step for C = 9r:D. The other cases are analogous. We assume
has at least one r-successor, say 0, that is an instance of
2 ((9r:D) (x)=A)I, then
D (x)=A. Since K j</p>
        <p>= A v B and by induction hypothesis, 0 2 D (x)=B. Hence,
the polarity of x in C is always positive and negative and polc(x; C) is undefined.
(9r:(D (x)=B))I = ((9r:D) (x)=B)I. Note that the case C = (= n r:D) cannot occur since
2
tu
tu
tu
tu
mapping that covers all variables of C apart from x.
concept templates, C = :C1 t C2, x 2 VR a role variable occurring in C, and
Proof (Proof Sketch of Theorem 3). The claim can be shown by induction on the
structure of the concept template C. We only consider the case of polr(x; C) = pos; the case</p>
        <p>We have several base cases here, but only present the case for concept templates of
of polr(x; C) = neg is analogous. It su
model I = ( I; I) of K and some element 2
ces to show (in contrapositive form) for some</p>
        <p>C = 6 n x:D with x not occurring in D are similar. Assume,
the form C = 9x:D with x not occurring in D. The cases for C = 8x:D, C = &gt; n x:D,
2 (9r: (D))I. Then there is some 0 2</p>
        <p>I such that h ; 0i 2 rI and 0 2
(D)I. Since
K j= r v s, we also have h ; 0i 2 sI and, therefore,
2 (9s: (D))I = ((9x:D) (x)=s)I.</p>
        <p>For the induction step, let C = 9x:D with x occurring in D, we also have polr(x; D) =
pos. Now, if</p>
        <p>2 ((9x:D) (x)=r)I, then
that is an instance of D (x)=s. Hence,
of D (x)=r. Since K j= r v s and by induction hypothesis,
has at least one r-successor which is an instance
2 ((9x:D) (x)=s)I. The case of C = 9p:D with p
has at least one s-successor
a role and x occurring in D is analogous and so are the further induction steps.</p>
      </sec>
    </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>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P</given-names>
          </string-name>
          . (eds.):
          <article-title>The Description Logic Handbook: Theory, Implementation, and Applications</article-title>
          . Cambridge University Press, second edn. (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giacomo</surname>
            ,
            <given-names>G.D.</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 e cient 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="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shearer</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stoilos</surname>
          </string-name>
          , G.:
          <article-title>A novel approach to ontology classification</article-title>
          .
          <source>Journal of Web Semantics: Science, Services and Agents on the World Wide Web</source>
          <volume>14</volume>
          ,
          <fpage>84</fpage>
          -
          <lpage>101</lpage>
          (
          <year>2012</year>
          ),
          <article-title>special Issue on Dealing with the Messiness of the Web of Data</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ogbuji</surname>
          </string-name>
          , C. (eds.):
          <article-title>SPARQL 1.1 Entailment Regimes</article-title>
          .
          <source>W3C Recommendation (21 March</source>
          <year>2013</year>
          ), available at http://www.w3.org/TR/sparql11-entailment/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Haarslev</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , Mo¨ller, R.:
          <article-title>Racer system description</article-title>
          . In: Gor,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Leitsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Nipkow</surname>
          </string-name>
          , T. (eds.)
          <source>Proceedings of the 1st International Joint Conference on Automated Reasoning (IJCAR'01)</source>
          . LNCS, vol.
          <year>2083</year>
          , pp.
          <fpage>701</fpage>
          -
          <lpage>705</lpage>
          . Springer (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Haarslev</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , Mo¨ ller, R.,
          <string-name>
            <surname>Wessel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Querying the semantic web with Racer + nRQL</article-title>
          .
          <source>In: Proceedings of the KI-2004 International Workshop on Applications of Description Logics</source>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Harris</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seaborne</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . (eds.):
          <article-title>SPARQL 1.1 Query Language</article-title>
          .
          <source>W3C Recommendation (21 March</source>
          <year>2013</year>
          ), available at http://www.w3.org/TR/sparql11-query/
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bechhofer</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The OWL API: A Java API for working with OWL 2 ontologies</article-title>
          . In:
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hoekstra</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          . (eds.)
          <source>Proceedings of the OWLED 2009 Workshop on OWL: Experiences and Directions. CEUR Workshop Proceedings</source>
          , vol.
          <volume>529</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <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>Reducing SH IQ description logic to disjunctive datalog programs</article-title>
          .
          <source>In: Proceedings of the 9th International Conference on Principles of Knowledge Representation and Reasoning (KR'04)</source>
          . pp.
          <fpage>152</fpage>
          -
          <lpage>162</lpage>
          . AAAI Press (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Johnson</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klug</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          :
          <article-title>Testing containment of conjunctive queries under functional and inclusion dependencies</article-title>
          .
          <source>J. Comput. Syst. Sci</source>
          .
          <volume>28</volume>
          (
          <issue>1</issue>
          ),
          <fpage>167</fpage>
          -
          <lpage>189</lpage>
          (
          <year>1984</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kollia</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Optimizing SPARQL Query Answering over OWL Ontologies</article-title>
          .
          <source>Accepted at Journal of Artificial Intelligence Research</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kollia</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Cost based query ordering over OWL ontologies</article-title>
          .
          <source>In: Proceedings of the 11th International Semantic Web Conference (ISWC 2012). Lecture Notes in Computer Science</source>
          , vol.
          <volume>7649</volume>
          , pp.
          <fpage>231</fpage>
          -
          <lpage>246</lpage>
          . Springer-Verlag (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <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>
          . In: Lin,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Sattler</surname>
          </string-name>
          ,
          <string-name>
            <surname>U</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 12th International Conference on Principles of Knowledge Representation and Reasoning (KR'10)</source>
          . AAAI Press (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuenca Grau</surname>
          </string-name>
          , B. (eds.):
          <article-title>OWL 2 Web Ontology Language: Direct Semantics</article-title>
          .
          <source>W3C Recommendation (27 October</source>
          <year>2009</year>
          ), available at http://www.w3.org/TR/owl2-direct-semantics/
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>J.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thomas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Completeness guaranteed approximation for owl dl query answering</article-title>
          .
          <source>In: Proceedings of the 22nd International Workshop on Description Logics (DL2009)</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <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>Tractable query answering and rewriting under description logic constraints</article-title>
          .
          <source>Journal of Applied Logic</source>
          <volume>8</volume>
          (
          <issue>2</issue>
          ),
          <fpage>186</fpage>
          -
          <lpage>209</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Ren</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>J.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Soundness preserving approximation for tbox reasoning</article-title>
          .
          <source>In: Proceedings of the 25th AAAI Conference (AAAI2010)</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuenca Grau</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>From wine to water: Optimizing description logic reasoning for nominals</article-title>
          . In: Doherty,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Mylopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Welty</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.A</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 10th International Conference on Principles of Knowledge Representation and Reasoning (KR'06)</source>
          . pp.
          <fpage>90</fpage>
          -
          <lpage>99</lpage>
          . AAAI Press (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SPARQL-DL: SPARQL query for OWL-DL</article-title>
          . In: Golbreich,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Kalyanpur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Parsia</surname>
          </string-name>
          ,
          <string-name>
            <surname>B</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the OWLED 2007 Workshop on OWL: Experiences and Directions. CEUR Workshop Proceedings</source>
          , vol.
          <volume>258</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>B.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Katz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Pellet: A practical OWL-DL reasoner</article-title>
          .
          <source>Journal of Web Semantics</source>
          <volume>5</volume>
          (
          <issue>2</issue>
          ),
          <fpage>51</fpage>
          -
          <lpage>53</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Thomas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>J.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ren</surname>
          </string-name>
          , Y.:
          <article-title>TrOWL: Tractable OWL 2 reasoning infrastructure</article-title>
          .
          <source>In: Proceedings of the Extended Semantic Web Conference (ESWC'10)</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Tsarkov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          :
          <article-title>Optimizing terminological reasoning for expressive description logics</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          <volume>39</volume>
          (
          <issue>3</issue>
          ),
          <fpage>277</fpage>
          -
          <lpage>316</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          1.
          <article-title>If polr(x; C) = pos and</article-title>
          K 6j=
          <article-title>(C1 v C2) (x)=s, then K 6j= (C1 v C2) (x)=r.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          2.
          <article-title>If polr(x; C) = neg and</article-title>
          K 6j=
          <article-title>(C1 v C2) (x)=r, then K 6j= (C1 v C2) (x)=s. 2 ((9x:D) (x)=r)I, that is,</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>