• Aucun résultat trouvé

Horn Rewritability vs PTime Query Answering for Description Logic TBoxes

N/A
N/A
Protected

Academic year: 2022

Partager "Horn Rewritability vs PTime Query Answering for Description Logic TBoxes"

Copied!
13
0
0

Texte intégral

(1)

Horn Rewritability vs PTime Query Evaluation for Description Logic TBoxes

Andr´e Hernich1, Carsten Lutz2, Fabio Papacchini1, and Frank Wolter1

1 University of Liverpool, UK,{firstname.surname}@liverpool.ac.uk

2 University of Bremen, Germany,clu@uni-bremen.de

Abstract. We study the following question: if T is a TBox that is formulated in an expressive DLLand all CQs can be evaluated inPTime w.r.t. T, can T be replaced by a TBox T0 that is formulated in the Horn-fragment ofLand such that for all CQs and ABoxes, the answers w.r.t.T andT0coincide? Our main results are that this is indeed the case when Lis the set of ALCHI orALCIF TBoxes of quantifier depth 1 (which covers the majority of such TBoxes), but not forALCHIF and

ALCQTBoxes of depth 1.

1 Introduction

In ontology-mediated querying, TBoxes are used to enrich incomplete data with domain knowledge, enabling more complete answers to queries [30, 5, 22]. Since query evaluation iscoNP-hard in the presence of TBoxes formulated in expressive description logics (DLs) such asALC and SHIQ[31, 23, 14], the identification of computationally more well-behaved setups has been an important goal of research [1, 9, 8, 28]. In particular, this has led to the introduction of Horn-DLs, syntactically defined fragments of expressive DLs that fall within the Horn- fragment of first-order logic [16, 29]. Widely known examples include the fragment Horn-SHIQ ofSHIQand the corresponding fragment Horn-ALC of ALC[16, 4]. In contrast to the expressive DLs in which they are included, these Horn-DLs admit the construction of universal models giving exactly the same answers to queries as the class of all models of a knowledge base. The existence of universal models can then be used to show that query evaluation is in PTime in data complexity, and to design practical query answering algorithms [12, 29, 21]. Thus, any TBox formulated in an expressive DL that falls within the corresponding Horn-DL is computationally well-behaved.

In this paper, we ask the converse question, concentrating on conjunctive queries (CQs):is it the case that every TBox T formulated in an expressive DL and for which CQ-evaluation is in PTimeis rewritable into a TBoxT0 formulated in the corresponding Horn-DL? If one requiresT to be logically equivalent to T0, then the answer is “no” even for the basic expressive DL ALC. But logical equivalence is an unnecessarily strong requirement in the context of ontology- mediated querying where it typically suffices to demandCQ-inseparability, that is,T andT0 should give exactly the same answers to any CQ on any ABox; see

(2)

for example [26, 6, 7] for more on CQ-inseparability. For an expressive DL L, we are thus interested in the following property: we say thatrewritability into CQ- inseparable Horn-TBoxes captures PTimequery evaluation if for everyLTBox T such that CQ-evaluation w.r.tT is inPTimethere exists a Horn-L TBoxT0 such thatT andT0 are CQ-inseparable. Note that whenLsatisfies this property, then one can replace anyL TBoxT that enjoys PTimeCQ-evaluation by its rewritingT0 and take advantage of the algorithms available for CQ-evaluation w.r.t. Horn-L TBoxes without affecting the answers to CQs.

The main result of this paper states that rewritability into CQ-inseparable Horn-TBoxes capturesPTimequery evaluation whenLis the class ofALCHIF TBoxes of depth one in which no role is included in a functional role, where the depth of a TBox is the nesting depth of quantifiers in its concepts. Despite the restriction to depth one, this result is rather general. We have analyzed 411 ontologies from the BioPortal repository. After removing all constructors that do not fall withinALCHIF, 385 ontologies had depth 1 (sometimes modulo an easy equivalent rewriting). Moreover, the pre-processing used in most DL reasoners transforms an input TBox into a TBox of depth one by structural transformation.

In our proof we show how to construct from a TBoxT formulated inLa canonical Horn-TBoxThornsuch thatThorn is a CQ-inseparable rewriting ofT if and only if CQ-evaluation w.r.t.T is inPTime. Informally,Thornis constructed by first normalisingT and then composing concept inclusions from the concepts in the normalised TBox. The correctness proof makes use of the fact that forALCHIF TBoxes of depth one, CQ-evaluation is inPTimeiff the TBox admits universal models [15, 27].

We then show that this result is optimal in several ways. For example, the restriction regarding the interaction of role inclusions and functional roles cannot be dropped since for unrestrictedALCHIF TBoxes of depth one, rewritability into CQ-inseparable Horn-TBoxes does not capturePTimequery evaluation. We also show such a negative result for ALCQTBoxes of depth one. Both results rely on the unique name assumption, which we generally make in this paper.

