<!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>On the Parameterised Complexity of Tree-Shaped Ontology-Mediated Queries in OWL 2 QL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>M. Bienvenu</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>S. Kikot</string-name>
          <email>kikot@dcs.bbk.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>R. Kontchakov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>V. Ryzhikov</string-name>
          <email>ryzhikov@inf.unibz.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M. Zakharyaschev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Birkbeck, University of London</institution>
          ,
          <country country="UK">UK (</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>CNRS &amp; University of Montpellier</institution>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Free University of Bozen-Bolzano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We discuss the parameterised complexity of answering tree-shaped ontology-mediated queries (OMQs) in OWL 2 QL under various restrictions on their ontologies and conjunctive queries (CQs). In particular, we construct an ontology T such that answering OMQs (T ; q) with tree-shaped CQs q is W[1]hard if the number of leaves in q is regarded as the parameter. The number of leaves has previously been identified as an important characteristic of CQs as bounding it leads to tractable OMQ answering. Our result shows that treating it as a parameter does not make the problem fixed-parameter tractable, even for a fixed ontology.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <sec id="sec-1-1">
        <title>Instance: T of finite depth, q and A,</title>
      </sec>
      <sec id="sec-1-2">
        <title>Parameter: the depth of T ,</title>
        <p>Problem: decide whether T ; A j= q.</p>
        <p>What is the parameterised complexity of a similar problem leaves-TREEOMQ, which
takes the number of leaves in q as the parameter? Or what if we fix an ontology T
in TREEOMQ and consider the problem TREEOMQ[T ]? Note that this problem
reflects a typical ontology-based data access scenario, where the users are provided with
a fixed ontology designed by a domain expert. Furthermore, we can consider the
leafparameterisation leaves-TREEOMQ[T ] of TREEOMQ[T ].</p>
        <p>
          In this paper, we summarise and discuss our recent results answering some of the
questions above and presented in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. We also prove a new theorem by constructing an
ontology T2 (of infinite depth) for which the problem leaves-TREEOMQ[T2] is W
[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]hard.
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>To make the ontology axioms in Section 3 more compact and readable, we use the
syntax of first-order rather than description logic. Thus, an OWL 2 QL ontology, T , is
a finite set of sentences of the form
8x ( (x) ! 0(x));
8xy (%(x; y) ! %0(x; y));
8x %(x; x);
8x ( (x) ^ 0(x) ! ?);
8xy (%(x; y) ^ %0(x; y) ! ?);
8x (%(x; x) ! ?);
where (x) and %(x; y) are defined, using unary predicates A and binary predicates P ,
by the grammars</p>
      <p>(x) ::=
%(x; y) ::=
&gt; j A(x) j 9y %(x; y);
&gt; j P (x; y) j P (y; x):
When writing ontology axioms, we omit the universal quantifiers. Denote by RT the set
of binary predicates P occurring in T and their inverses P , assuming that P = P .
An ABox, A, is a finite set of unary or binary ground atoms. We denote by ind(A) the
set of individual constants in A.</p>
      <p>A conjunctive query (CQ) q(x) is a formula of the form 9y '(x; y), where ' is a
conjunction of (unary A(u) or binary P (u; v)) atoms S(z) all of whose variables are
among x [ y. We assume, without loss of generality, that CQs contain no constants.
We often regard a CQ as the set of its atoms.With every CQ q, we associate its Gaifman
graph G whose vertices are the variables of q and whose edges are the pairs fu; vg such
that P (u; v) 2 q, for some P (note that the atoms P (u; u) do not add any edges to G).
We call q connected if G is connected; q is tree-shaped if G is a tree, and linear if G is
a tree with two leaves.</p>
      <p>An ontology-mediated query (OMQ) is a pair Q(x) = (T ; q(x)), where T is an
ontology and q(x) a CQ. A tuple a in ind(A) is a certain answer to (T ; q) over an
ABox A if I j= q(a) for all models I of T and A; in this case we write T ; A j= q(a).
For a Boolean q, in which case x = ;, a certain answer to Q over A is ‘yes’ if T ; A j= q
and ‘no’ otherwise.</p>
      <p>
        Every consistent knowledge base (KB) (T ; A) has a canonical model (or chase in
database theory) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] CT ;A with the property that T ; A j= q(a) iff CT ;A j= q(a), for
all CQs q(x) and a in ind(A). In our constructions, we use the following definition
of CT ;A, where without loss of generality we assume that T contains no binary
predicates P such that T j= 8xy P (x; y). The domain, CT ;A , consists of ind(A) and the
witnesses (or labelled nulls) of the form w = a%1 : : : %n, for n 1, such that
– a 2 ind(A) and T ; A j= 9y %1(a; y);
– T 6j= %i(x; x), for 1 i n;
– T j= 9x%i(x; y) ! 9z%i+1(y; z) but T 6j= %i(x; y) ! %i+1(y; x), for 1
i &lt; n.
      </p>
      <p>We denote by WT the set consisting of the empty word " and all non-empty words
%1 : : : %n 2 R+ satisfying the last two conditions. Every a 2 ind(A) is interpreted in</p>
      <p>T
CT ;A by itself, and unary and binary predicates are interpreted as follows:
– CT ;A j= A(u) iff either u 2 ind(A) and T ; A j= A(u), or u = w% and we have</p>
      <p>T j= 9y %(y; x) ! A(x);
– CT ;A j= P (u; v) iff one of the following three conditions holds: (i) u; v 2 ind(A)
and T ; A j= P (u; v); (ii) u = v and T j= P (x; x); (iii) T j= %(x; y) ! P (x; y)
and either v = u% or u = v% .</p>
      <p>
        We say that T is of depth 0 d &lt; 1 if d is the maximum length of the words in
WT , and of depth 1 if WT is infinite. (Note that the depth of T is computable in NL;
cf. [
        <xref ref-type="bibr" rid="ref12 ref6">12, 6</xref>
        ] for related results on chase termination for tgds.)
      </p>
      <p>We consider various parameterisations and restrictions of the decision problem
TREEOMQ defined above. As parameters, we can take the following1:
query:
leaves:
ontology:
depth:
a tree-shaped CQ q,
the number of leaves in the Gaifman graph of a tree-shaped CQs q,
an OWL 2 QL ontology T ,
the depth of T .</p>
      <p>Restrictions can take the forms
leaves `:
depth d:
query = q:
ontology = T :
we consider only CQs with ` leaves, for some `
we consider only ontologies of depth d, for some d
we fix the tree-shaped CQ q,
we fix the ontology T .
2,
0,</p>
      <sec id="sec-2-1">
        <title>The decision problems we are interested in look as follows:</title>
        <p>parameter-TREEOMQ[restriction1; : : : ; restrictionn];
where parameter is one of the parameters above or blank, and each restrictioni, if any, is
one of the restrictions above. To simplify notation, instead of [ontology = T ] we write
[T ] and similarly for [query = q]. For example, leaves-TREEOMQ[T ] is the problem
Instance: q and A,</p>
      </sec>
      <sec id="sec-2-2">
        <title>Parameter: the number of leaves in q,</title>
        <p>Problem: decide whether T ; A j= q.</p>
        <p>
          We now construct an ontology T for which this problem is W [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hard; for any results
from parameterised complexity theory we use below, consult, e.g., [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>1 Following Downey [9], our parameters are not necessarily numerical.</title>
        <p>
          Theorem 1. There is an ontology T2 such that leaves-TREEOMQ[T2] is W [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hard.
Proof. The proof is by reduction of the W [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hard problem SquareTiling [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], which is
defined as follows:
        </p>
        <p>Instance: a set T of tile types painted in colours from a set C, a positive integer k,
Parameter: k,</p>
      </sec>
      <sec id="sec-2-4">
        <title>Problem: decide whether T tiles a k k-grid.</title>
        <p>Suppose C = f0; : : : ; ng, for n 1, and T = fS1; : : : ; Smg. Denote by right (t),
left (t), top(t) and bottom(t) the right, left, top and bottom colour of St, respectively.
Given a binary predicate name R, we denote by Ri a sequence of i-many predicates R.
We represent each colour c n by the following two sequences of binary predicates:
encc = P 3n cF c
cnec = N 2cM N 2(n c)
of length 3n;
of length 2n + 1:
Examples of encc and cnec, for n = 4 and c = 3, are shown in Figs. 2a and 2d,
respectively. Each tile St is represented by the following sequence of binary predicates:
tilet = B cneright(t) encleft(t) cnetop(t) encbottom(t)E
of length 10n + 4:
Since the length of encc does not depend on c, we use jencj to denote the length of
some (any) encc, and similarly for jcnej and jtilej. We shall also require the following
sequences</p>
        <p>segm = tile1 tile2 : : : tilem S
spring = (XY I)n
probelt = Ijcnej+jencj+2 spring Ijtilej+1I2nM
probedn = I2 spring I(jtilej+1)kI2nM
of length m jtilej + 1;
of length jencj;
of length 2 jtilej + 1;
of length 5n + 3 + (jtilej + 1)k:
The first sequence will be called a segment and the second a spring.</p>
        <p>The Boolean CQ q (see Fig. 1) is now defined by taking the following set of atoms
(assuming that all variables are existentially quantified):
fA(x0)g [ segm(x0; x1;1) [ [ segm(xi 1;j ; xi;j ) [
[ segm(xk;j 1; x1;j ) [
probelt(xi;j ; yi;j ) [</p>
        <p>probedn(xi;j ; zi;j );
2 i k
1 j k
[
2 i k
1 j k
2 j k
[
1 i k
2 j k
where R1 : : : Rl(x; y) stands for fR1(x; x1); R2(x1; x2); : : : ; Rl(xl 1; y)g with fresh
variables x1; : : : ; xl 1. It can be seen that q is a tree-shaped CQ with 2(k 1)k leaves.</p>
        <sec id="sec-2-4-1">
          <title>Let T2 be an ontology with the following axioms:</title>
          <p>A(x) ! 9y BI(x; y) ^ Right (y) ;
A(x) ! 9u Sink (x; u);
x1;k
probedn
z1;k
x1;3
probedn
z1;3
x1;2
probedn
z1;2
x1;1
y2;kprobelt
segm</p>
          <p>x2;k
probedn</p>
          <p>z2;k
y2;3probelt
segm</p>
          <p>A path in the canonical model CT2;fA(a)g where q can be homomorphically mapped is
shown in Fig. 2 sandwiched between segm(x0; x1;1) [ segm(x1;1; x2;1) on the left and
bottom and probelt(x2;1; y2;1) on the right and top (most predicate names are omitted).</p>
          <p>We show that T2; fA(a)g j= q iff T tiles a k k-grid. Here, we only prove ()) and
leave the converse direction to the reader. For two sequences w = R1 : : : Rl and w0 =
R10 : : : Rl0 of binary predicate names, we write w v w0 if T2 j= Ri(x; y) ! Ri0(x; y),
for all i (1 i l).</p>
          <p>Let h be a homomorphism from q to C = CT2;fA(a)g such that h(x0) = v0 (cf. the
definition of labelled nulls in Section 2). Then v0 2 AC and h(x1;1) = v1;1 2 AC with
v1;1 of the form v0w1;1S, for some w1;1 that begins with B but does not contain S.
Since (v0; v0Sink ) 2= SC and jtilej is even, it follows that there is a unique tile t1;1
such that
– jw1;1j = jtilej and w1;1 v tilet1;1 ,
– the subquery of segm(x0; x1;1) for the sequence tile1 : : : tilet1;1 1 is mapped
to the Sink arrow at v0 (i.e., forwards and backwards between v0 and v0Sink );
– the subquery for the sequence tilet1;1+1 : : : tilem is mapped to a Sink arrow at
v0w1;1 (see Fig. 2).</p>
          <p>Consider now any subquery segm(xi 1;1; xi;1), for 2 i k. By the same argument,
we obtain h(xi;1) = vi;1, for vi;1 = vi 1;1wi;1S, and wi;1 v tileti;1 , for a unique
1 ti;1 m. Next, h(x1;2) = v1;2 for v1;2 = vk;1w1;2 S with w1;2 v tilet1;2 and,
eventually, every subquery segm(xi 1;j; xi;j), for 1 i k and 1 j k, is mapped
in such a way that
8
&gt;&lt;vi 1;jwi;jS;
&gt;:v0w1;1S;
if i</p>
          <p>2;
if i = 1; j = 1:
h(xi;j) =
vk;j 1wi;jS; if i = 1; j</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>2; with wi;j v tileti;j ; for a unique ti;j;</title>
          <p>We prove now that the tiles Sti;j placed at (i; j) of the k k-grid form a tiling.</p>
          <p>First, we show that left (ti;j) = right (ti 1;j), for 2 i k and 1 j k.
As we observed above, h(xi;j) is of the form v wi 1;j S wi;j S. Consider the subquery
probelt(xi;j; yi;j) and recall that</p>
          <p>wi;j v B cneright(ti;j) encleft(ti;j) cnetop(ti;j) encbottom(ti;j) E:
By the structure of T2, the subqueries Ijencj+jcnej+2(xi;j; vi;j) and spring(vi;j; ui;j)
of probelt(xi;j; yi;j) are mapped by h in such a way (see Fig. 2) that
h(vi;j) v v wi 1;j S B cneright(ti;j) encleft(ti;j);
h(ui;j) v v wi 1;j S B cneright(ti;j) P 2c;
for c = left (ti;j):
On the other hand, the last element in probelt is M , and so we must have
h(yi;j) v v B N 2c0 ;</p>
          <p>for c0 = right (ti 1;j);
c
e
nM
c
c
en F</p>
          <p>F
neM
c
c
en F</p>
          <p>F</p>
          <p>E
Sink</p>
          <p>N
N
N
P
P
N
N
N
N
P
P</p>
          <p>X
X
X
X</p>
          <p>S
tile1 Sink A
: : :
1
;
1
t
e
l
i
t
: : :
tilem
c)
b)
a)</p>
          <p>P
I
X
Y
P
T</p>
          <p>B
x1;1</p>
          <p>P
I
X
Y
P</p>
          <p>v0w1;1S
A
iS B
n
k
tile1 : : :</p>
          <p>P
I
X
Y
P
2c</p>
          <p>P
I
X
Y
P
c
2
c
2
n
2</p>
          <p>N
N
N
N
N
N
M
N</p>
          <p>N
encc
cne</p>
          <p>enc
jcnej + jencj + 1
T B
3n 2c
Y
P
I
X
Y
P</p>
          <p>X
P
I
X
Y</p>
          <p>P
d)</p>
          <p>f)
e)
N I
N I
N I
N I
N I
N I
M I
N I
N I
cne
1
+
n
2
+
j
e
l
i
t
j
P
I
X
Y
P</p>
          <p>L
P</p>
          <p>P
spring</p>
          <p>X X X
F F F
tilet2;1
Fig. 2. Matching the first two segments, segm(x0; x1;1) and segm(x1;1; x2;1), of q and
probelt(x2;1; y2;1) in the canonical model C, and the magnified fragments for encc and cnec
with n = 4 and c = 3: a) subsequence encc of tilet in q; b) a path in C where encc is mapped;
c) matching the spring subquery of probelt in C; d) subsequence cnec of tilet in q; e) a path
in C where cnec is mapped; f) mapping variable y2;1 of the subquery probelt(x2;1; y2;1) in C.
v0w1;1Sw2;1S</p>
          <p>E inS</p>
          <p>k
: : : tilem</p>
          <p>I
F
I
F</p>
          <p>Y
which is only possible if right (ti 1;j ) = left (ti;j ); see Fig. 2.</p>
          <p>That down(ti;j ) = up(ti;j 1), for 2 j k and 1 i
considering the mapping of the subquery probedn(xi;j ; zi;j ).
4</p>
          <p>Complexity Landscape
In this concluding section, we summarise what is known about the complexity of the
decision problems introduced in Section 2. In the table below, parameters are listed
horizontally, while restrictions on ontologies and CQs vertically in the first two columns,
where ‘—’ means no restriction or parameter, FPTy indicates that FTP follows from
tractability, while in the grey areas, the problems are trivial.
k, is proved similarly by
restrictions on
T
—
q
—
fixed
—
fixed
leaves
d
e
x
fi
d
leaves</p>
          <p>—
h
t
p
ed leaves
fixed
`
`
`</p>
          <p>—
(combined complexity)</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>NP-complete</title>
      </sec>
      <sec id="sec-2-6">
        <title>NL-complete</title>
      </sec>
      <sec id="sec-2-7">
        <title>LOGCFL-complete in NP</title>
      </sec>
      <sec id="sec-2-8">
        <title>NP-hard</title>
        <p>for some T ( )
in AC0
in LOGCFL</p>
      </sec>
      <sec id="sec-2-9">
        <title>LOGCFL-hard</title>
        <p>for some T ; ` = 2</p>
      </sec>
      <sec id="sec-2-10">
        <title>LOGCFL-complete</title>
      </sec>
      <sec id="sec-2-11">
        <title>NL-complete</title>
      </sec>
      <sec id="sec-2-12">
        <title>NL-complete query FPT</title>
      </sec>
      <sec id="sec-2-13">
        <title>FPTy</title>
        <p>FPT</p>
      </sec>
      <sec id="sec-2-14">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-15">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-16">
        <title>FPTy</title>
        <p>parameter
leaves</p>
      </sec>
      <sec id="sec-2-17">
        <title>W[1]-hard</title>
      </sec>
      <sec id="sec-2-18">
        <title>W[1]-hard</title>
        <p>for some T</p>
      </sec>
      <sec id="sec-2-19">
        <title>FPTy</title>
        <p>ontology
paraNP
see ( )</p>
      </sec>
      <sec id="sec-2-20">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-21">
        <title>FPTy</title>
        <p>depth</p>
      </sec>
      <sec id="sec-2-22">
        <title>W[2]-hard</title>
      </sec>
      <sec id="sec-2-23">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-24">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-25">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-26">
        <title>FPTy</title>
      </sec>
      <sec id="sec-2-27">
        <title>FPTy</title>
        <p>
          Recall first that the basic problem TREEOMQ of answering tree-shaped OMQs is
NPcomplete [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], while standard evaluation of tree-shaped CQs—that is, TREEOMQ[;]—
is LOGCFL-complete [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. On the other hand, TREEOMQ[T ; q] is in AC0, for any
T and q [
          <xref ref-type="bibr" rid="ref2 ref7">7, 2</xref>
          ], which matches TREEOMQ[;; q]. Observe also that NL-completeness
of TREEOMQ[q] matches the complexity of reasoning in OWL 2 QL [
          <xref ref-type="bibr" rid="ref2 ref7">7, 2</xref>
          ]. The
parameterised problem query-TREEOMQ is fixed-parameter tractable [16, Theorem 21],
which means that TREEOMQ can be solved in time f (jqj) poly(jT j; jAj), for some
computable f (here j j is the size of an encoding of ).
        </p>
        <p>The intractability result for TREEOMQ has recently been refined in [4, Theorem 20],
which constructed an ontology Ty (of infinite depth) such that TREEOMQ[Ty] is
NPcomplete. It follows that—unless P = NP—no algorithm can solve TREEOMQ in time
poly(jqj; jAj)f(jT j), for any computable function f . Such a complexity bound would
usually be regarded as an indication that, in practice, TREEOMQ could be solved
efficiently for small T . Thus, ontology-TREEOMQ (actually, with any parameter
determined by the ontology) cannot be FPT.</p>
        <p>
          Tractability can be restored by restricting the number of leaves in q and/or the depth
of T : as shown in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], both TREEOMQ[leaves `] and TREEOMQ[depth d] are
LOGCFL-complete, while TREEOMQ[leaves `; depth d] is NL-complete. (In
fact, for ontologies of bounded depth, tree-shaped CQs can be generalised to CQs of
bounded treewidth.) Moreover, [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] presented an ontology Tz such that the problem
TREEOMQ[Tz; leaves 2] is LOGCFL-complete. Yet, leaves-TREEOMQ turns out
to be W[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hard and depth-TREEOMQ W[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]-hard [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. In Section 3, we have sharpened
the former result by constructing T2 (of infinite depth) such that leaves-TREEOMQ[T2]
is W[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hard.
        </p>
        <p>
          In fact, answering OMQs (T ; q) with q having at most ` leaves can be done in
time poly(jT j; jqj`; jAj`) [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. The W[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]-hardness results mean, however, that this
upper bound cannot be improved—unless W [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] = FPT—to f (`) poly(jqj; jT j; jAj) or
even to f (`) poly(jqj; jAj)g(jT j), as Theorem 1 suggests. Answering OMQs (T ; q)
with T of depth d &lt; 1 can be done in time poly(jT jd; jqj; jAj) [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. However—unless
W [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] = FPT—it is impossible to improve this to f (d) poly(jqj; jT j; jAj). Thus, we
can expect reasonable efficiency for ontologies of small depth, but no general
scalability. This does not appear to be a serious restriction as our experience shows that
ontologies used for real-world ontology-based data access are of depth at most 5 (see
also [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]). On another positive note, the tractable problems TREEOMQ[leaves `],
TREEOMQ[depth d] and TREEOMQ[leaves `; depth d] can be solved using
theoretically optimal resources (LOGCFL or NL) by means of OMQ rewriting to
nonrecursive datalog queries; for details and experiments, consult [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>
          A challenging open problem is to classify OWL 2 QL ontologies T according to
the combined complexity of answering OMQs (T ; q) with tree-shaped or arbitrary
CQs q. In particular, are there interesting conditions on T that ensure tractability of
TREEOMQ[T ]? Is it the case that, for every T , the problem TREEOMQ[T ] is either
in P or NP-complete? In a more general setting, dichotomies of this kind have been
considered in [
          <xref ref-type="bibr" rid="ref10 ref14 ref3">3, 14, 10</xref>
          ].
        </p>
        <p>Acknowledgements. This work was supported by the UK EPSRC grant EP/M012670/
‘iTract: Islands of Tractability in Ontology-Based Data Access’.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Abiteboul</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hull</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vianu</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          : Foundations of Databases. Addison-Wesley (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Artale</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</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>The DL-Lite family and relations</article-title>
          .
          <source>Journal of Artificial Intelligence Research (JAIR) 36</source>
          ,
          <fpage>1</fpage>
          -
          <lpage>69</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>ten Cate</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Ontology-based data access: A study through disjunctive datalog, CSP, and MMSNP</article-title>
          .
          <source>ACM Transactions on Database Systems</source>
          <volume>39</volume>
          (
          <issue>4</issue>
          ),
          <volume>33</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>44</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <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>Podolskii</surname>
            ,
            <given-names>V.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ryzhikov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The complexity of ontology-based data access with OWL 2 QL and bounded treewidth queries</article-title>
          .
          <source>In: Proc. of the 36th ACM Symposium on Principles of Database Systems, PODS 2017</source>
          , pp.
          <fpage>201</fpage>
          -
          <lpage>216</lpage>
          . ACM (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kikot</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Podolskii</surname>
            ,
            <given-names>V.V.</given-names>
          </string-name>
          :
          <article-title>Tree-like queries in OWL 2 QL: succinctness and complexity results</article-title>
          .
          <source>In: Proc. of the 30th Annual ACM/IEEE Symposium on Logic in Computer Science</source>
          ,
          <string-name>
            <surname>LICS</surname>
          </string-name>
          <year>2015</year>
          . pp.
          <fpage>317</fpage>
          -
          <lpage>328</lpage>
          . IEEE Computer Society (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Calautti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pieris</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Chase termination for guarded existential rules</article-title>
          .
          <source>In: Proc. of the 34th ACM Symposium on Principles of Database Systems</source>
          ,
          <string-name>
            <surname>PODS</surname>
          </string-name>
          <year>2015</year>
          . pp.
          <fpage>91</fpage>
          -
          <lpage>103</lpage>
          . ACM (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <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="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Cuenca</given-names>
            <surname>Grau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Horrocks</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          , Kro¨ tzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Kupke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Magka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Motik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Z.</surname>
          </string-name>
          :
          <article-title>Acyclicity notions for existential rules and their application to query answering in ontologies</article-title>
          .
          <source>Journal of Artificial Intelligence Research (JAIR) 47</source>
          ,
          <fpage>741</fpage>
          -
          <lpage>808</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Downey</surname>
            ,
            <given-names>R.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fellows</surname>
            ,
            <given-names>M.R.</given-names>
          </string-name>
          :
          <source>Fundamentals of Parameterized Complexity</source>
          . Springer (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuusisto</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Rewritability in monadic disjunctive datalog, MMSNP, and expressive description logics</article-title>
          .
          <source>CoRR abs/1701</source>
          .02231 (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Flum</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grohe</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <source>Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series</source>
          , Springer (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Gogacz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marcinkowski</surname>
          </string-name>
          , J.:
          <article-title>All-instances termination of chase is undecidable</article-title>
          .
          <source>In: Proc. of the 41st Int. Colloquium Automata, Languages, and Programming (ICALP</source>
          <year>2014</year>
          ),
          <source>Part II. Lecture Notes in Computer Science</source>
          , vol.
          <volume>8573</volume>
          , pp.
          <fpage>293</fpage>
          -
          <lpage>304</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <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>The complexity of acyclic conjunctive queries</article-title>
          .
          <source>Journal of the ACM</source>
          <volume>48</volume>
          (
          <issue>3</issue>
          ),
          <fpage>431</fpage>
          -
          <lpage>498</lpage>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Hernich</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ozaki</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Schema.org as a description logic</article-title>
          .
          <source>In: Proc. of the 28th Int. Workshop on Description Logics (DL</source>
          <year>2015</year>
          ).
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>1350</volume>
          .
          <string-name>
            <surname>CEUR-WS</surname>
          </string-name>
          (
          <year>2015</year>
          ),
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <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
          <source>: Proc. of the 24th Int. Workshop on Description Logics (DL</source>
          <year>2011</year>
          ).
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>745</volume>
          , pp.
          <fpage>224</fpage>
          -
          <lpage>234</lpage>
          . CEUR-WS (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <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>Podolskii</surname>
            ,
            <given-names>V.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>On the succinctness of query rewriting over shallow ontologies</article-title>
          .
          <source>In: Proc. of the Joint Meeting of the 23rd EACSL Annual Conference on Computer Science Logic (CSL) and the 29th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)</source>
          ,
          <source>CSL-LICS'14</source>
          . pp.
          <volume>57</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>57</lpage>
          :
          <fpage>10</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>