• Keine Ergebnisse gefunden

Temporal Query Answering in the Description Logic EL

N/A
N/A
Protected

Academic year: 2022

Aktie "Temporal Query Answering in the Description Logic EL"

Copied!
7
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Temporal Query Answering in the Description Logic EL

Stefan Borgwardt and Veronika Thost Technische Universität Dresden, Germany firstname.lastname@tu-dresden.de

Abstract

Context-aware systems use data collected at run- time to recognize certain predefined situations and trigger adaptations. This can be implemented using ontology-based data access (OBDA), which aug- ments classical query answering in databases by adopting the open-world assumption and includ- ing domain knowledge provided by an ontology.

We investigate temporalized OBDA w.r.t. ontolo- gies formulated inEL, a description logic that al- lows for efficient reasoning and is successfully used in practice. We consider a recently proposed tem- poralized query language that combines conjunc- tive queries with the operators of propositional lin- ear temporal logic (LTL), and study both data and combined complexity of query entailment in this setting. We also analyze the satisfiability problem in the similar formalismEL-LTL.

1 Introduction

Context-aware systems use data collected at runtime to rec- ognize certain predefined situations and trigger adaptations.

For example, an operating system might be able to recognize that a video application is out of user focus (e.g., by corre- sponding sensors) and then adapt application parameters to optimize the energy consumption of the system. A straight- forward approach is to encode the situations into queries over a database containing the sensor data. However, in general, sensors do not completely describe the environment (e.g., to date, sensors cannot capture the intentions of users), and usu- ally additional knowledge about the behavior of the environ- ment is available. For example, if the user has not been watch- ing the video for a longer period of time because he is using another application on a second screen, then the video does not need to be displayed in the highest resolution.

Ontology-based data access [Poggi et al., 2008; Decker et al., 1998] remedies this situation by adopting theopen- world assumption, where facts not present in the data are assumed to be unknown rather than false, and by employ- ing anontology to encode background knowledge. This is done using axioms of an appropriate ontology language, for example a description logic(DL) [Baader et al., 2003]. In this paper, we focus on ontologies in the lightweight DLEL,

which allows for efficient reasoning [Baader et al., 2005;

Lutzet al., 2009] and is successfully applied in practice (e.g., in large biomedical ontologies like SNOMED CT1). In this setting, the data is collected into afact base(orABox) con- tainingassertionsabout individuals using unary and binary predicates, called concepts and roles, respectively. Thus, we can represent both static knowledge about active applica- tions as well as dynamic knowledge about the current context:

VideoApplication(app1),NotWatching(user1). Background knowledge is represented in theontology(orTBox) using so- calledgeneral concept inclusions(GCIs) like

VideoApplicationu ∃hasUser.NotWatching

v ∃hasState.OutOfFocus, saying that a video application whose user is currently not watching the video is out of user focus. ABox and TBox to- gether are calledknowledge base. We can use aconjunctive query(CQ) likeψ(x) :=∃y.hasState(x, y)∧OutOfFocus(y) over this knowledge base to identify applicationsxthat can potentially be assigned a lower priority. However, complex situations typically depend also on the behavior of the en- vironment in the past. For example, the operating system should not switch between configurations every time the user is not watching for one second, but only after this has been the case for a longer period of time.

For that reason, we investigate temporal conjunctive queries(TCQs), originally proposed in [Baaderet al., 2013;

2015]. They allow to combine conjunctive queries via the op- erators of the propositional linear temporal logic LTL [Pnueli, 1977; Lichtensteinet al., 1985]. Hence, we can use the TCQ

#ψ(x)

∧ ##ψ(x)

∧ ###ψ(x)

¬ ∃y.GotPriority(y)∧notEqual(x, y)