Regarding TBoxes of depth larger than one, we remark that it is known that for ALC TBoxes of depth three rewritability into CQ-inseparable Horn-TBoxes does not capturePTimequery evaluation [27]; the status ofALC TBoxes of depth two is open.

Related Work.Rewritability from one language into another has been studied extensively in description logic. A large body of work investigates (the existence of) rewritings of ontology-mediated queries (OMQs) into an FO query or Datalog query that gives the same answers over all ABoxes [3, 4, 13]. The main difference to the work presented in this paper is that both the TBox and the CQ are given as input whereas in this paper we quantify over all CQs. In [18, 17, 10], the authors consider Horn-DL andELrewritability of OMQs with atomic queries.

Also closely related is work on the rewritability of TBoxes formulated in an expressive DL into a TBox formulated in a weaker DL that is either equivalent to or a conservative extension of the original TBox [25, 20].

(3)

2 Preliminaries

We use the notation from [2]. LetNCandNRbe countably infinite sets of concept and role names, respectively. A role is a role name or theinverse r of a role namer. For standard DLsLbetweenALC and ALCHIQwe defineLconcept inclusions (CIs) andL TBoxes in the usual way. Thefunctionality assertions in ALCF and its extensions take the formfunc(r), where ris a role name (a role if the DL admits inverse roles).Role inclusions (RIs)inALCHand its extensions take the formrvs, whererandsare role names (roles if the DL admits inverse roles). The only non-standard DL we consider isALCF`which is located between ALCF and ALCQand in which one can use in addition to the constructors of ALC local functionality restrictions of the form (≤1r). In certain normal forms we also useELI concepts which are constructed using>,u, and∃r.C,ra role.

AnABoxAis a non-empty finite set of assertions of the formA(a) andr(a, b) withA∈NC,r∈NR, anda, bindividual names.

InterpretationsI and the extensionCI of a conceptC are defined as usual.

An interpretationI satisfiesa CICvDifCI⊆DI, an RIrvsifrI ⊆sI, an assertionA(a) if a∈AI, an assertionr(a, b) if (a, b)∈rI, and a functionality assertionfunc(r) ifrI is a partial function. Note that we make thestandard name assumption, that is, individual names are interpreted as themselves. This implies the unique name assumption.

An interpretationI is amodel of a TBoxT if it satisfies all inclusions and assertions inT andI is amodel of an ABoxAif it satisfies all assertions inA.

We call an ABoxAsatisfiable w.r.t. a TBox T ifAandT have a common model.

The depth of an ALCI concept is the maximal number of nestings of the operators ∃r.C and∀r.C in it; thus∃r.Ahas depth 1 and∃r.∀r.Ahas depth 2.

For DLs with number restrictions, nestings of number restrictions also contribute to the depth. Thedepth of a TBox is the maximal depth of the concepts that occur in it.

A Horn-ALCI CI takes the formLvR, where LandRare built according to the following syntax rules:

R, R0::=> | ⊥ |A| ¬A|RuR0 | ¬LtR| ∃r.R| ∀r.R L, L0::=> | ⊥ |A|LuL0|LtL0| ∃r.L

A Horn-ALCHIF TBox is a finite set of Horn-ALCI CIs, RIs, and functionality assertions. Note that there are several alternative ways to define Horn-DLs [16, 24, 12, 19], our definition is from [27]. The results in this paper remain valid under the alternative definitions.

For a TBoxT, ABoxAand conjunctive query (CQ)q(x) we say that a tuple a of individuals inAof the same length asxis acertain answer toq(x)over A w.r.t. T, in symbolsT,A |=q(a), ifI |=q(a) holds for all models I of T andA. Thequery evaluation problem forT and CQqis the problem to decide for an ABox Aand a tuplea of individuals fromA, whetherT,A |=q(a). The CQ-evaluation problem forT is in PTimeif the query evaluation problem forT

andqis in PTimefor every CQq.

(4)

The depth of TBoxes will play an important role in this paper. For deciding satisfiability and subsumption, TBoxes are often normalized to depth 1 in a pre-processing step. Since we are universally quantifying over all queries when defining the complexity of a TBox, such normalizations do not work in the sense that they can change the complexity of the TBox, see [27, 15].

To show that a TBox cannot be rewritten into a CQ-inseparable Horn- TBox, we shall sometimes use products of interpretations; we only need the product of two interpretations, see [11, 25] for the general case. Let I1andI2 be interpretations. Then theproduct I1× I2 ofI1 andI2 is defined by setting

I1×I2 =∆I1×∆I2

AI1×I2 ={(d1, d2)|d1∈AI1, d2∈AI2}

rI1×I2 ={((d1, d2),(e1, e2))|(d1, e1)∈rI1,(d2, e2)∈rI2}

Lemma 1. Every Horn-ALCHIQTBox T is preserved under products: ifI1

andI2 are models of T, thenI1× I2 is a model of T.

3 Horn Rewritability

In this paper, we aim to understand whether and when a TBox formulated in an expressive DL can be replaced with a TBox formulated in the corresponding Horn-DL (e.g. anALCHIF TBox by a Horn-ALCHIFTBox) without changing the answers to CQs. Following [26, 6, 7], TBoxesT1 andT2 areCQ-inseparable if for all CQs q, all ABoxes A, and all tuples a of individual names in A we haveT1,A |=q(a) iffT2,A |=q(a). We say thatrewritability into CQ-inseparable Horn-TBoxes captures PTimequery evaluation for a DLLif for everyLTBox T such that CQ evaluation w.r.t.T is inPTime, there is a Horn-LTBoxT0 such thatT andT0are CQ-inseparable. The following example shows that rewritability into a CQ-inseparable Horn-TBox is a weaker notion than rewritability into a Horn-TBox that is logically equivalent.

Example 1. Consider the Horn-ALC TBox

T ={∃r.(Au ¬Bu ¬E)v ∃r.(¬Au ¬Bu ¬E)}.

It is easy to see that for any CQq(x), ABoxA, and tupleaof individuals fromA, we haveT,A |=q(a) iff∅,A |=q(a). Thus, CQ evaluation w.r.t.T is inPTime (actually inAC0).T is, however, not equivalent to any TBox preserved under products: consider interpretations I1 andI2 with∆Ii ={0,1}, rIi ={(0,1)}, andAIi ={1} fori= 1,2, butBI1 ={1},EI1 =∅, BI2 =∅, andEI2 ={1}.

ThenIi is a model ofT fori= 1,2, butI1× I2 is not. Consequently,T is not equivalent to any Horn-TBox.

We shall make use of several characterizations of CQ evaluation w.r.t. a TBox being inPTimethat have been obtained in [15]. A TBoxT ismaterializable if for any ABoxAthat is satisfiable w.r.tT there exists a modelIofT andAsuch that

(5)

for all CQsq(x) and all tuplesaof individuals inA,T,A |=q(a) iffI |=q(a).

T has thedisjunction property for CQs if for any ABoxA, CQsq1, . . . , qn and tuplesa1, . . . ,an of individuals inA,T,A |=W

1≤i≤nqi(ai) implies that there is aj withT,A |=qj(aj). Anontology-mediated query (OMQ)is a pair (T, q) with T a TBox andqa CQ. A Datalog6= program is a Datalog program that admits inequalities in the body of its rules. We say that (T, q) is Datalog6= rewritable if there is a Datalog6=-program Π such that for any ABox A and tuple a of individuals inA,T,A |=q(a) iffA |=Π(a).

Theorem 1. [15] The following conditions are equivalent for all ALCHIF TBoxesT of depth 2 and allALCHIQ TBoxesT of depth 1:

1. CQ evaluation w.r.t.T is in PTime; 2. T is materializable;

3. T has the disjunction property for CQs;

4. For every CQq, the OMQ(T, q)is Datalog6= rewritable.

Otherwise, CQ evaluation w.r.t. T is coNP-hard.

Theorem 1 is optimal in many ways. For example, the following is shown in [15]:

– the equivalence of Datalog6=-rewritability and PTimeCQ evaluation does not hold forALCF` TBoxes of depth 2 andALC TBoxes of depth 3.

– there areALCIQ TBoxesT of depth 2 such that CQ-evaluation w.r.t.T is neither inPTimenorcoNP-hard.

4 Negative Results

It follows from results in [15] that there are DLs in which rewritability into CQ-inseparable Horn-TBoxes does not capturePTimequery evaluation. In fact, we have seen above that there areALCF` TBoxes of depth 2 andALC TBoxes of depth 3 such that CQ evaluation w.r.t.T is inPTimebut not every OMQ (T, q) is Datalog6=-rewritable. On the other hand, it is well known that every OMQ (T, q) withT a Horn-ALCHIQ TBox is Datalog6=-rewritable [15]. We thus obtain the following.

Theorem 2. For ALCF` TBoxes of depth 2 and ALC TBoxes of depth 3, rewritability into CQ-inseparable Horn-TBoxes does not capture PTimequery evaluation.

We next prove a negative result for ALCQ TBoxes of depth 1. Note that by Theorem 1, anyALCQ TBox T of depth 1 such that CQ evaluation w.r.t. T is inPTimeis rewritable into Datalog6=. We thus need a different argument as in the proof of Theorem 2. This argument is based on products and actually establishes a stronger statement than aimed at, implying for example that not even rewritability into CQ-inseparable Horn-FO TBoxes capturesPTimequery evaluation.

(6)

Theorem 3. ForALCQ TBoxes of depth 1, rewritability into CQ-inseparable Horn-TBoxes does not capture PTimequery evaluation.