SGotPriority(x) to obtain all applications that were out of user focus during the threeprevious(#) moments of observation, were prior- itized by the operating system at some point in time, and the priority hasnot(¬) changedsince(S) then.2

The semantics of TCQs is based on temporal knowledge bases(TKBs), which, in addition to the background knowl- edge (which is assumed to holdglobally, i.e., at every point in

1http://www.ihtsdo.org/snomed-ct/

2Although our formalism does not support it yet, priority values can be represented if the underlying DL allows for so-called concrete domains.

(2)

rigid symbols TCQ entailment TCQ entailment EL-LTL satisfiability EL-LTL satisfiability

(data complexity) (combined complexity) (with global GCIs)

none P PSPACE PSPACE PSPACE

LB: [C+06], UB: Thm. 5 LB: [SC85] LB: [SC85], UB: Thm. 11 LB: [SC85]

only concepts CO-NP PSPACE NEXPTIME PSPACE

LB: Thm. 8 UB: Thm. 6 LB: Thm. 9

concepts and roles CO-NP CO-NEXPTIME NEXPTIME PSPACE

UB: Thm. 5 LB: Thm. 7, UB: Thm. 5 UB: Thm. 11 UB: Thm. 12 Table 1: Summary of the complexity results; [C+06] stands for [Calvaneseet al., 2006], [SC85] for [Sistla and Clarke, 1985]

time), contains asequenceof ABoxesA0,A1, . . . ,An, rep- resenting the data collected at specific points in time. We des- ignate withnthe most recent time of observation (thecurrent time point), at which the situation recognition is performed.

We also investigate the related temporalized formalismEL- LTL, in which axioms, i.e., assertions or GCIs, are com- bined using LTL-operators. This approach was first suggested in [Baaderet al., 2012].

In our setting, the axioms in the TKB do not explicitly refer to temporal information, but are written in aclassical(atem- poral) DL; only the query is temporalized. In contrast, [Lutz et al., 2008; Artaleet al., 2007; 2014; Gutiérrez-Basultoet al., 2014] extend classical DLs by temporal operators, which then occur within the knowledge base. However, most of these logics yield high reasoning complexities, even if the underlying atemporal DL has tractable reasoning problems.

Lower complexities are only obtained by either considerably restricting the set of temporal operators or the underlying DL.

Regarding temporal properties formulated over atemporal DLs,ALC-LTL, a variant ofEL-LTL over the more expres- sive DLALC, was first considered in [Baaderet al., 2012].

This was the basis for introducing TCQs overALC-TKBs in [Baaderet al., 2013], which was extended toSHQin [Baader et al., 2015]. However, reasoning inALCis not tractable, and context-aware systems often need to deal with large quantities of data and adapt fast. TCQs over several lightweight logics have been regarded in [Borgwardtet al., 2015], but only over a fragment of LTL without negation. In [Artaleet al., 2007], the complexity of LTL over axioms of several members of theDL-Litefamily of DLs has been investigated. However, nothing is known about TCQs over these logics.

In this paper, we want to answer TCQs over TKBs formu- lated inEL and in particular investigate both the combined and the data complexity of the temporal query entailment problem. Moreover, we determine the complexity of satis- fiability of EL-LTL-formulae, and additionally consider the special case where onlyglobal GCIsare allowed [Baaderet al., 2012]. As usual, we consider rigid concepts and roles, whose interpretation does not change over time. In this re- gard, we distinguish three different settings, depending on whether concepts or roles (or both) are allowed to be rigid.

Since rigid concepts can be simulated by rigid roles [Baader et al., 2012], only three cases need to be considered.

Our results are summarized in Table 1. The complexity ofEL-LTL is often lower than that ofALC-LTL, for which

satisfiability is EXPTIME-, NEXPTIME-, and 2-EXPTIME- complete, respectively, in the three settings we consider [Baader et al., 2012]. This partially confirms and refutes the conjecture from [Baaderet al., 2012] that EL-LTL is as hard as ALC-LTL. Using only global GCIs, the complex- ity matches that of (unrestricted)DL-Litekrom-LTL [Artaleet al., 2007]. Regarding TCQs, the complexity is even more re- duced compared toALC(andSHQ), where TCQ entailment is in EXPTIME, CO-NEXPTIME, and 2-EXPTIME, respec- tively, w.r.t. combined complexity, and in CO-NP, CO-NP, and EXPTIME, respectively, w.r.t. data complexity [Baader et al., 2015]. The only lower bounds that directly apply to the problems considered here are PSPACE-hardness of LTL [Sistla and Clarke, 1985] and P-hardness of CQ entail- ment inELw.r.t. data complexity [Calvaneseet al., 2006].

Our results are based on known techniques forALC-LTL and TCQs overALC-TKBs [Baaderet al., 2012; 2015], but we had to significantly adapt them and to combine them with new approaches, in particular for some of the hardness proofs and for the PSPACEupper bounds. Full proofs of all results can be found in the technical reports [Borgwardt and Thost, 2015a; 2015b].

2 EL and LTL

We introduce the formalisms underlying the temporal lan- guages we consider in this paper.

The DL part focuses on the logic EL. LetNC,NR,NI be sets of concept-, role-, andindividual names, respectively.

Conceptsare built from concept names using the constructors conjunction(CuD),existential restriction(∃r.Cforr∈NR), andtop concept(>). Anaxiomis either anassertionof the formA(a)orr(a, b), whereA∈NC,r∈NR, anda, b∈NI, or ageneral concept inclusion (GCI)of the formCvDfor conceptsC, D. AnABoxis a finite set of assertions, aTBox is a finite set of GCIs, and aknowledge base(KB) is a pair hT,Aiconsisting of a TBoxT and an ABoxA.

An interpretation I has a non-emptydomain∆I and an interpretation function·Ithat assigns to everyA∈NC a set AI ⊆ ∆I, to every r ∈ NR a relation rI ⊆ ∆I ×∆I, and to everya ∈ NI an elementaI ∈ ∆I. This function is extended to concepts as follows: (CuD)I := CI∩DI; (∃r.C)I:={x| ∃y: (x, y)∈rI∧y∈CI};>I:= ∆I. An interpretationIsatisfies(or is amodelof)A(a)ifaI ∈AI; r(a, b)if(aI, bI)∈rI;CvDifCI⊆DI; a set of axioms or KB if it satisfies all its axioms. A KBKentailsan axiomα

(3)

(writtenK |=α) if every model ofKis also a model ofα.

The temporal component of our formalisms is based on propositional LTL [Pnueli, 1977]. LTL-formulae are built from a set of propositional variablesP using conjunction (φ∧ψ), negation (¬ψ), next (#φ), previous (#φ), until (φUψ), and since(φSψ). AnLTL-structureI = (wi)i≥0 is an infinite sequence ofworldswi ⊆P. Validityof an LTL- formula φ in I at time pointi ≥ 0 (written I, i |= φ) is defined inductively:

I, i|=p iff p∈wi (forp∈P) I, i|=φ∧ψ iff I, i|=φandI, i|=ψ I, i|=¬φ iff notI, i|=φ

I, i|=#φ iff I, i+ 1|=φ

I, i|=#φ iff i >0andI, i−1|=φ

I, i|=φUψ iff there isk≥isuch thatI, k|=ψ andI, j|=φfor alljwithi≤j < k I, i|=φSψ iff there is0≤k≤i, such thatI, k|=ψ

andI, j|=φ, for alljwithk < j ≤i An LTL-formulaφissatisfiableif there is an LTL-structureI withI,0|=φ. Note that this logic is usually calledPast-LTL due to the operators#andS. The presence of past operators does not affect the complexity of the satisfiability problem [Lichtensteinet al., 1985], but allows to write some formulae more succinctly [Laroussinieet al., 2002]. As usual, one can express other temporal operators such aseventually(3φ) and always(2φ) in this logic.

3 Temporal Query Entailment in EL

As described in the introduction, in our temporal formalism we can designate certain concept and role names as being rigid, which means that their interpretation is not allowed to change over time. For this purpose, we fix a setNRC⊆NCof rigid concept namesand a setNRR⊆NRofrigid role names.

Temporal conjunctive queries(TCQs) [Baaderet al., 2015]

are constructed exactly as LTL-formulae, except that con- junctive queries (CQs) [Abiteboulet al., 1995] take the place of the propositional variables. Aconjunctive queryis of the form∃x1, . . . , xm.ψ, wherex1, . . . , xmare variables andψ is a conjunction ofatomsof the formA(t)orr(t, t0), where A∈NC,r∈NR, andt, t0 are individual names or variables.

ABooleanTCQ does not contain free variables. ACQ-literal is either a CQ or a negated CQ; and aunion of conjunctive queries(UCQ) is a disjunction of CQs.

The semantics of TCQs is also very similar to that of LTL- formulae. However, instead of LTL-structures one has to consider infinite sequencesI = (Ii)i≥0 of interpretations.

Following [Baaderet al., 2015], we make the constant do- main assumption (i.e., the interpretations all have the same domain∆). Furthermore, we have to ensure that the rigid names are respected; that is, we require thatsIi =sIj holds for all symbolss∈NI∪NRC∪NRRandi, j≥0.Validityof a TCQφinIat time pointi≥0(again denoted byI, i|=φ) is now defined exactly as for LTL in Section 2, with the obvious exception of CQs. For these, we adopt the classical seman- tics based on homomorphisms [Chandra and Merlin, 1977].

More precisely, the fact thatI, i |= ψfor a CQψis equiv- alent toψbeing satisfied byIi (writtenIi |= ψ), which is

the case if there is ahomomorphismπmapping the variables and individual names ofψinto∆such that: π(a) =aIi for alla∈NI;π(t)∈AIi for all concept atomsA(t)inψ; and (π(t), π(t0))∈rIi for all role atomsr(t, t0)inψ.

We now considertemporal knowledge bases(TKBs) of the formK = hT,(Ai)0≤i≤ni, whereT is a TBox and theAi

are ABoxes. As described in the introduction,T represents the global knowledge about the application domain, whereas theAi contain data about different time points. A sequence I= (Ii)i≥0of interpretations as abovesatisfies(or is amodel of)K(writtenI |=K) if we haveIi |=T for alli≥0, and Ii|=Aifor alli,0≤i≤n. A Boolean TCQφissatisfiable w.r.t.Kif there is a modelIofK such thatI, n |= φ, and it isentailedbyK(writtenK |=φ) if for all modelsIofK it holds thatI, n |= φ. Recall that we are interested in the current time pointn, for which the most recent data (An) is available.

For a (non-Boolean) TCQφ, a mappingaof the free vari- ables inφto the individual names of Kis acertain answer toφ w.r.t.K if K |= a(φ), wherea(φ) is obtained fromφ by replacing the free variables according toa. As usual, the problem of computing all certain answers can be reduced to exponentially many entailment tests. Therefore, we investi- gate in the following the complexity of the TCQ entailment problem inEL. We do this indirectly, via the satisfiability problem, which has the same complexity as non-entailment.

We consider bothdata complexity, where the TBoxT and the TCQφare assumed to be fix and the complexity is mea- sured only w.r.t. the size of the input ABoxes(Ai)0≤i≤n; and combined complexity, where also the influence ofT andφis taken into account. As described in the introduction, we fur- ther distinguish the three cases where (i) no rigid names are available (NRC = NRR = ∅); (ii) only rigid concept names are allowed (NRR =∅, butNRC 6=∅); and (iii) also rigid role names can be used (NRR 6=∅).

We next state an auxiliary result about satisfiability of (atemporal) conjunctions of CQ-literals. Note that, for this case, it suffices to consider an ordinary KB instead of a TKB.

Lemma 1. W.r.t. combined complexity, deciding whether a Boolean conjunction of CQ-literalsψ is satisfiable w.r.t. a KBK = hT,Aican be reduced to several P-tests, whose number is polynomial in the number of conjuncts ofψ and exponential in the size of the largest negated conjunct inψ.

Proof Sketch. We can reduce this problem to the UCQ non- entailment problemhT,A ∪ A0i 6|= σ1∨. . .∨σm, where A0is obtained from instantiating the variables of the CQs oc- curring positively inψ with fresh individual names, andσi

are the CQs occurring negatively inψ. Using the algorithm in [Rosati, 2007], this can be solved by a series of polyno- mial non-entailment tests, one for every possible CQ result- ing from someσi by unifying some of the terms ofσi. The claim follows from the fact that there are at most exponen- tially many such unifiers.

3.1 The Upper Bounds

In this section, we describe the general approach used in [Baaderet al., 2012; 2015] to solve the satisfiability prob- lem. In the following, letK=hT,(Ai)0≤i≤nibe a TKB and

(4)

φbe a Boolean TCQ. For ease of presentation, we assume that all concept and role names occurring in(Ai)0≤i≤norφ also occur inT, and that all individual names occurring inφ also occur in(Ai)0≤i≤n. These assumptions do not affect the complexity results.

The main idea is to consider two separate satisfiability problems—one in LTL and the other in EL—that together imply satisfiability ofφw.r.t.K. The LTL part analyzes the propositional abstractionφpofφ, which contains the propo- sitional variablesp1, . . . , pmin place of the CQsα1, . . . , αm

from φ(where each αi was replaced by pi). Furthermore, letS ⊆2{p1,...,pm}be a set that specifies the worlds that are allowed to occur in an LTL-structure satisfyingφp. This con- dition is formalized by the following LTL-formula:

φpSp∧2

 _

X∈S

^

p∈X

p∧ ^

p∈X

¬p

,

whereX :={p1, . . . , pm} \X is the complement ofX∈ S. However, for checking satisfiability ofφw.r.t.K, it is not sufficient to find such a set S and then test whetherφpS is satisfiable (at time pointn). We must also ensure thatS can indeed be induced by a model ofKin the following sense.

Definition 2. Let S = {X1, . . . , Xk} ⊆ 2{p1,...,pm} and ι:{0, . . . , n} → {1, . . . , k}.Sisr-satisfiable(w.r.t.ιandK) if there are interpretationsJ1, . . . ,Jk,I0, . . . ,Insuch that

• they share the same domain and respect rigid names;3

• the interpretations are models ofT;

• eachJiis a model ofχi:= ^

pj∈Xi

αj∧ ^

pj∈Xi

¬αj; and

• eachIiis a model ofAiandχι(i).

The existence ofJiensures that the conjunctionχiof CQ- literals induced byXiis satisfiable; a setScontaining anXi

for which this does not hold cannot be induced by a model of K. The interpretations Ii represent the firstn+ 1 ele- ments of such a model, which must additionally satisfy the ABoxesAi. The mappingιchooses a world for each ABox.

We now call φp t-satisfiable (w.r.t. S and ι as above) if there is an LTL-structureI = (wi)i≥0withI, n|=φpS and wi =Xι(i)for alli,0≤ i≤n. Intuitively,Iis the propo- sitional abstraction of the model ofφw.r.t.Kwe are looking for. The following was shown in [Baaderet al., 2015] for SHQ, and remains valid in our setting.

Lemma 3. φis satisfiable w.r.t.K iff there areS and ιas above such thatS is r-satisfiable w.r.t.ιand Kandφp is t- satisfiable w.r.t.Sandι.

Since t-satisfiability is independent of the DL part, we can also reuse the following result from [Baaderet al., 2015].

Lemma 4. Checking t-satisfiability ofφpS w.r.t.Sandιis

• inEXPTIMEw.r.t. combined complexity, and

• inPw.r.t. data complexity.

Given this, we already obtain some of the upper bounds.

3This is defined as for sequences of interpretations.

Theorem 5. TCQ entailment inELis

• inCO-NPw.r.t. data complexity and inCO-NEXPTIME

w.r.t. combined complexity even ifNRR6=∅,

• inPw.r.t. data complexity ifNRC=NRR =∅.

Proof Sketch. Recall that we show the complementary results by regarding TCQ satisfiability. LetK=hT,(Ai)0≤i≤nibe a TKB andφ be a Boolean TCQ. For the first two results, we can simply guessS andιas required for Lemma 3; note thatSis of constant size in the size of the input ABoxes. By Lemma 4, the required t-satisfiability test can be done within the claimed time bounds. For the r-satisfiability test, we use a technique from [Baaderet al., 2015] that constructs an expo- nentially large conjunctionχS,ιof CQ-literals and TBoxTS,ι

such that it remains to check satisfiability ofχS,ιw.r.t.TS. Since the CQ-literals inχSare essentially of the same size as the CQs inφ, we can apply Lemma 1 to decide this prob- lem via exponentially many EXPTIME-tests w.r.t. combined complexity. Moreover, the number of conjuncts ofχS,ιand the size ofTS,ιare linear in the size of the input ABoxes, and thus we obtain an upper bound of P w.r.t. data complexity.

For the last result, observe first that in the absence of rigid names the satisfiability tests of Definition 2 are largely inde- pendent of each other. Hence, it suffices to defineSas the set ofallsetsXj for whichχjis satisfiable w.r.t.T. Likewise, we consider, for each ABoxAi, the setι0(i)ofallindicesj of worldsXj for whichχj is satisfiable w.r.t.hT,Aii, and employ a modified t-satisfiability test w.r.t. these sets. This results in adeterministicpolynomial-time procedure.

It remains to consider the case whereNRR =∅, but possi- blyNRC 6=∅, under combined complexity (see Table 1). Note that the satisfiability tests of Definition 2 are not independent in this case. Nevertheless, we can guess polynomially many additional data (seeARandQ¬R below) that allow us to sep- arate these tests. We then combine these with the PSPACE- procedure for LTL-satisfiability of [Sistla and Clarke, 1985]

in order to obtain the claimed upper bound.

We assume here that the sequence of input ABoxes consists only of one empty ABox; this is without loss of generality since the ABoxes can be encoded into the TCQ without af- fecting the (combined) complexity [Baaderet al., 2015]. We thus consider a TKBK=hT,∅iand a Boolean TCQφ.

Before stating the main result, we first give some auxil- iary definitions. Letψ be a CQ that does not contain any individual names and istree-shaped(i.e., the directed graph described by its atoms is a tree), and letxbe the root of this tree. ThenCon(ψ)abbreviates the conceptCon(ψ, x), where

Con(ψ, y) := l

A(y)∈ψ

Au l

r(y,z)∈ψ

∃r.Con(ψ, z).

A subsetB of the rigid concept names occurring in T is a witnessofψw.r.t.T if there arer1, . . . , r`,` ≥0, such that T |= (d

B) v ∃r1. . . .∃r`.Con(ψ). Intuitively, if a model ofT contains an element satisfyingd

B, thenψis satisfied.

We now consider all possible assertions over the individ- ual names and therigidconcept names occurring in the in- put, together with their negations. AnABox typeARis a set

(5)

of such assertions such that A(a) ∈ AR iff ¬A(a) ∈ A/ R. GivenS ={X1, . . . , Xk} ⊆2{p1,...,pm}, we define the KBs KRi := hT,AR∪ AQii,1 ≤ i ≤ k, where the ABoxAQi

contains the CQs occurring positively inχiwith the variables replaced by fresh individual names. A tuple(AR, Q¬R), where ARis an ABox type andQ¬R is a subset of{α1, . . . , αm}, is r-complete(w.r.t.S) if the following hold:

(R1) For alli∈ {1, . . . , k},KiRhas a model.

(R2) For alli∈ {1, . . . , k}andpj∈Xi, we haveKiR6|=αj. (R3) For alli∈ {1, . . . , k}, all tree-shapedα∈Q¬R, and all

witnessesBofαw.r.t.T, we haveKiR6|=∃x.B(x).

(R4) For allαj ∈ Qφ\Q¬R, we havepj ∈T S.

The idea is to fix the interpretation of the rigid names on all named individuals and specify the CQs that are allowed to oc- cur negatively inSvia the guessed data(AR, Q¬R). (R1) and (R2) ensure that exactly the queries specified byXi, together with the assertions fromAR, can be satisfied w.r.t.T. (R3) ensures that there is a model ofKRi that does not satisfy any of the witnesses of the tree-shaped queries inQ¬R (thecanonical model[Lutzet al., 2009]). Finally, (R4) makes sure that only the queries fromQ¬R can occur negatively in anyX ∈ S.

We can show that r-satisfiability of S is characterized by the existence of such an r-complete tuple. To actually ob- tain a PSPACEdecision procedure from this result, we adapt the PSPACE-Turing machine from [Sistla and Clarke, 1985]

that successively guesses propositional worlds and checks whether these can be assembled into an LTL-structure sat- isfyingφp. We use a modified version of this Turing ma- chine that first guesses a tuple(AR, Q¬R)as described above, and then proceeds as before, but, for each guessed worldXi, additionally checks whether the KBKiR satisfies Conditions (R1)–(R4). For (R1), note that the negated assertions inAR

do not pose a problem, as they can be simulated using nomi- nals and the bottom constructor [Baaderet al., 2005]. More- over, the non-entailment tests in (R2) and (R3) can be done using only the positive assertions in AR. Finally, to check whether a given setB is actually a witness of a tree-shaped CQα∈ Q¬R, it suffices to do a reachability test in the com- pletion graph ofT [Baaderet al., 2005].

Theorem 6. IfNRR = ∅, but possiblyNRC 6= ∅, then TCQ entailment inELis inPSPACEw.r.t. combined complexity.

3.2 What Makes It Hard

If NRR 6= ∅, we can show CO-NEXPTIME-hardness w.r.t.

combined complexity by adapting the proof of NEXPTIME- hardness of satisfiability in ALC-LTL from [Baader et al., 2012]. The latter reduces the2n+1-bounded domino prob- lem [Lewis, 1978; Börgeret al., 1997] and the result already holds if only concept names are allowed to be rigid. However, ALC-LTL-formulae are built by replacing the propositional variables in LTL-formulae by axioms of the more expressive DLALC, which may contain concept negation (¬) and dis- junction (t). In a nutshell, the original proof represents the positions in the2n+1 ×2n+1 domino grid in two different ways: for each position, there is a specific time point repre- senting it, as well as a domain elementxi. This dual repre- sentation facilitates the encoding of the domino conditions.

0 1 2 3 4 · · ·

· · · t

Aψt

c C c c c T c C

ax1 ax3 A a¬x4 A

a¬x1 a¬x3 ax4

s s s

r r r

Figure 1: The ABoxes for(x1∨x3∨¬x4)∧. . .; framed names describe a possible extension to a model ofφw.r.t.Kψ.

We describe some interesting adaptations necessary to apply the proof for the case of conjunctive queries and a globalEL- TBox; the detailed proof can be found in the technical report.

• Instead of the formula2¬(> v ¬N), we use the TCQ 2(∃x.r(x, a)∧N(x))to create the elementsxi. This connects them to a fixed individualavia the new rigid rolerand allows us to refer back to them later.

• Formulae of the form(> v A)∨(> v ¬A)are used to express thatA is either satisfied by all domain ele- ments or by none. The second axiom can be expressed by the negated CQ¬∃x.A(x). The first axiom cannot easily be expressed by a TCQ; however, for the hard- ness proof it suffices to ensure that A is satisfied by all elements xi, which can be identified via their r- connection to a. Thus, we can replace the first axiom by the CQA(a)and the (global) GCI∃r.AvA.

Theorem 7. If NRR 6= ∅, then TCQ entailment in EL is

CO-NEXPTIME-hard w.r.t. combined complexity.

The last remaining result concerns the data complexity of TCQ entailment if rigid concept names are allowed. We show NP-hardness of satisfiability by a reduction of the 3-SAT problem [Karp, 1972], considering a propositional 3-CNF formulaψ=V

0≤i<`li,1∨li,2∨li,3. We construct a TCQφ and a TKBKψ=hT,(Aψt)0≤t<4`isuch thatψis satisfiable iffφis satisfiable w.r.t.Kψ. We use four ABoxes to repre- sent each clause: one to identify the start of a new clause (via C(c)), and the following three to encode the literals of this clause via the individual namesal(see also Figure 1):

Aψ4i:={C(c)}

Aψ4i+j:={r(ali,j, a¬li,j), s(ali,j, c)}

Then, we enforce through φ:=2

C(c)→ #T(c)∨# #T(c)∨# # #T(c)

∧ ¬∃x, y.r(x, y)∧A(x)∧A(y)

that one of the clause’s literals is satisfied (indicated byT(c)).

Using the rigid conceptA, we express that a literalaland its complementa¬l cannot both be true at the same time. Fi- nally, we use the TBoxT := {∃s.T v A} to connect the

(6)

satisfaction of the literal of a clause (T(c)) with the truth of the corresponding literal (A(al)).

Note that bothφandT are of constant size, and the size of (Aψt)0≤t<4`is linear in the size ofψ.

Theorem 8. If NRC 6= ∅, then TCQ entailment in EL is

CO-NP-hard w.r.t. data complexity.

4 Temporal Subsumption in EL

We now consider a related temporal formalism based onEL, where the atoms of the temporal formulae are not CQs, but axioms [Baader et al., 2012]. More formally, EL-LTL- formulaeare defined exactly as LTL-formulae, except that in- stead of propositional variables they contain assertions and GCIs. As in Section 3, the semantics are given by infinite se- quences of interpretations. Validityof anEL-LTL-formulaφ in I = (Ii)i≥0 at time point i ≥ 0 (written I, i |= φ) is defined as in Section 2, with the exception of axiomsα, where we defineI, i |= αiffIi satisfies α. As in [Baader et al., 2012], we investigate the satisfiability of EL-LTL- formulae, i.e., deciding whether there is a sequence Isuch thatI,0|=φ. A corresponding entailment problem would be the question whetherI,0|=ψalways implies thatI,0|=φ, but this can easily be reduced to the unsatisfiability ofψ∧¬φ.

ALC-LTL-formulae [Baaderet al., 2012] can be reformu- lated as TCQs overALC-TKBs [Baaderet al., 2015]. How- ever, this is not the case forEL: GCIs of the form > v A cannot directly be simulated by TCQs; and conversely, cyclic CQs like∃x, y.r(x, y)∧r(y, x)cannot be expressed byEL- LTL-formulae. Hence, these two satisfiability problems are not directly comparable. Nevertheless, satisfiability ofEL- LTL-formulae turns out to be always harder than that of TCQs (see Table 1). It does not make sense to consider data com- plexity here because the assertions are part of the formula.

The proof techniques employed forEL-LTL-formulae are similar to those we have presented in Section 3. For instance, we can show NEXPTIME-hardness using a similar construc- tion as in the proof of Theorem 7, which is even closer to that of [Baaderet al., 2012] and does not use rigid role names.

Theorem 9. If NRC 6= ∅, then satisfiability in EL-LTL is NEXPTIME-hard.

For the upper bounds, we use the ideas from Theorem 5.

The r-satisfiability condition is simpler since we do not have to consider ABoxes, and theχiare now conjunctions ofEL- literals, which are axioms or negated axioms. As in Lemma 1, we first determine the complexity of satisfiability of such con- junctions. The main idea is to instantiate negated GCIs and to simulate negated assertions using nominals and the bottom constructor to construct anEL++-KB that has a model iff the original conjunction has a model. The former problem can be decided in polynomial time [Baaderet al., 2005].

Lemma 10. Satisfiability of conjunctions ofEL-literals can be decided inP.

This helps us to prove the following upper bounds.

Theorem 11. Satisfiability inEL-LTL is

• inNEXPTIMEeven ifNRR6=∅,

• inPSPACEifNRC=NRR=∅.

Proof Sketch. The first result is obtained exactly as in the proof of Theorem 5, using the renaming technique from [Baaderet al., 2012] and Lemma 10.

For the second upper bound, observe once more that the satisfiability tests of Definition 2 are independent in the ab- sence of rigid concept and role names. Thus, we can again use the PSPACE-Turing machine from [Sistla and Clarke, 1985], where, in each step, we additionally execute a P-test accord- ing to Lemma 10.

Given the rather negative results for EL-LTL in the pres- ence of rigid symbols, we now considerEL-LTL withglobal GCIs, as introduced in [Baaderet al., 2012]. In this case,EL- LTL-formulae are restricted to the form 2V

T

∧ψ, where T is a TBox andψis anEL-LTL-formula using only asser- tions. This is also a special case of a Boolean TCQψover the TBoxT, where the CQs inψdo not contain any variables.

By an adaptation of the approach used in the proof of The- orem 6, we can extend the complexity of PSPACE even to the case where rigid roles are allowed. It suffices to guess an ABox type, which must now contain also (negated) role asser- tions for all rigid role names, together with a set of assertions of the form∃r.A(a)for a rigid role namer. Intuitively, they specify the kinds ofr-successorsamust have at every time point. Again, the existence of such an ABox type and as- sertions characterizes the r-satisfiability ofS, and we obtain the following result by an adaptation of the PSPACE-Turing machine from [Sistla and Clarke, 1985].

Theorem 12. Even ifNRR 6=∅, then satisfiability inEL-LTL with global GCIs is inPSPACE.

5 Conclusions

We have characterized the computational complexity of two recently proposed temporal query languages over ontologies inEL. The data complexity of TCQ entailment implies that it may be possible to apply the approach of [Lutzet al., 2009] if no rigid names are allowed. But this is not a very interesting case since one cannot formulate temporal dependencies.

On the positive side, we show that the combined com- plexity of PSPACE inherited from LTL does not increase if rigid role names are disallowed, and also in the case that the query contains no variables and rigid role names are allowed.

Furthermore, if we make the reasonable assumption that all relevant information about the rigid names (e.g., which ap- plications belong to the conceptVideoApplication) is avail- able before the start of our context-aware system, then we do not need to guess the ABox typeAR. It remains to be seen whether one can efficiently combine existing algorithms for LTL [Gastin and Oddoux, 2001] andEL[Lutzet al., 2009].

Regarding the conjecture about EL-LTL from [Baader et al., 2012], we have verified thatEL-LTL has the same com- plexity asALC-LTL if only rigid concept names are allowed.

However, if rigid role names are considered, then the com- plexity decreases from 2-EXPTIMEto NEXPTIME.

In future work, we want to investigate what happens if we replaceELby DL-Lite. While satisfiability in DL-Lite- LTL is PSPACE-complete in all cases, the complexity of TCQ entailment overDL-Lite-TKBs remains open. Our hope is

(7)

that TCQs can be rewritten into a first-order query over the database resulting from viewing the ABox sequence under the closed world assumption [Calvaneseet al., 2006]. If the size of the rewriting is not too large, this may yield efficient algorithms for answering temporal queries. For a practical application, an implementation should also be based on suit- able windows of the data rather than the whole history. We are also currently evaluating the utility of temporal query lan- guages for situation recognition in operating systems.

Acknowledgments

This work was partially supported by the DFG in CRC 912.

We also want to thank Franz Baader, Marcel Lippmann, and Carsten Lutz for fruitful discussions on the topic of this paper.

References

[Abiteboulet al., 1995] Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995.

[Artaleet al., 2007] Alessandro Artale, Roman Kontchakov, Carsten Lutz, Frank Wolter, and Michael Zakharyaschev. Tem- poralising tractable description logics. InProc. of the 14th Int.

Symp. on Temporal Representation and Reasoning (TIME’07), pages 11–22. IEEE Press, 2007.

[Artaleet al., 2014] Alessandro Artale, Roman Kontchakov, Vladislav Ryzhikov, and Michael Zakharyaschev. A cookbook for temporal conceptual data modelling with description logics.

ACM Transactions on Computational Logic, 15(3):25, 2014.

[Baaderet al., 2003] Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter F. Patel-Schneider, edi- tors.The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, 2003.

[Baaderet al., 2005] Franz Baader, Sebastian Brandt, and Carsten Lutz. Pushing theELenvelope. InProc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI’05), pages 364–369. Pro- fessional Book Center, 2005.

[Baaderet al., 2012] Franz Baader, Silvio Ghilardi, and Carsten Lutz. LTL over description logic axioms. ACM Transactions on Computational Logic, 13(3):21:1–21:32, 2012.

[Baaderet al., 2013] Franz Baader, Stefan Borgwardt, and Marcel Lippmann. Temporalizing ontology-based data access. InProc.

of the 24th Int. Conf. on Automated Deduction (CADE’13), pages 330–344. Springer-Verlag, 2013.

[Baaderet al., 2015] Franz Baader, Stefan Borgwardt, and Marcel Lippmann. Temporal query entailment in the description logic SHQ.Journal of Web Semantics, 2015. In press.

[Borgwardt and Thost, 2015a] Stefan Borgwardt and Veronika Thost. LTL over EL axioms. LTCS-Report 15-07, TU Dresden, Germany, 2015. See http://lat.inf.tu- dresden.de/research/reports.html.

[Borgwardt and Thost, 2015b] Stefan Borgwardt and Veronika Thost. Temporal query answering in EL. LTCS-Report 15-08, TU Dresden, Germany, 2015. See http://lat.inf.tu- dresden.de/research/reports.html.

[Borgwardtet al., 2015] Stefan Borgwardt, Marcel Lippmann, and Veronika Thost. Temporalizing rewritable query languages over knowledge bases.Journal of Web Semantics, 2015. In press.

[Börgeret al., 1997] Egon Börger, Erich Grädel, and Yuri Gure- vich. The Classical Decision Problem. Perspectives in Mathe- matical Logic. Springer-Verlag, 1997.

[Calvaneseet al., 2006] Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, and Riccardo Rosati.

Data complexity of query answering in description logics. In Proc. of the 10th Int. Conf. on Principles of Knowledge Repre- sentation and Reasoning (KR’06), pages 260–270. AAAI Press, 2006.

[Chandra and Merlin, 1977] Ashok K. Chandra and Philip M. Mer- lin. Optimal implementation of conjunctive queries in relational data bases. InProc. of the 9th Annual ACM Symp. on Theory of Computing (STOC’77), pages 77–90. ACM, 1977.

[Deckeret al., 1998] Stefan Decker, Michael Erdmann, Dieter Fensel, and Rudi Studer. Ontobroker: Ontology based access to distributed and semi-structured information. InDatabase Se- mantics: Semantic Issues in Multimedia Systems, pages 351–369.

Kluwer Academic Publisher, 1998.

[Gastin and Oddoux, 2001] Paul Gastin and Denis Oddoux. Fast LTL to Büchi automata translation. In Proc. of the 13th Int.

Conf. on Computer Aided Verification (CAV’01), pages 53–65.

Springer-Verlag, 2001.

[Gutiérrez-Basultoet al., 2014] Víctor Gutiérrez-Basulto, Jean Christoph Jung, and Thomas Schneider. Lightweight description logics and branching time: A troublesome marriage.

In Proc. of the 14th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR’14). AAAI Press, 2014.