Proof. Consider the TBox T = {(≥ 3r) v A}. It is easy to show that T is materializable. Thus, by Theorem 1, CQ evaluation w.r.t.T is inPTime. Assume thatT is CQ-inseparable from a TBoxT0. We show thatT0is not preserved under products and thus not a Horn-ALCQTBox. We have T0 |= (≥3r)vAsince, forA={r(a, b1), r(a, b2), r(a, b3)}, we haveT,A |=A(a) and thusT0,A |=A(a).

We also have T0 6|= (≥ 2r) v A since, for A = {r(a, b1), r(a, b2)}, we have T,A 6|=A(a) and thusT0,A 6|=A(a). Take a modelI ofT0 withd∈(≥2r)Ibut d6∈AI. Then (d, d)∈(≥3r)I×I and (d, d)6∈AI×I. ThusI × I is not a model

ofT0. ut

We now prove a similar negative result for ALCHIF TBoxes of depth 1.

Theorem 4. ForALCHIF TBoxes of depth 1, rewritability into CQ-inseparable Horn-TBoxes does not capture PTimequery evaluation.

Proof. LetT be theALCHIF TBox that states that role namess1 ands2 are functional and contains the RIsrvs1 andrvs2 and the CIs

∃s1.(B1uB2)v ∃r.>

∃s1.> u ∃s2.> v ∀s1.B1u ∀s2.B2

∃s1.> u ∃s2.> vBt ∃r.>

We first show that T is materializable and so, by Theorem 1, CQ evaluation w.r.t.T is inPTime. LetAbe an ABox. Due to the disjunction in the final CI, we have to distinguish two kinds of individualsawhen constructing a materialization ofA. Informally:

– ifahas distincts1- ands2-successors, thenahaving anr-successor contradicts the role inclusions ands1, s2being functional and thus we want to make B true ata;

– ifahas a commons1- ands2-successor, then ∃r.>is implied at a.

Formally, we construct the materialization ofAas follows. Wheneverahas both ans1-successor and ans2-successor, then addBito all itssi-successors,i∈ {1,2}.

Next, for anyathat has an s1-successorb inB1uB2, addr(a, b) ands2(a, b) to the ABox. Denote the resulting ABox byA0. Ifs1 ors2 are not functional inA0, thenA is not satisfiable w.r.t.T. Otherwise, a materialization is obtained by addingB(a) wheneverahas distincts1- ands2-successors.

Assume thatT0 is CQ-inseparable from the TBoxT. We show thatT0 is not preserved under products, thus not a Horn-ALCHIF TBox. Let

A1={s1(a, b1), s2(a, b2)}, A2={s1(a, b), s2(a, b)}.

ThenT,A1 |=B(a) and T,A2 |=∃r.>(a), butT,A1 6|=∃r.>(a) andT,A26|= B(a). Because of CQ-inseparability, the same hold whenT is replaced withT0. Take a modelI1 ofT0 andA1 witha6∈(∃r.>)I1 and a modelI2 ofT0 and A2 witha 6∈ BI2. Then I1× I2 is a model of A1 (for aidentified with (a, a), b1

with (b1, b) andb2 with (b2, b)). However, we do not havea∈BI1×I2 and since T0,A1|=B(a) it follows thatI1× I2 is not a model ofT0. ut

(7)

5 Horn Rewritability in ALCHIF

We introduce a mild restriction onALCHIF TBoxes regarding the interaction between RIs and functionality assertions and show that this restriction is sufficient to overcome the negative result stated in Theorem 4. Notably, the restricted form ofALCHIF TBoxes encompasses both (unrestricted)ALCHI TBoxes and ALCIF TBoxes.

AnALCHIFvfTBox is anALCHIFTBoxT such that wheneverrvs∈ T, then neithersnors are functional inT. The aim of this section is to prove the following result.

Theorem 5. For ALCHIFvf TBoxes of depth 1, rewritability into CQ-in- separable Horn-TBoxes captures PTime query evaluation.

We start by introducing a normal form forALCHIF TBoxes of depth 1. Aliteral is a concept name or a negation thereof. A CICvD is innormal form if

1. Cis anELI-concept of depth 1;

2. Dis a disjunction of – concept names;

– concepts∃r.EwithE a conjunction of literals;

– concepts∀r.EwithE a disjunction of literals that contains at least one positive literal.

We set C = > if C is the empty conjunction and D = ⊥ if D is the empty disjunction. Given a setF of functionality assertionsfunc(r), we can normalise CIs further by demanding that inCvD for eachr such thatfunc(r)∈ F:

– any∃r.D0 inD contains only positive literals;

– if there exists an∃r.C0 in C, then this is the only occurrence ofrinCvD;

– if there exists a∀r.D0 inD, then this is the only occurrence ofr inCvD.

We then call C vD in normal form relative to F. An ALCHIF TBox T is in normal form if all its CIs are in normal form relative to the functionality assertions inT. The following result is shown in the full version of this paper available at http://cgi.csc.liv.ac.uk/ frank/publ/publ.html.

Lemma 2. Every ALCHIFvf TBox T of depth 1 can be converted into a logically equivalent ALCHIFvf TBoxT0 in normal form.T0 is of size at most single exponential in |T |.

Example 2. The TBoxT from Example 1 can be transformed into the TBox T0={∃r.Av ∃r.(¬Au ¬Bu ¬E)t ∀r.(A→BtE)},

which is in normal form. Ifris functional, one obtains{> v ∀r.(A→BtE)}.

We now identify a basic yet crucial property of ALCHIFvf TBoxes T. For anyELIconceptC of depth 1 that contains at most one conjunct of the form

∃r.C0 per functional rolerone can define in a straightforward way a tree-shaped ABoxAC of depth 1 with rootρC that corresponds toC. For example, when C=∃r.> u ∃s.(AuB) thenAC={r(ρC, b1), s(ρC, b2), A(b2), B(b2)}. Then one can prove the following:

(8)

Lemma 3. For everyALCI-conceptD,T |=CvD iffT,AC|=D(ρC).

Note that Lemma 3 fails for unrestrictedALCHIFTBoxes. Consider for example the TBoxT and ABoxA1from the proof of Theorem 4 and letCA1 beA1viewed as anEL-concept. ThenT 6|=CA1vB, butT,A1|=B(a).

We next introduce some preliminaries needed for constructing the desired Horn-ALCHIFvf TBoxes that are CQ-inseparable from a given ALCHIFvf TBox of depth 1. For any conjunction or disjunction of literalsE, we usepos(E) to denote the set of concept names A in E and neg(E) to denote the set of concept namesA such that¬AinE. If∀r.Eis a universal restriction with E a disjunction of literals that contains at least one positive literal, then aHorn specialization of∀r.Eis a concept∀r.E0whereE0is obtained fromEby dropping all but one positive literal. Note that any Horn specialization can be written in the form∀r.(A1u · · · uAn→A).

For anALCHIFvf TBoxT in normal form, we use LT to denote the set of – concept names or existential restrictions that occur on top-level on the

left-hand side of some CI inT;

– concepts∃r.neg(E) such that there is a CI inT whose right-hand side contains a disjunct∀r.E.

A set S ⊆ LT is a trigger for a CI C v D ∈ T if S contains all top-level conjuncts ofC and all ∃r.neg(E) with∀r.Ea disjunct ofD. For a triggerS, we denote byCSthe conjunction of all concept names inS, all existential restrictions

∃r.C0∈Swithrnot functional, and all∃r.(C1u· · ·uCn) whereris functional and C1, . . . , Cn is the set of all concepts such that∃r.Ci∈S. For each CICvD∈ T and triggerS for it, we define a setHorn(CvD, S) of Horn-ALCHIFvf CIs.

As a special case,Horn(C vD, S) is {CS v ⊥} if T |= CS v ⊥. Otherwise, Horn(CvD, S) consists of the following CIs whenever they are a consequence of T:

– CS vAwithAa concept name inD;

– CS vRwithR=∀r.(A1u · · · uAn→A) a Horn restriction of some universal restriction inD;

– CS v ∃r.pos(E) with ∃r.E an existential restriction inD such that T 6|= CS v ¬∃r.E.

Define a Horn-ALCHIF TBoxThornas the union of all functionality assertions and RIs inT and