[Karp, 1972] Richard Karp. Reducibility among combinatorial problems. InProc. of a Symp. on the Complexity of Computer Computations, pages 85–103. Plenum Press, 1972.

[Laroussinieet al., 2002] François Laroussinie, Nicolas Markey, and Philippe Schnoebelen. Temporal logic with forgettable past.

InProc. of the 17th Annual IEEE Symp. on Logic in Computer Science (LICS’02), pages 383–392. IEEE Press, 2002.

[Lewis, 1978] Harry R. Lewis. Complexity of solvable cases of the decision problem for the predicate calculus. InProc. of the 19th Annual Symp. on Foundations of Computer Science (SFCS’78), pages 35–47. IEEE Press, 1978.

[Lichtensteinet al., 1985] Orna Lichtenstein, Amir Pnueli, and Lenore Zuck. The glory of the past. InProc. of the Workshop on Logics of Programs, pages 196–218. Springer-Verlag, 1985.

[Lutzet al., 2008] Carsten Lutz, Frank Wolter, and Michael Za- kharyaschev. Temporal description logics: A survey. InProc.

of the 15th Int. Symp. on Temporal Representation and Reason- ing (TIME’08), pages 3–14. IEEE Press, 2008.

[Lutzet al., 2009] Carsten Lutz, David Toman, and Frank Wolter.