[

CvD∈T, Strigger forCvD

Horn(CvD, S)

Observe that, by construction, T |=Thorn.

Example 3. For the TBox T0 from Example 2 we haveLT0 ={∃r.A,∃r.>}and thus{∃r.A}is the only trigger for∃r.Av ∃r.(¬Au¬Bu¬E)t∀r.(A→BtE) up to logical equivalence. Thus,Thorn0 ={∃r.Av ∃r.>}which is logically equivalent to the empty TBox.

(9)

Now, Theorem 5 is a consequence of Theorem 1 and the “(1.)⇒(3.)” part of the following result.

Theorem 6. LetT be aALCHIFvf TBox in normal form. Then the following conditions are equivalent:

1. T has the disjunction property for CQs;

2. for everyCvD∈ T and triggerS forCvD,Horn(CvD, S)6=∅.

3. T andThorn are CQ-inseparable.

Proof. (3)⇒(1.) follows from Theorem 1 since CQ-evaluation is inPTimeifT andThorn are CQ-inseparable.

(1.)⇒(2.). AssumeT has the disjunction property for CQs and assume that there areCvD∈ T and a triggerS forCvD such thatHorn(CvD, S) =∅.

LetA1, . . . , Ak,∃r1.E1, . . . ,∃rn.En, and∀s1.F1, . . . ,∀sm.Fmbe the disjuncts of Dsuch that T 6|=CS v ¬∃ri.Ei for 1≤i≤n. LetACS beCS viewed as an ABox with roota0, and leta1, . . . , am be the individuals inACS introduced for the existential restrictions∃si.neg(Fi) inCS. By Lemma 3, we have:

T,ACS |= _

i=1..k

Ai(a0)∨ _

i=1..n

∃ri.pos(Ei)(a0)∨ _

i=1..m

_

A∈pos(Fi)

A(ai).

By the disjunction property for CQs of T and Lemma 3 at least one of the disjunctsF(a) is entailed. We obtain:

– ifF(a) =Ai(a0) thenT |=CS vAi;

– ifF(a) =A(ai) for someA∈pos(Fi), thenT |=CS v ∀si.(neg(Fi)→A);

– ifF(a) =∃ri.pos(Ei)(a0), thenT |=CS v ∃ri.pos(Ei).

In each case, we obtain anα∈Horn(CvD, S) and thus derive a contradiction.

(2.) ⇒ (3.). Assume (2.) holds. It suffices to show that for every ABox A the following holds: if A is satisfiable relative to Thorn, then there exists a materializationU of AandThorn that is a model of T.U is constructed using the following setRT of chase rules:

1. if (d, e)∈rI andrvs∈ T, then add (d, e) tosI; 2. ifd∈CI andCvA∈ Thorn, then adddtoAI;

3. ifd∈CI andCvR∈ ThornforR=∀r.(A1u · · · uAn→A), then addeto AI whenever (d, e)∈rI ande∈(A1u · · · uAn)I.

4. if d∈ CI and C v ∃r.pos(E)∈ Thorn then (i) if r is functional and there existsewith (d, e)∈rI addetoFI for all concept namesF inpos(E) and (ii) otherwise take a fresh element e, add (d, e) torI and adde toFI for all concept names inpos(E). This rule is applied at most once for any pair (d,∃r.E) with∃r.Eon the right hand side of a CI inThorn.

The elementerequired by this rule is called thewitness for ∃r.E atd.

(10)

The interpretationU is the limit of the sequenceI0,I1, . . .obtained from the interpretationI0 corresponding to the ABoxAby applying the rules in RT in a fair way. It is standard to prove thatU is a materialization ofAand ThornifA is satisfiable w.r.t.Thorn (here one uses thatT does not contain any functional rolesswithT |=rvsfor anr6=s).

Our aim now is to prove thatU is a model of T. We proceed in two steps.

Letd∈∆U and assume that the chase introduces eas a witness for∃r.Eatd.

We say that this witness has beeninvalidated ife /∈EU. Observe that ifris a functional role then for anyCv ∃r.pos(E)∈ Thornwe haveE=pos(E). Thus for functional rolesrno witnesses for∃r.E can be invalidated. For an interpretation I andd∈∆I we denote byeltpTU(d) the set of allF ∈LT such thatd∈FI. Claim 1. If the witness for∃r.Eat dwas invalidated, then Thorn|=CSv ¬∃r.E forS=eltpTU(d).

For the proof of Claim 1, denote byACS the ABox with rootρS corresponding toCS. Denote byA∃r.pos(E)C

S the extension ofACS with a fresh individualeand fresh assertions r(ρF, e) and A(e) for A ∈ pos(E). We now apply the chase procedure forThorn toA∃r.pos(E)C

S rather thatAand obtain a materializationU0 ofA∃r.pos(E)C

S andThorn. Using the fact that the CIs ofThornhave depth 1 and the condition that the witness for∃r.E atdwas invalidated in the chase applied to Aone can readily show that it is invalidated inA∃r.pos(E)C

S as well. Thuse6∈EU0 and it follows with Lemma 3 thatThorn|=CS v ¬∃r.E.

Claim 2.U is a model ofT.

Let C v D ∈ T and d ∈ CU. We show that d ∈ DU. For a proof by contradiction assume that this is not the case. Then the set S =eltpTU(d) is a trigger forCvD. By (2.) there exists α∈Horn(CvD, S). We obtain that at least one of the following holds:

1. there is a concept nameAinDsuch thatT |=CS vA. ThenCS vA∈ Thorn and sod∈AU. Thusd∈DU and we have derived a contradiction.

2. there is a universal restriction R=∀r.(A1u · · · uAn →A) that is a Horn restriction of some universal restriction inD such thatT |=CS vR. Then CS v R ∈ Thorn and so d ∈ RU. Thus d ∈ DU and we have derived a contradiction.

3. there is an ∃r.Ein Dsuch that T |=CS v ∃r.pos(E) andT 6|=CS v ¬∃r.E.

Then there existse∈∆Uwith (d, e)∈rUsuch thate∈pos(E)U. By Claim 1, the witnesse for∃r.Eatd was not invalidated. Thusd∈(∃r.E)U. Hence d∈DU and we have derived a contradiction.

This finishes the proof of Theorem 6. ut

The following example shows thatThorn can be of exponential size in|T | even if redundant CIs are removed.

(11)

Example 4. LetTn contain

Biv ∀s.Ai ∃r.> v ∃s.>

iv ∀s.Ai ∃r.> vAt

t

1≤i≤n∃s.¬Ai

where 1≤i≤n. The TBoxThornn is obtained fromTn by replacing the final CI by the set of CIs

∃r.> u

u

1≤i≤nCivA

where Ci ∈ {Bi,Bˆi}. Then Thornn and Tn are CQ-inseparable and Thornn is of exponential size in|Tn|.

Clearly, the TBoxes Thornn can be equivalently expressed by Horn-TBoxes of polynomial size in |Tn| by introducing disjunctions on the left-had side of CIs. In fact, it remains open whether for everyALCHIFvf TBoxes in normal form for which CQ-evaluation is inPTimethere exists a CQ-inseparable Horn- ALCHIFvf TBox of polynomial size.

6 Conclusion

We have shown that rewritability into CQ-inseparable Horn-TBoxes captures PTimequery evaluation for ALCHIF TBoxes of depth 1 in which no role is included in a functional role. Interestingly, this result also implies that CQ- inseparable rewritability into Horn-TBoxes is decidable andExpTime-complete for such ALCHIF TBoxes since it is shown in [15] that deciding whether CQ- evaluation is inPTimeforALCHIF TBoxes of depth 1 isExpTime-complete.

We have also shown that for arbitrary ALCHIF andALCQTBoxes of depth 1, rewritability into CQ-inseparable Horn-TBoxes does not capturePTime query evaluation. These negative results depend on the unique name assumption we make in this paper. In fact, it is not difficult to see that CQ-evaluation iscoNP- hard for the TBoxes used in the proofs of Theorems 3 and 4 and so they cannot serve as counterexamples anymore. We conjecture that without the unique name assumption one can generalize our positive result and show that rewritability into CQ-inseparable Horn-TBoxes capturesPTimequery evaluation for arbitrary ALCHIQTBoxes of depth 1. Observe that for TBoxes not using functional roles or qualified number restrictions CQ-evaluation does not depend on whether one makes the unique name assumption or not. Thus, the negative result that for ALC TBoxes of depth 3 CQ-inseparable Horn-TBoxes do not capture PTime query evaluation does not depend on the unique name assumption. It remains an interesting open question whether rewritability into CQ-inseparable Horn-TBoxes capturesPTimequery evaluation forALC orALCI TBoxes of depth 2.

AcknowledgementsAndr´e Hernich, Fabio Papacchini, and Frank Wolter were supported by EPSRC UK grant EP/M012646/1. Carsten Lutz acknowledges support by the DFG-funded Collaborative Research Center EASE.

(12)

References

1. Artale, A., Calvanese, D., Kontchakov, R., Zakharyaschev, M.: The DL-Lite family and relations. J. of Artifical Intelligence Research 36, 1–69 (2009)

2. Baader, F., Horrocks, I., Lutz, C., Sattler, U.: An Introduction to Description Logics. Cambride University Press (2017)

3. Bienvenu, M., ten Cate, B., Lutz, C., Wolter, F.: Ontology-based data access: A study through disjunctive datalog, csp, and MMSNP. ACM Trans. Database Syst.

39(4), 33:1–33:44 (2014)

4. Bienvenu, M., Hansen, P., Lutz, C., Wolter, F.: First order-rewritability and con- tainment of conjunctive queries in horn description logics. In: IJCAI. pp. 965–971 (2016)

5. Bienvenu, M., Ortiz, M.: Ontology-mediated query answering with data-tractable description logics. In: Proc. of Reasoning Web. pp. 218–307 (2015)

6. Botoeva, E., Konev, B., Lutz, C., Ryzhikov, V., Wolter, F., Zakharyaschev, M.:

Inseparability and conservative extensions of description logic ontologies: A survey.

In: Reasoning Web: Proceedings of 12th International Summer School. pp. 27–89 (2016)

7. Botoeva, E., Lutz, C., Ryzhikov, V., Wolter, F., Zakharyaschev, M.: Query-based entailment and inseparability for ALC ontologies. In: Proceedings of IJCAI. pp.

1001–1007 (2016)

8. Cal`ı, A., Gottlob, G., Pieris, A.: Towards more expressive ontology languages: The query answering problem. Artif. Intell. 193, 87–128 (2012)

9. Calvanese, D., De Giacomo, G., Lembo, D., Lenzerini, M., Rosati, R.: Data com- plexity of query answering in description logics. Artificial Intelligence 195, 335–360 (2013)

10. Carral, D., Feier, C., Grau, B.C., Hitzler, P., Horrocks, I.:EL-ifying ontologies. In:

IJCAR. pp. 464–479 (2014)

11. Chang, C.C., Keisler, H.J.: Model Theory, Studies in Logic and the Foundations of Mathematics, vol. 73. Elsevier (1990)

12. Eiter, T., Gottlob, G., Ortiz, M., Simkus, M.: Query answering in the description logic Horn-SHIQ. In: JELIA. pp. 166–179 (2008)

13. Feier, C., Lutz, C., Kuusisto, A.: Rewritability in monadic disjunctive datalog, mmsnp, and expressive description logics. In: ICDT (2017)

14. Hernich, A., Lutz, C., Ozaki, A., Wolter, F.: Schema.org as a description logic. In:

Proceedings of IJCAI. pp. 3048–3054 (2015)

15. Hernich, A., Lutz, C., Papacchini, F., Wolter, F.: Dichotomies on ontology-mediated querying with the guarded fragment. In: Proceedings of PODS (2017)

16. Hustadt, U., Motik, B., Sattler, U.: Reasoning in description logics by a reduction to disjunctive datalog. J. Autom. Reasoning 39(3), 351–384 (2007)

17. Kaminski, M., Grau, B.C.: Computing horn rewritings of description logics ontolo- gies. In: Proceedings of IJCAI. pp. 3091–3097 (2015)

18. Kaminski, M., Nenov, Y., Grau, B.C.: Datalog rewritability of disjunctive datalog programs and non-horn ontologies. Artif. Intell. 236, 90–118 (2016)

19. Kazakov, Y.: Consequence-driven reasoning for Horn-SHIQontologies. In: Boutilier, C. (ed.) IJCAI. pp. 2040–2045 (2009)

20. Konev, B., Lutz, C., Wolter, F., Zakharyaschev, M.: Conservative rewritability of description logic tboxes. In: IJCAI. pp. 1153–1159 (2016)

21. Kontchakov, R., Lutz, C., Toman, D., Wolter, F., Zakharyaschev, M.: The combined approach to query answering in DL-Lite. In: Proc. of KR (2010)

(13)

22. Kontchakov, R., Zakharyaschev, M.: An introduction to description logics and query rewriting. In: Proc. of Reasoning Web. pp. 195–244 (2014)

23. Krisnadhi, A., Lutz, C.: Data complexity in the el family of dls. In: Proc. of DL (2007)

24. Kr¨otzsch, M., Rudolph, S., Hitzler, P.: Complexity boundaries for Horn description logics. In: AAAI. pp. 452–457 (2007)

25. Lutz, C., Piro, R., Wolter, F.: Description logic tboxes: Model-theoretic characteri- zations and rewritability. In: IJCAI (2011)

26. Lutz, C., Wolter, F.: Deciding inseparability and conservative extensions in the description logic EL. J. Symb. Comput. 45(2), 194–228 (2010)

27. Lutz, C., Wolter, F.: Non-uniform data complexity of query answering in description logics. In: Proc. of KR. AAAI Press (2012)

28. Mugnier, M., Thomazo, M.: An introduction to ontology-based query answering with existential rules. In: Proc. of Reasoning Web. pp. 245–278 (2014)

29. Ortiz, M., Rudolph, S., Simkus, M.: Query answering in the Horn fragments of the description logicsSHOIQandSROIQ. In: IJCAI. pp. 1039–1044 (2011) 30. Poggi, A., Lembo, D., Calvanese, D., Giacomo, G.D., Lenzerini, M., Rosati, R.:

Linking data to ontologies. J. Data Semantics 10, 133–173 (2008)

31. Schaerf, A.: On the complexity of the instance checking problem in concept languages with existential quantification. J. of Intel. Inf. Systems 2, 265–278 (1993)

Références

Documents relatifs

(i) approaches that target rewritings in the more expressive query language dat- alog which are incomplete in the sense that the generated datalog-rewritings are not guaranteed to

Thus, given an ELU-program D, its Datalog rewriting P, and a rule r ∈ P, the depth of G r is still bounded by the maximal transfer depth of a predicate in D and cannot be

In this paper we develop an algorithm based on clausal resolution for computing uniform interpolants of TBoxes formulated in the description logic ALC which can pre- serve all

We consider CF Dnc, an alternative to the description logic CF D that retains the latter’s ability to support PTIME reasoning in the presence of termi- nological cycles with

In our practical experience portrayed here, the most relevant lesson learned was that we could only overcome DL representational problems by using at least a full first-order

It can answer queries efficiently over Horn- SHIQ ontologies and scales down nicely to DL-Lite, where it is competitive with state of the art query rewriting systems.. – The

The contribution of this paper is an abstract labelled tableau calculus for the description logic SHOI using ordered rewriting and generic forms of blocking defined as variations of

It is interesting to note that the techniques from this paper can be used to reprove in a transparent way the ExpTime upper bound for CQ answering over S knowledge bases that