Conjunctive query answering in the description logicELusing a relational database system. InProc. of the 21st Int. Joint Conf.

on Artificial Intelligence (IJCAI’09), pages 2070–2075. AAAI Press, 2009.

[Pnueli, 1977] Amir Pnueli. The temporal logic of programs. In Proc. of the 18th Annual Symp. on Foundations of Computer Sci- ence (SFCS’77), pages 46–57. IEEE Press, 1977.

[Poggiet al., 2008] Antonella Poggi, Domenico Lembo, Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Ric- cardo Rosati. Linking data to ontologies. Journal of Data Se- mantics, 10:133–173, 2008.

[Rosati, 2007] Riccardo Rosati. On conjunctive query answering in EL. InProc. of the 2007 Int. Workshop on Description Logics (DL’07), pages 451–458, 2007.

[Sistla and Clarke, 1985] A. Prasad Sistla and Edmund M. Clarke.

The complexity of propositional linear temporal logics. Journal of the ACM, 32(3):733–749, 1985.

Referenzen

ÄHNLICHE DOKUMENTE

Unfortunately, our ALogTime lower bound for the data complexity of TCQ entailment in DL-Lite core shows that it is not possible to find a (pure) first-order rewriting of TCQs, in

Conjunctive query answering (CQA) is the task of finding all answers of a CQ, and query entailment is the problem of deciding whether an ontology entails a given Boolean CQ by

Conjunctive query answering (CQA) is the task of finding all answers of a CQ, and query entailment is the problem of deciding whether an ontology entails a given Boolean CQ... It

Since the emptiness problem for Büchi automata can be solved in polynomial time [VW94], this yields an alternative proof for the fact (originally shown.. in [BGL12] for the case

In this section, we define the syntax and semantics of ELH ⊥ρ , which extends ELH by the bottom concept ⊥ and by concept constructors for the lower approx- imation and the

The DL-Lite family consists of various DLs that are tailored towards conceptual modeling and allow to realize query answering using classical database techniques.. We only

In addition, it is known that, for a given natural number n 0 and finite sets of concept names N con and role names N role , there are, up to equivalence, only finitely many

Since the emptiness problem for generalized B¨ uchi automata can be solved in polynomial time, this yields an alternative proof for the fact (originally shown in [3])