pinning for the OWL-Lite and OWL-DL variants of the Web Ontology. Language (OWL) [20]. ...... inclusion of simple concepts (e.g., Woman â Person). â concept ...
Reasoning in Description Logics by a Reduction to Disjunctive Datalog Ullrich Hustadt Department of Computer Science, University of Liverpool, Liverpool, UK
Boris Motik Department of Computer Science, University of Manchester, Manchester, UK
Ulrike Sattler Department of Computer Science, University of Manchester, Manchester, UK Abstract. As applications of description logics proliferate, efficient reasoning with knowledge bases containing many assertions becomes ever more important. For such cases, we developed a novel reasoning algorithm that reduces a SHIQ knowledge base to a disjunctive datalog program while preserving the set of ground consequences. Queries can then be answered in the resulting program while reusing existing and practically proven optimization techniques of deductive databases, such as join-order optimizations or magic sets. Moreover, we use our algorithm to derive precise data complexity bounds: we show that SHIQ is data complete for NP, and we identify an expressive fragment of SHIQ with polynomial data complexity. Keywords: Description Logics, Disjunctive Datalog, Data Complexity
1. Introduction In recent years, description logics (DLs) have found their application in various fields of computer science, such as data integration, knowledge representation, and ontology modeling for the Semantic Web [10][3, Part III]. A DL knowledge base typically consists of two parts. The terminological part of a knowledge base, called TBox, can be thought of as the “schema” since it contains concept definitions and background knowledge. A central reasoning task for TBoxes is the computation of the subsumption hierarchy, which is based on deciding entailment of implications between formulae w.r.t. a background theory. The assertional part of a knowledge base, called ABox, can be thought of as the “data” since it contains ground facts. The main reasoning task for ABoxes is query answering, which, in its simplest form, amounts to retrieving all instances of a certain concept. SHIQ [21] is a very expressive DL that provides the logical underpinning for the OWL-Lite and OWL-DL variants of the Web Ontology Language (OWL) [20]. Several practical reasoners for logics around SHIQ have been built [34, 17, 39] and applied to practical problems. Experience shows that these systems perform well when computing c 2007 Kluwer Academic Publishers. Printed in the Netherlands.
paper.tex; 2/07/2007; 21:08; p.1
2 the subsumption hierarchy: they use practical, optimized tableau-based algorithms [21], which perform much better on practical problems than their worst-case computational complexity suggests. New applications, such as metadata management in the Semantic Web, require also efficient query answering over large ABoxes. So far, query answering was implemented by reducing the problem to ABox consistency checking, which can then be solved using tableau algorithms [18]. In this paper, we propose a completely different and novel approach to this complex reasoning problem. It is based on reusing ideas from deductive databases—an extension of the relational database model with deductive features, usually in the form of (recursive) rules [1]. Reasoning algorithms and optimization techniques for deductive databases were specifically designed to handle large data quantities. In order to apply them to DL reasoning, we developed a novel algorithm that reduces a SHIQ knowledge base to a disjunctive datalog program. Since the reduction preserves the set of entailed ground facts, queries can be answered in the resulting program while reusing all existing optimization techniques. Our reduction to datalog does not mean that we suggest employing nonmonotonic negation or minimal model reasoning. Rather, we consider disjunctive datalog useful because it allows the application of the join order optimization, which, based on the database statistics, chooses the data access path promising the least cost [1]. Moreover, our algorithm allows us to apply the magic sets transformation [7]. Roughly speaking, this transformation modifies the datalog program such that bottom-up evaluation of the transformed program simulates top-down parameter passing in the original program. In this way, only the facts directly relevant to the query answer are considered. This technique was crucial in providing efficient reasoning in deductive databases containing large data quantities. The magic sets transformation for disjunctive programs has been presented in [12], along with empirical evidence of its usefulness. We are unaware of an approach that would allow us to apply the magic sets transformation directly in the resolution setting, without a prior transformation into disjunctive datalog. As an added benefit, our algorithm separates TBox from ABox reasoning. Thus, the TBox inferences are not being repeated for different individuals during query answering. Our algorithm runs in worst-case exponential time. Furthermore, query answering in the resulting program can be performed in time exponential in the size of the input knowledge base, so reasoning in SHIQ using our algorithms has optimal worst-case complexity, assuming unary coding of numbers. The latter assumption is quite common
paper.tex; 2/07/2007; 21:08; p.2
3 in practical implementations of description logics, even though SHIQ is ExpTime-complete regardless of the coding of numbers [38]. As a side-effect of our reduction, we obtain novel data complexity results. Assuming that the ABox contains only possibly negated atomic concepts, we show that checking KB satisfiability is NP-complete and query answering is co-NP-complete in the size of the ABox. This is still intractable, so we identify Horn-SHIQ, a fragment of SHIQ analogous to the Horn fragment of first-order logic. Namely, Horn-SHIQ provides existential and universal quantifiers, but does not provide means to express disjunctive information. We show that the basic reasoning problems for Horn-SHIQ are P-complete in the size of the ABox. The algorithms from this paper are implemented in KAON21 —a new DL reasoner. Our performance comparison of KAON2 with other state-of-the-art reasoners shows that our algorithm indeed leads to performance improvements in query answering of one or more orders of magnitude on large knowledge bases [29]. This paper contains an extended version of the results that have been published in [22, 23, 24, 28]. 2. Preliminaries 2.1. Description Logic SHIQ The syntax of SHIQ is given by the following definition [21]. DEFINITION 1. For a set of role names NR , the set of roles is the set NR ∪ {R− | R ∈ NR }. For R ∈ NR , let Inv(R) = R− and Inv(R− ) = R. An RBox KB R is a finite set of transitivity axioms Trans(R) and role inclusion axioms R ⊑ S for R and S roles. Let ⊑∗ be the reflexivetransitive closure of {R ⊑ S, Inv(R) ⊑ Inv(S) | R ⊑ S ∈ KB R }. A role R is transitive in KB R if a role S exists such that S ⊑∗ R, R ⊑∗ S, and either Trans(S) ∈ R or Trans(Inv(S)) ∈ R; R is simple if no transitive role S exists with S ⊑∗ R; and R is complex if it is not simple. Let NC be a set of atomic concepts. The set of concepts over NC and NR is the smallest set such that ⊤ ( top concept) and ⊥ ( bottom concept) are concepts, each atomic concept A ∈ NC is a concept, and, if C and D are concepts, R is a role, S is a simple role, and n is a nonnegative integer, then ¬C ( concept complement), C ⊓ D ( concept intersection), C ⊔ D ( concept union), ∃R.C ( existential restriction), ∀R.C ( universal restriction), ≤ n S.C ( at-most qualified number restriction), and ≥ n S.C ( at-least qualified number restriction) are concepts. Literal concepts are possibly negated atomic concepts. 1
http://kaon2.semanticweb.org/
paper.tex; 2/07/2007; 21:08; p.3
4 A TBox KB T over NC and KB R is a finite set of concept inclusion axioms C ⊑ D, for concepts C and D. Let NI be a set of individuals. An ABox KB A is a set of concept and role assertions C(a), R(a, b), ¬S(a, b), and (in)equality axioms a ≈ b and a 6≈ b, for C a concept, R a role, S a simple role, and a and b individuals. An ABox is extensionally reduced if its assertions contain only literal concepts. A SHIQ knowledge base KB is a triple (KB R , KB T , KB A ). With |KB| we denote the size of KB with numbers coded in unary—that is, |≤ n R.C| = |≥ n R.C| = |C| + n + 1. Each KB can be made extensionally reduced as follows: for each axiom C(a) where C is not a literal concept, introduce a new atomic concept AC , add the axiom AC ⊑ C to the TBox, and replace C(a) with AC (a). This transformation is obviously polynomial in |KB|. For the semantics, we translate DL knowledge bases into a firstorder formula. Such a semantics is known to be equivalent to the more commonly used direct model-theoretic semantics [8]. The translation of number restrictions uses counting quantifiers ∃≥n and ∃≤n . It is well known that these can be represented in first-order logic by means of standard quantifiers and equality as follows, for y a vector of variables: ∃≥n x ∃≤n x
: ϕ(x, y)= ∃x1 , . . . , xn :
"
V
1≤i≤n
: ϕ(x, y)= ∀x1 , . . . , xn+1 :
"
ϕ(xi , y) ∧
V
1≤i≤n+1
V
1≤i c > P > QR,f > tt, for each function symbol f , constant symbol c, predicate symbol P , and predicate QR,f ; and ( ii) the selection function selects every negative binary literal.
The parameters used in Definition 5 are compatible with basic superposition and decomposition, so, by [6, 31] and [23], BS + DL is a sound and complete calculus. Also, for a finite signature, it is clear that BS + DL can introduce at most a quadratic number of predicates QR,f .
paper.tex; 2/07/2007; 21:08; p.13
14 + Saturating Ξ(KB) by BS + DL . Since BS DL is sound and complete, we can use it to check satisfiability of Ξ(KB). In order to obtain a decision procedure, we must only show that each saturation of Ξ(KB) terminates. We do this in a proof-theoretic way. We start by showing that any nonredundant conclusion of each inference by BS + DL on ALCHIQ-closures is an ALCHIQ-closure.
LEMMA 6 ([28, Lemma 5.3.6]). Let N be a set of ALCHIQ-closures and C · ρ a closure obtained by applying a BS + DL inference to premises from N . Then, either C · ρ is redundant in N , or it is an ALCHIQclosure. Proof. [Sketch.] Table IV shows the types of BS + DL inferences that can be applied to ALCHIQ-closures. The inferences are shown using the following notation: (first premise type) first premise (other premise type) other premise(s) inf. rule (result type) ...
Some inferences take several premises: 3+ denotes one or more premises of type 3; 4 + 3∗ denotes a premise of type 4 and zero or more premises of type 3; and 3∗ +8+ denotes zero or more premises of type 3 and one or more premises of type 8. Furthermore, HR denotes the hyperresolution inference rule, S the (positive or negative) superposition inference rule, and S+D denotes superposition followed by decomposition. The terms and literals participating in the inference are underlined. Inferences for most closure types are symmetric (for example, superposition from a closure of type 5 can be performed into a closure of type 6 and vice versa); for the sake of brevity, we present in the table only one direction. By analyzing the application of all possible inferences by BS + DL to all types of ALCHIQ-closures, we can see that all inferences derive an ALCHIQ-closure. 2 Next, we show that the number of ALCHIQ-closures is finite for a finite signature of Ξ(KB). LEMMA 7 ([28, Lemma 5.3.10]). Let N0 , N1 , . . . , Ni be a derivation by BS + DL from Ξ(KB) and C a closure from some Ni . Then, |C| is at most polynomial in |KB |, and |Ni | is at most exponential in |KB |, for unary coding of numbers in the input. Proof. [Sketch.] Since no inference produces a closure of type 7, the result of any inference is a closure containing at most one variable. Let f be the number of function symbols, i the number of individuals, and
paper.tex; 2/07/2007; 21:08; p.14
15 Table IV. Inferences with ALCHIQ-Closures (1 or 2) ¬R(x, y) ∨ Inv(R)(y, x) or ¬R(x, y) ∨ S(x, y) (3) P(x) ∨ R(x, hf (x)i) (4) P(x) ∨ R([f (x)] , x) (8) C · ρ ∨ R(a, b)
HR HR HR
(3 or 4) (4 or 3) (8)
(5) P1 (x) ∨ ¬A(x) (5) C · ρ ∨ A(x) or C · ρ ∨ A(hf (x)i) (6) C · ρ ∨ A(hf ([g(x)])i) (8) C · ρ ∨ A(hdi) or C · ρ ∨ A(hf ([d])i)
HR HR HR
(5) (6) (8)
HR HR
(6) (8)
W
(5) P1 (x) ∨ P2 (f (x)) ∨ hfi (x)i ⊲⊳ hfj (x)i ∨ ¬A(f (x)) (6) C · ρ ∨ A(hf ([g(x)])i) (8) C · ρ ∨ A(hf ([a])i)
W
(5) P1 (x) ∨ P2 (f (x)) ∨ hfi (x)i ⊲⊳ hfj (x)i ∨ [f (x)] ≈ [h(x)] S+D (3) P(x) ∨ R(x, f (x)) (5) C · ρ ∨ A(f (x)) or C · ρ ∨ f (x) ⊲⊳ hh′ (x)i S ′ (6) C · ρ ∨ f ([g(x)]) ⊲⊳ ht i S S (8) C · ρ ∨ A(f ([a])) or C · ρ ∨ f ([a]) ⊲⊳ ht′ i (6) P1 (x) ∨ P2 ([g(x)]) ∨ P3 (hf ([g(x)])i) ∨ (6) C · ρ ∨ A(hf ([g(x)])i)
W
(3+5) (5) (6) (8)
hti i ⊲⊳ htj i ∨ ¬A(hf ([g(x)])i) HR (6)
W
(6) P1 (x) ∨ P2 ([g(x)]) ∨ P3 (hf ([g(x)])i) ∨ hti i ⊲⊳ htj i ∨ [f (g(x))] ≈ t (3) P(x) ∨ R(x, f (x)) S+D (3+6 or 4+6) (5) C · ρ ∨ A(f (x)) or C · ρ ∨ f (x) ⊲⊳ hh′ (x)i S (6) (6) C · ρ ∨ A(f ([g(x)])) or C · ρ ∨ f ([g(x)]) ⊲⊳ ht′ i S (6)
Wn
Wn
Wn
(7) P1 (x) ∨ i=1 ¬R(x, yi ) ∨ i=1 P2 (yi ) ∨ i=1 n j=i+1 yi ≈ yj + fi (3 ) P (x) ∨ R(x, hfi (x)i) HR (4 + 3∗ ) Pg (x) ∨ R([g(x)] , x) and Pfi (x) ∨ R(x, hfi (x)i) HR (3∗ + 8+ ) Pfi (x) ∨ R(x, hfi (x)i) and C · ρ ∨ R(a, b) HR
W
(8) R(hai , hbi) ∨ P(hti) ∨ hti i ⊲⊳ htj i ∨ [f (a)] ≈ t (3) P(x) ∨ R(x, f (x)) (5) C · ρ ∨ A(f (x)) or C · ρ ∨ f (x) ⊲⊳ hh′ (x)i (8) C · ρ ∨ A(f ([a])) or C · ρ ∨ f ([a]) ⊲⊳ ht′ i
S+D S S
(5) (6) (8)
(3+8) (8) (8)
Remaining inferences involve closures of type 8 and produce a closure of type 8. Equality factoring is applicable only to literals of the form f (t) ≈ g(t) and produces a closure of the same type. Reflexivity resolution can only eliminate literals of the form f (t) 6≈ f (t) and also produces a closure of the same type.
paper.tex; 2/07/2007; 21:08; p.15
16 p the number of (unary and binary) predicates. Since the numbers are coded in unary, f , i, and p are polynomial in |KB| (remember that the number of predicates QR,f is at most quadratic in |KB|). Each literal contains at most four function symbols, either one variable or at most two individuals, at most two marked positions, and is either positive or negative. Hence, the number of different literals is at most 2 · 4p(i + 1)2 (f + 1)4 , which is polynomial in |KB |. Each nonredundant closure contains a subset of these literals, so there are exponentially many different closures. 2 One can show that each saturation derives at most exponentially many redundant closures. Together with lemmas 6 and 7, we have that, in the worst case, we can derive all possible ALCHIQ-closures in a saturation, after which the saturation terminates: THEOREM 8 ([28, Theorems 5.3.11 and 5.4.8]). For an ALCHIQ knowledge base KB , saturation of Ξ(KB ) by BS + DL with eager elimination of redundancy decides satisfiability of KB, and runs in time exponential in |KB|, for unary coding of numbers in input. The following corollary follows from the proof of Lemma 6. Namely, only maximal literals from a closure can participate in an inference, so a term of the form f (g(x)) from a closure of type 6 does not unify with a term from a closure of type 8 (which always has the form a or f (a)); a similar argument holds for closures of type 4. COROLLARY 9 ([28, Corollary 5.3.8]). If a closure of type 8 participates in a BS + DL inference with other ALCHIQ-closures, then the unifier σ contains only ground mappings of the form x 7→ a and x 7→ f (b), and the conclusion is a closure of type 8. Furthermore, a closure of type 8 cannot participate in an inference with a closure of type 4 or 6. 3.3. Eliminating Function Symbols We now show how to eliminate function symbols from Ξ(KB). DEFINITION 10. For KB an extensionally reduced ALCHIQ knowledge base, let gen(KB ) contain a closure ¬QR,f (x) ∨ R(x, [f (x)]) for each role R and function symbol f occurring in Ξ(KB).2 Furthermore, let ΓT Rg = Ξ(KB T ∪ KB R ) ∪ gen(KB). With SatR (ΓT Rg ) we denote 2
As discussed in Section 3.2, QR,f is a predicate introduced by decomposition and is unique for all pairs of R and f .
paper.tex; 2/07/2007; 21:08; p.16
17 the relevant set of saturated closures—that is, closures of types 1, 2, 3, 5, and 7 obtained by saturating ΓT Rg by BS + DL with eager application of redundancy elimination rules. Finally, let Γ = SatR (ΓT Rg ) ∪ Ξ(KB A ). We now show that eliminating closures of types 4 and 6 does not affect satisfiability. LEMMA 11. KB is unsatisfiable if and only if Γ(KB) is unsatisfiable, for KB an extensionally reduced ALCHIQ knowledge base. Proof. Let Γ′ = Ξ(KB) ∪ gen(KB). Each closure C ∈ gen(KB ) contains a new predicate QR,f unique for C, so any interpretation of Ξ(KB) can be extended to an interpretation of Γ′ . Hence, KB is equisatisfiable with Γ′ by Lemma 4. Since BS + DL is sound and complete, Γ′ is unsatisfiable if and only if there is a derivation by BS + DL of the empty closure from Γ′ . The order in which inferences are performed in a derivation N0 , N1 , . . . from Γ′ can be chosen don’t-care nondeterministically, so we perform all nonredundant inferences among closures from ΓT Rg first. Let Nm = Sat(ΓT Rg ) ∪ Ξ(KB A ) be the intermediate set of closures obtained in such a derivation, where Sat(ΓT Rg ) is the saturated set of closures. Each closure set Ni with i > m is obtained from Ni−1 by an inference involving at least one closure not in Nm . All nonredundant inferences between closures of type other than 8 have been performed in Nm , and, by Corollary 9, each inference involving a closure of type 8 produces a closure of type 8. Furthermore, if a conclusion of an inference is decomposed into closures of types 3 and 8, the closure of type 3 is contained in gen(KB ), so only the closure of type 8 is added to Ni . Hence, Ni \ Nm contains only closures of type 8. Furthermore, by Corollary 9, a closure of type 4 and 6 can never participate in an inference with a closure of type 8, and it cannot be used to derive a closure in Ni \ Nm for i > m. Hence, Nm can safely be replaced with Γ in the derivation: all inferences by BS + DL using closures from Nm can be performed using closures from Γ as well. 2 If KB does not use number restrictions, further optimizations are possible. Then, closures of types 3 or 5 containing a function symbol cannot participate in an inference with a closure of type 8. Hence, closures of types 3 and 5 can also be eliminated from the saturated set; that is, they need not be included in SatR (ΓT Rg ). We now show how to eliminate function symbols from closures in Γ:
paper.tex; 2/07/2007; 21:08; p.17
18 DEFINITION 12. The operator λ maps terms to terms as follows: ( i) λ(a) = a; ( ii) λ(f (a)) = af , for af a new unique constant;3 ( iii) λ(x) = x; ( iv) λ(f (x)) = xf , for xf a new unique variable. We extend λ to ALCHIQ-closures such that, for a closure C, λ(C) is the function-free closure computed as follows: 1. Each term t in the closure is replaced with λ(t). 2. For each variable xf introduced in step 1, the literal ¬Sf (x, xf ) is added to the closure, where Sf is a new predicate unique for f . 3. If, after steps 1 and 2, a variable x occurs in a positive, but not in a negative literal, the literal ¬HU (x) is added to the closure. For a substitution σ, let λ(σ) denote the substitution obtained from σ by replacing each assignment x 7→ t with x 7→ λ(t). With λ− we denote the inverse of λ (that is, λ− (λ(α)) = α for any term, closure, or any substitution α).4 For an extensionally reduced ALCHIQ knowledge base KB, the function-free version of Ξ(KB ), written FF(KB), is defined as follows: FFλ (KB ) = {λ(C) | C ∈ SatR (ΓT Rg )} FFSucc (KB ) = {Sf (a, af ) | for each a and f from Ξ(KB )} FFHU (KB ) = {HU (a), HU (af ) | for each a and f from Ξ(KB )} FF(KB ) = FFλ (KB ) ∪ FFSucc (KB ) ∪ FFHU (KB ) ∪ Ξ(KB A )
LEMMA 13. Nonground negative equality literals occur in FF(KB ) only in disjunctions of the form xf 6≈ xg ∨ ¬Sf (x, xf ) ∨ ¬Sg (x, xg ). Proof. The closure λ(C) can contain nonground equalities only for C of type 5. Negative equality literals occur in such closures only as f (x) 6≈ g(x), so λ(C) contains xf 6≈ xg ∨ ¬Sf (x, xf ) ∨ ¬Sg (x, xg ). 2 We now show that FF(KB ) can simulate all inferences by BS + DL on Γ (c.f. Table IV) and vice versa, which gives us the following key lemma: LEMMA 14. KB is unsatisfiable if and only if FF(KB) is unsatisfiable. Proof. Due to Lemma 11, we just need to show that the closure sets Γ = SatR(ΓT Rg ) ∪ Ξ(KB A ) and FF(KB ) are equisatisfiable. (⇐) Let C be the calculus of hyperresolution with superposition and eager splitting, where all negative nonequality literals are selected. Assume that FF(KB ) is unsatisfiable. Then, a derivation B by C exists, such that the root node is FF(KB ) and the empty closure is derived on 3
Unique means that, for each f and a, the constant af is uniquely defined. Note that λ is injective, but not surjective, so to make the definition of λ− correct, we assume that λ− is applicable only to the range of λ. 4
paper.tex; 2/07/2007; 21:08; p.18
19 all branches. By induction on the depth of B, we construct a derivation B ′ from Γ by sound inference steps and splitting such that each node Nn in B corresponds one-to-one to a node Nn′ in B ′ satisfying the following property (*): if C is a closure in Nn not of the form Sf (u, v) or HU (u), then Nn′ contains the counterpart closure λ− (C). To simplify the presentation, we allow the children of a node in B ′ to be obtained by applying zero or more sound inferences to the parent node. The induction base n = 0 is obvious. Now assume that, for some node Nn in B, we have a node Nn′ in B ′ satisfying (*), and consider all possible inferences applicable to closures in Nn . Superposition can be performed only from a ground closure. Namely, a nonground closure is safe, so it contains negative literals, which are selected and do not contain constants. Furthermore, because of splitting, all ground closures are unit closures, so superposition can be performed only from a closure of the form s ≈ t. Consider now superposition into a ground unit closure L. If L = HU (s), superposition is redundant: HU is instantiated for each constant occurring in FF(KB), so the conclusion is already contained in Nn . If L = Sf (s, u) or L = Sf (u, s), the proposition trivially holds. Otherwise, by the induction hypothesis, counterpart closures λ− (s ≈ t) and λ− (L) are contained in Nn′ , so superposition can be performed on them to derive the required counterpart closure. Reflexivity resolution can be applied to a ground closure u 6≈ u. By the induction hypothesis, the set Nn′ contains λ− (u 6≈ u), so reflexivity resolution can be applied to it to derive the required counterpart closure. Reflexivity resolution is not applicable to nonground closures: by Lemma 13, negative literals xf 6≈ xg always occur in disjunctions xf 6≈ xg ∨ ¬Sf (x, xf ) ∨ ¬Sg (x, xg ), in which ¬Sf (x, xf ) and ¬Sg (x, xg ) are selected. Equality factoring is not applicable to a closure from Nn since all positive closures from Nn are ground unit closures. Consider a hyperresolution with a main premise C, side premises E1 , . . . , Ek , and a unifier σ, resulting in a hyperresolvent H. The side premises Ei are not allowed to contain selected literals, so they are ground unit closures. Furthermore, the closure C is safe, and, by Lemma 13, for each literal of the form xf 6≈ xg , C contains literals ¬Sf (x, xf ) and ¬Sg (x, xg ), respectively, which are selected. Hence, all variables in C are bound, so H is a ground closure. Let σ ′ be the substitution such that xσ ′ = λ− (xσ) for each variable x not of the form xf (since the closures from Γ do not contain variables of form xf , the definition of σ ′ on them is not relevant). We then perform an instantiation step C ′ = λ− (C)σ ′ on closures from Nn′ . The closures λ− (Cσ) and C ′ can differ only at a position p of a variable xf in C: the closure Cσ
paper.tex; 2/07/2007; 21:08; p.19
20 can contain at position p a term v obtained by resolving C with a side premise of the form Sf (u, v), while C ′ contains at the position p′ corresponding to p the term f (u) such that λ− (v) 6= f (u). Let p′u denote the position of the inner u in f (u). We show that all such discrepancies can be eliminated with sound inferences in Nn′ . The literal Sf (u, v) in Nn is obtained from some Sf (a, af ) by several superposition inference steps. Let us denote with ∆1 (∆2 ) the sequence of ground unit equalities applied to the first (second) argument of Sf (a, af ). By the induction hypothesis, for each equality si ≈ ti from ∆1 and ∆2 , the set Nn′ contains the corresponding equality λ− (si ≈ ti ); we denote the sequences of corresponding equalities with ∆′1 and ∆′2 . We now perform superposition with equalities from ∆′1 into C ′ at p′u in the reverse order. After this, p′u contains the constant a, and p′ contains the term f (a). Hence, we can apply superposition with equalities from ∆′2 at p′ in the original order. After this is done, each position p′ contains the term λ− (v). Let C ′′ denote the result of removing discrepancies at all positions; then, C ′′ = λ− (Cσ). For each side premise Ei not of the form Sf (u, v) or HU (u), the set Nn′ contains λ− (Ei ) by the induction hypothesis, so we can hyperresolve λ− (Ei ) premises with C ′′ to obtain H ′ = λ− (H). Hence, the counterpart closure is derivable from Nn′ . All ground closures from Nn are unit closures, and no nonground closure in FF(KB ) contains a positive literal with Sf or HU predicates, so a ground nonunit closure C from Nn cannot contain literals of the form Sf (u, v) and HU (a). Hence, if C is of length k and it causes Nn to be split into k child nodes, then λ− (C) is of length k and it causes Nn′ to be split into k child nodes, each of them satisfying (*). Because the nodes of B and B ′ correspond one-to-one, if B derives the empty closure on all paths from FF(KB), then B ′ derives the empty closure on all paths from Γ as well. (⇒) Assume that Γ is unsatisfiable. Then, a derivation B ′ by BS + DL exists, such that Γ is the root closure set and the empty closure is derived. By induction on the length of B ′ , we construct a derivation B from FF(KB ) by sound inference steps such that each closure set Nn in B corresponds one-to-one to a closure set Nn′ in B ′ satisfying the following property (**): if C ′ is a closure in Nn′ , then Nn contains the counterpart closure C = λ(C ′ ). To simplify the presentation, we allow each Nn , n > 0, to be obtained from Nn−1 by zero or more sound inference steps. The induction base n = 0 is trivial. Now assume that, for some closure set Nn′ in B ′ , there is a closure set Nn in B satisfying (**), and consider all possible inferences deriving a closure C ′ from premises Pi′ ∈ Nn′ , 1 ≤ i ≤ k. By the induction hypothesis, Nn contains the counterpart closure Pi of each Pi′ . Let σ ′ be the unifier of the inference deriving C ′ . Since
paper.tex; 2/07/2007; 21:08; p.20
21 all nonredundant inferences among nonground closures were performed while computing SatR(ΓT Rg ), the inference deriving C ′ must involve at least one ground closure. By Corollary 9, σ ′ is ground and it contains only assignments of the form xi 7→ a or xi 7→ f (a). For σ = λ(σ ′ ), we instantiate each Pi into Pi σ. Consider now possible differences between Pi σ and λ(Pi′ σ ′ ), apart from the literals involving Sf and HU . A difference can occur if Pi′ contains at position p′ a term f (x), which is instantiated by σ ′ to a; then, Pi contains at the position p corresponding to p′ the variable xf which is not instantiated by σ. Hence, at p, the closure Pi σ contains xf and the closure λ(Pi′ σ ′ ) contains af . By definition of λ, however, the closure Pi then contains a literal ¬Sf (x, xf ), so Pi σ contains ¬Sf (a, xf ). This literal can be resolved with Sf (a, af ) to produce af at p. All such differences can be removed iteratively, and, since FF(KB ) contains HU (a) for each constant a, the remaining ground literals involving HU can be resolved away. Hence, λ(Pi′ σ ′ ) is derivable from premises in Nn . In all terms of the form f (a) occurring on B ′ , the inner term a is marked. Hence, superposition inferences are possible only on the outer position of such terms, which correspond via λ to af . Therefore, regardless of the inference type, C = λ(C ′ ) can be derived from λ(Pi′ σ ′ ) by the same inference on the corresponding literals. The result of a superposition inference in B ′ may be a closure C ′ containing a literal R([a] , [f (a)]), which is decomposed into a closure C1′ of type 8 and a closure C2′ of type 3. Since gen(KB) ⊆ Γ, we have C2′ ∈ Γ, so the conclusion C ′ should only be replaced with the conclusion C1′ . The decomposition inference rule can be applied to B as well to produce the counterpart closure C1 = λ(C1′ ). As a consequence, if the empty closure is derivable on B ′ , then it is derivable on B as well. 2 To illustrate Lemma 14, consider the following example. Let Γ be the following set of closures: (6) (7) (8) (9)
D(x) ∨ R(x, f (x)) D(x) ∨ C(f (x)) ¬R(x, y1 ) ∨ ¬R(x, y2 ) ∨ y1 ≈ y2 R(a, b)
Saturation of Γ by BS + DL produces the following closures (R(xx; yy) denotes a resolution of xx and yy, S(xx; yy) denotes a superposition of xx into yy, and we omit markers for the sake of readability): (10) (11)
D(a) ∨ f (a) ≈ b D(a) ∨ C(b)
R(6;8;9) S(10;7)
paper.tex; 2/07/2007; 21:08; p.21
22 By Definition 12, FF(KB ) contains the following closures: (12)
¬Sf (x, xf ) ∨ D(x) ∨ R(x, xf )
(13)
¬Sf (x, xf ) ∨ D(x) ∨ C(xf )
(14) (15) (16)
¬R(x, y1 ) ∨ ¬R(x, y2 ) ∨ y1 ≈ y2 R(a, b) Sf (a, af )
(17)
Sf (b, bf )
Since all inferences among nonground closures in Γ have been performed during saturation, each nonredundant inference by BS + DL on Γ must involve at least one ground closure. Our reduction is based on the observation that, for each ground closure C derivable by BS + DL on Γ, we can derive a counterpart ground closure λ(C) in FF(KB) as follows: (18)
D(a) ∨ R(a, af )
R(12;16)
(19)
D(a) ∨ C(af )
R(13;16)
(20)
D(a) ∨ af ≈ b
R(14;15;18) → counterpart of (10)
(21)
D(a) ∨ C(b)
S(20;19) → counterpart of (11)
Thus, if we can derive the empty closure by saturating Γ by BS + DL , then we can derive it by saturating FF(KB) as well. This example also demonstrates that the role of the constants af introduced by Definition 12 is merely to simulate in a derivation from FF(KB) the ground functional terms from a derivation from Γ; there is no deeper semantic relationship between them and the unnamed individuals in a model. FF(KB ) can be computed once and then used to answer any number of atomic queries. Let α be of form (¬)R(a, b) or (¬)A(a) with A an atomic concept, R a role, and a and b occuring in KB . It is then easy to see that FF(KB ∪ {¬α}) = FF(KB ) ∪ {¬α}. (Note that the constants a and b occurring in the query are assumed to be contained in KB; therefore, FF(KB ) contains the necessary facts about af and bf for each function symbol f .) Hence, Lemma 14 also implies that KB |= α if and only if FF(KB ) |= α. 3.4. Removing Irrelevant Closures The saturation of ΓT Rg introduces many closures that are entailed by other closures. For example, for KB = {A ⊑ C, C ⊑ B}, if literal ordering is such that C(x) ≻ B(x) ≻ A(x), the saturation derives ¬A(x) ∨ B(x); however, this closure is entailed by the premises and is thus not needed for query answering. Hence, we present an optimization
paper.tex; 2/07/2007; 21:08; p.22
23 by which we eliminate all such closures and thus reduce the number of rules in the disjunctive datalog program. Intuitively, eliminating such rules is beneficial since it prevents the disjunctive datalog reasoner from drawing the same consequence along different inference paths. Also, this optimization has proven itself to be very important for reducing the size of the translated programs. Our practical experiments have shown that, although the number of closures in FF(KB) can be quite large, the number of closures left after this optimization is typically just twice the number of TBox axioms [29]. DEFINITION 15. For N ⊆ FF(KB ), let C ∈ N be a closure such that λ− (C) is derived in the saturation of ΓT Rg by an inference with a unifier σ from premises Pi , 1 ≤ i ≤ k. Then, C is irrelevant w.r.t. N if the following conditions hold: ( i) λ− (C) is not derived by the decomposition rule; ( ii) for each premise Pi , λ(Pi ) ∈ N ; and ( iii) each variable occurring in any of the λ(Pi σ) also occurs in C. Relevant is the opposite of irrelevant. Let C1 , C2 , . . . , Cn be a sequence of closures from FF(KB) such that λ− (Cn ), . . . , λ− (C2 ), λ− (C1 ) corresponds to the order in which the closures are derived in saturation of ΓT Rg . Let N0 , N1 , . . . , Nn be a sequence of closure sets such that N0 = FF(KB ), Ni = Ni−1 if Ci is relevant w.r.t. Ni−1 , and Ni = Ni−1 \ {Ci } if Ci is irrelevant w.r.t. Ni−1 , for 1 ≤ i ≤ n. Then, FFR (KB) = Nn is called the relevant subset of FF(KB ). LEMMA 16. FFR (KB) is unsatisfiable if and only if FF(KB) is unsatisfiable. Proof. Let N be a subset of FF(KB ), C ∈ N a closure that is irrelevant w.r.t. N , and ξ an inference in the saturation of ΓT Rg deriving λ− (C) from premises Pi with a unifier σ. Finally, assume λ(Pi ) ∈ N , 1 ≤ i ≤ k. We now show the following property (*): N is satisfiable if and only if N \ {C} is satisfiable. The (⇒) direction is trivial, since N \ {C} ⊂ N . For the (⇐) direction, let C ′ be the closure obtained by an inference from λ(Pi ) corresponding to ξ. Obviously, each literal not of the form ¬Sf (x, xf ) from C is contained in C ′ as well. Consider now each literal ¬Sf (x, xf ) in C ′ , stemming from a premise λ(Pi σ) containing xf . Since C is irrelevant, it contains xf , so, by definition of λ, C contains ¬Sf (x, xf ) as well. Thus, C = C ′ , so λ(P1 σ), . . . , λ(Pk σ) |= C, and (*) holds. In the sequence of sets N0 , N1 , . . . , Nn with N0 = FF(KB ) and FFR (KB) = Nn from Definition 15, the preconditions of property (*) are satisfied for each Ni = Ni−1 \ {Ci }, i ≥ 1 so, by (*), Ni is satisfiable if and only if Ni−1 is satisfiable. The claim of the lemma now follows by a straightforward induction on i. 2
paper.tex; 2/07/2007; 21:08; p.23
24 3.5. Reduction to Disjunctive Datalog Reduction of KB to a disjunctive datalog program is now easy: DEFINITION 17. For an extensionally reduced ALCHIQ knowledge base KB, DD(KB) is the disjunctive datalog program that contains the rule A1 ρ ∨ . . . ∨ An ρ ← B1 ρ, . . . , Bm ρ for each closure of the form (A1 ∨ . . . ∨ An ∨ ¬B1 ∨ . . . ∨ ¬Bm ) · ρ from FFR (KB ). If KB is not extensionally reduced, then DD(KB) = DD(KB ′ ), where KB ′ is the extensionally reduced knowledge base obtained from KB as described in Section 2.1. THEOREM 18. For each ALCHIQ knowledge base KB, the following claims hold: 1. KB is unsatisfiable if and only if DD(KB) is unsatisfiable; 2. KB |= α if and only if DD(KB ) |=c α, where α is of the form A(a) or R(a, b), A is an atomic concept, R a role, and a and b from KB; 3. KB |= C(a) for a nonatomic concept C and an individual a occurring in KB if and only if DD(KB ∪ {C ⊑ Q}) |=c Q(a) for Q a new atomic concept; 4. The number of literals in each rule in DD(KB ) is at most polynomial, the number of rules in DD(KB) is at most exponential, and DD(KB ) can be computed in time exponential in |KB| for unary coding of numbers in the input. Proof. The first claim follows directly from Lemma 16. The second claim follows from the first one: DD(KB ∪ {¬α}) = DD(KB ) ∪ {¬α} (since a and b occur in KB, all facts about constants af and bf for each function symbol f are contained in DD(KB)), and DD(KB ) ∪ {¬α} is unsatisfiable if and only if DD(KB ) |=c α. Furthermore, KB |= C(a) if and only if KB ∪ {¬C(a)} is unsatisfiable, which is the case if and only if KB ∪ {¬Q(a), C ⊑ Q} is unsatisfiable. Since Q is atomic and a occurs in KB, the third claim follows from the second one. By Lemma 7, for each closure C ∈ Sat(ΓT Rg ), the number of literals in C is at most polynomial in |KB |, and |Sat(ΓT Rg )| is at most exponential in |KB |. An application of λ to C can be performed in polynomial time. The number of constants af added to DD(KB ) is c · f , where c is the number of constants, and f the number of function symbols in the signature of Ξ(KB). If numbers are coded in unary, both c and f are polynomial in |KB |, so the number of constants af is also polynomial in |KB|. By Theorem 8, Sat(ΓT Rg ) can be computed in time exponential in |KB |. 2
paper.tex; 2/07/2007; 21:08; p.24
25 3.6. Examples We now present several examples that point out important properties of the reduction algorithm. The first three examples do not use number restrictions so, according to the discussion after Lemma 11, we can delete all closures containing function symbols after the saturation of Ξ(KB) by BS + DL . Readers familiar with more common approaches to DL reasoning might ask themselves how are the role successors represented in a datalog program. As we show next, datalog programs do not represent them at all. Let KB 1 = {C ⊑ ∃R.D}; through clausification, we obtain Ξ(KB 1 ) = {¬C(x) ∨ R(x, f (x)), ¬C(x) ∨ D(f (x))}. The set Ξ(KB 1 ) is already saturated by BS + DL . After removing closures with function symbols, we obtain DD(KB 1 ) = ∅, which may be quite confusing: KB 1 implies the existence of at least one R-successor for each member of C, whereas DD(KB 1 ) does not reflect that. Theorem 18 is, however, not invalidated. Namely, the individuals introduced by the existential quantifier in KB 1 are unnamed, so they cannot be referred to in the atomic queries or their answers. For an arbitrary extensionally reduced ABox KB A , the knowledge base KB 1 ∪ KB A does not imply any new facts of the form A(a) or R(a, b). Also, note that the models of DD(KB 1 ) appear to be unrelated to the models of KB 1 in general; they only coincide on ground facts. This is so because the reduction algorithm is based on a proof-theoretic correspondence between refutations in Ξ(KB) and DD(KB). The models of KB and DD(KB) coincide only on positive ground facts, whereas, for unnamed individuals, they do not seem to be related. In order to draw ground consequences from KB 1 , we need more axioms. Let KB 2 = KB 1 ∪ {D ⊑ ⊥}, so Ξ(KB 2 ) = Ξ(KB 1 ) ∪ {¬D(x)}. The saturation of Ξ(KB 2 ) produces a closure ¬C(x), so, eventually, we obtain DD(KB 2 ) = {← C(x), ← D(x)}. This example shows that the reduction is not modular—that is, DD(KB a ) ∪ DD(KB b ) is not necessarily equal to DD(KB a ∪ KB b ) for arbitrary knowledge bases KB a and KB b . The key step in our algorithm is the saturation of Ξ(KB T ) by BS + DL . It computes nonground consequences of Ξ(KB T ), which ensure that subsequent removal of closures with function symbols does not change the set of ground consequences. These closures are like “macros,” because they derive ground facts about objects without expanding their successors. For example, for KB 3 = {A ⊑ ∃R.B, B ⊑ C, ∃R.C ⊑ D}, the set Ξ(KB 3 ) consists of the following closures: (22)
¬A(x) ∨ R(x, f (x))
paper.tex; 2/07/2007; 21:08; p.25
26 (23) (24) (25)
¬A(x) ∨ B(f (x)) ¬B(x) ∨ C(x) D(x) ∨ ¬R(x, y) ∨ ¬C(y)
If literals are ordered as D(x) ≻ C(x) ≻ B(x) ≻ A(x), the saturation of Ξ(KB 3 ) produces the following additional closures (R(xx; yy) means that a closure is derived by resolving closures xx and yy): (26) (27) (28)
¬A(x) ∨ D(x) ∨ ¬C(f (x)) ¬A(x) ∨ D(x) ∨ ¬B(f (x)) ¬A(x) ∨ D(x)
R(22;25) R(26;24) R(27;23)
By eliminating the closures with function symbols from (22)–(28), we obtain the following program DD(KB 3 ): (29) (30) (31)
C(x) ← B(x) D(x) ← R(x, y), C(y) D(x) ← A(x)
Let us examine the role of each rule in DD(KB 3 ). The axiom B ⊑ C corresponds to (29), and the axiom ∃R.C ⊑ D corresponds to (30). The program DD(KB 3 ), however, does not contain an equivalent of the axiom A ⊑ ∃R.B; hence, all rules in DD(KB 3 ) consider only the explicitly named individuals. To compensate for that, DD(KB 3 ) contains the rule (31), introduced in the saturation of Ξ(KB T ) by BS + DL . Instead of introducing, for each x in A, an R-successor y in B, propagating y to C, and then concluding that x is in D, the rule (31) derives in one step that all members of A are members of D, ensuring that DD(KB 3 ) and KB 3 entail the same ground facts. Finally, let KB 4 = {⊤ ⊑ ∃R.C, ⊤ ⊑ ≤ 1 R, ∃R.∃R.⊤ ⊑ D}. The translation into closures produces the following set Ξ(KB 4 ): (32) (33) (34) (35) (36)
R(x, f (x)) C(f (x)) ¬R(x, y1 ) ∨ ¬R(x, y2 ) ∨ y1 ≈ y2 ¬R(x, y) ∨ Q(x) D(x) ∨ ¬R(x, y) ∨ ¬Q(y)
By saturating Ξ(KB 4 ) we obtain the following closures: (37) (38) (39)
Q(x) D(x) ∨ ¬Q(f (x)) D(x)
R(32;35) R(32;36) R(37;38)
paper.tex; 2/07/2007; 21:08; p.26
27 Because both binary literals in (34) are selected and there is only one closure with a positive binary R-literal, (32) and (34) do not participate in resolution; furthermore, hyperresolution inferences with a closure of type 7 and several copies of a side premise always produce a tautology. Consider now our translation into disjunctive datalog. Since Ξ(KB) contains equality, we cannot simply eliminate all closures containing function symbols; rather, we must apply Definition 12. We obtain the following datalog program DD(KB 4 ): (40) (41) (42) (43) (44) (45) (46)
R(x, xf ) ← Sf (x, xf ) C(xf ) ← Sf (x, xf ) y1 ≈ y2 ← R(x, y1 ), R(x, y2 ) Q(x) ← R(x, y) D(x) ← R(x, y), Q(y) Q(x) ← HU (x) D(x) ← HU (x)
Translating the closure (38) produces the following rule: (47)
D(x) ← Q(xf ), Sf (x, xf )
This rule, however, can be obtained by resolving (40) and (44), so, by Definition 15, we need not include (47) into DD(KB 4 ). In contrast, the rules (45) and (46) cannot be obtained from other rules from DD(KB 4 ); for example, resolving (40) and (43) produces Q(x) ← Sf (x, xf ) and not (45). Let us now add the ABox containing only one assertion R(a, b) to KB 4 . To satisfy Definition 12, we additionally append the facts Sf (a, af ), Sf (b, bf ), HU (a), HU (b), HU (af ), HU (bf ) to DD(KB 4 ). We can then derive C(b) in DD(KB 4 ) using the following inferences: (48) (49) (50) (51)
R(a, af ) C(af ) af ≈ b C(b)
The knowledge base from our example also implies D(a); to derive this, we must consider the R-successors of a two steps away from a. The disjunctive datalog program derives D(a) directly using the rule (46). Intuitively, this example shows that, in the presence of equality, we must take the immediate R-successors of a into account in order to derive all implied ground facts; however, the consequences of all longer paths are handled by the saturation step of the reduction.
paper.tex; 2/07/2007; 21:08; p.27
28 3.7. Discussion Independence of the Reduction from the Query. Theorem 18 shows that DD(KB) is independent from the query if the query is a positive atomic concept or a role. Hence, DD(KB ) can be computed once and used to answer any number of atomic queries. For a nonatomic query concept C (even if C is a negated atomic concept), query answering can be reduced to entailment of positive ground facts by introducing a new name Q and adding the axiom C ⊑ Q to the TBox. Unfortunately, DD(KB ∪ {C ⊑ Q}) depends on the query concept C. Intuitively, a complex concept C, even if used only in the query, introduces terminological knowledge which must be taken into account in the reduction. DD(KB ) cannot be used to answer conjunctive queries with nondistinguished variables—that is, existentially quantified variables that can be bound to any individual in the model; however, it can be used for answering conjunctive queries with only distinguished variables—that is, the existentially quantified variables that can be bound only to named individuals. Namely, DD(KB) implies a conjunction of ground atoms if and only if it implies each atom separately, and, by Theorem 18, the latter property can be checked using DD(KB ). Similarly, DD(KB ) can be used to check entailment of disjunctions of ground atoms. Minimal vs. Arbitrary Models. Disjunctive datalog programs are usually interpreted under minimal model semantics: P |=c α means that α is true in all minimal models of a program P , where minimality is defined w.r.t. set inclusion. Thus, disjunctive datalog implements a kind of closed-world semantics. In contrast, description logics assume the standard first-order, or open-world semantics: KB |= α means that α is true in all models of KB. It may come as a surprise that a logic based on arbitrary models can be embedded into a logic that considers only minimal models. This is possible because (i) the reduction algorithm produces only positive datalog programs (that is, programs without negation-as-failure), and (ii) first-order and minimal-model semantics coincide for certain types of questions. For a positive datalog program P and a positive ground atom α, P |= α if and only if P |=c α. Namely, if α is true in each model of P , it is true in each minimal model of P as well and vice versa. Hence, for positive consequences, it is not important whether the semantics of P is defined w.r.t. minimal or w.r.t. general first-order models. If α is a negative ground atom, the type of semantics matters, as we show in the following example. For α = ¬A(b) and P = {A(a)}, it is clear that P 6|= α. Namely, ¬A(b) is not explicitly derivable from the
paper.tex; 2/07/2007; 21:08; p.28
29 facts in P : M1 = {A(a), A(b)} is a first-order model of P , and α is false in M1 . In contrast, P has exactly one minimal model M2 = {A(a)}, and ¬A(b) is obviously true in M2 , so P |=c α (recall that the semantics of disjunctive datalog is defined only w.r.t. Herbrand models). In a similar vein, the choice of semantics affects concept subsumption. It is therefore incorrect to check whether KB |= ¬A(a) by checking whether DD(KB ) |=c ¬A(a). Instead, we must reduce the problem to entailment of positive ground facts: KB |= ¬A(a) if and only if DD(KB ∪ {¬A ⊑ NotA}) |=c NotA(a), where NotA is a new concept. Similarly, it is incorrect to check whether KB |= C ⊑ D by checking whether DD(KB ) |=c ∀x : [C(x) → D(x)]. Again, we must reduce the problem to entailment of positive ground facts. If C and D are atomic concepts, KB |= C ⊑ D if and only if DD(KB ∪ {C(a)}) |=c D(a), where a is a new individual not occurring in KB. Complexity. Cautious query answering in a nonground positive disjunctive datalog program P can be performed in co-NExpTime [14]. Intuitively, the number of variables in a rule of P is linear in |P |, so the size of the ground program P G , obtained by instantiating each rule from P with individuals in all possible ways, is exponential in |P |. Now satisfiability of P G can be tested by guessing an interpretation (which is a nondeterministic exponential step), and by checking whether it is a model of P G (which is an exponential step). Finally, query answering can be reduced to the complementary problem as usual. Actually, Eiter, Gottlob and Mannila give the complexity as co-NExpTimeNP [14] because they consider a more general case of disjunctive datalog programs with negation-as-failure under stable model semantics. In such a case, it does not suffice to find an arbitrary model; one must additionally check if the model is minimal, which can be performed by an NP oracle. Since |DD(KB)| is exponential in |KB |, one might get the impression that our algorithm increases complexity to (co-)2NExpTime. This is not the case because DD(KB ) is of a restricted form. Namely, the number of variables in a rule is linear in |KB|, so a grounding of DD(KB ) is exponential in |KB |. Furthermore, the predicates in DD(KB) are of limited arity, so an interpretation can be guessed in nondeterministic polynomial time, and checking whether it is a model can be done in exponential time. Finally, all interpretations can be examined in exponential time. To summarize, even though |DD(KB)| is exponential in |KB|, query answering can be performed in ExpTime because (i) the length of the rules in DD(KB ) is polynomial in |KB|, and (ii) the arity of the literals is bounded. Descriptive vs. Minimal Fixpoint Semantics. Our reduction preserves the so-called descriptive semantics. Namely, Nebel has observed that
paper.tex; 2/07/2007; 21:08; p.29
30 knowledge bases containing terminological cycles are not definitorial [30]: for a fixed partial interpretation of primitive concepts, several interpretations of defined concepts may exist. In such a case, it might be reasonable to designate a particular interpretation as the intended one, with least and greatest fixpoint models being the obvious candidates. Nebel, however, argues that it is not clear which interpretation best matches the intuition, as choosing either of the fixpoint models has its drawbacks. Consequently, most description logic systems, as well as our approach, implement the descriptive semantics, which coincides with that of Definition 2. Unique Name Assumption. The semantics of disjunctive datalog requires different symbols to be interpreted as different objects; however, this does not hold in SHIQ. It may seem surprising that a logic without unique name assumption (UNA) can be embedded into a logic that strictly requires it. To understand why our algorithms are correct, note that the UNA can be used to derive new consequences from a theory only if the theory employs equality. If a knowledge base uses neither number restrictions nor explicit individual equality statements, Ξ(KB) does not contain the equality predicate, so equality reasoning is not needed. We might enforce UNA by appending a 6≈ b for each a 6= b; however, these axioms would not participate in any inference, and are thus not needed in the first place. A model-theoretic explanation is given by the following claim, which holds for theories without any form of equality [15]: for each model I in which certain distinct constants are interpreted by the same objects, there is a model I ′ in which all constants are interpreted by distinct objects. To summarize, if KB does not employ explicit or implicit equality, we simply do not care whether either KB or DD(KB ) employs UNA, as this does not change the entailed set of facts. The situation changes for knowledge bases which require equality reasoning. Consider KB = {⊤ ⊑ ≤ 1 R, R(a, b), R(a, c)}. Without UNA, KB is satisfiable and KB |= b ≈ c. Namely, the first axiom requires R to be functional, so b and c must be interpreted as the same object. In contrast, with UNA, KB is unsatisfiable. Note that the program DD(KB) contains y1 ≈ y2 ← R(x, y1 ), R(x, y2 ). The equality occurring in the rule is quite different from the equality usually considered in disjunctive datalog. For example, in [14], equality atoms can only occur in rule bodies under negation-as-failure; such programs are interpreted under UNA, so an atom ¬(x ≈ y) actually checks whether x and y are bound to syntactically different individuals. In contrast, we use equality not only in rule bodies, but also in rule heads. Hence, we can actually derive that two individuals are equal.
paper.tex; 2/07/2007; 21:08; p.30
31 This is not directly supported in the implemented disjunctive datalog systems known to us; however, it can be simulated using the well-known encoding from [15] that treats ≈ as an ordinary predicate, explicitly states that it is reflexive, symmetric, transitive, and that it satisfies the usual equality replacement axioms. We thus obtain a program in which ≈ is just another predicate, which we can freely interpret with or without UNA, as discussed previously.
4. Data Complexity of Reasoning Based on the reduction algorithm from Section 3, we now derive new data complexity results—that is, complexity under the assumption that the size of the ABox dominates the sizes of the TBox and RBox. In Section 4.1, we consider the case of full SHIQ. In Section 4.2, we identify a fragment of SHIQ exhibiting polynomial data complexity. 4.1. Data Complexity for Full SHIQ The upper data complexity bound for SHIQ follows almost immediately from the reduction algorithm: LEMMA 19 (Membership). For KB an extensionally reduced SHIQ knowledge base, satisfiability of KB can be decided in nondeterministic polynomial time in |KB A |. Proof. Let c be the number of constants, f the number of function symbols, and s the number of facts in Ξ(KB). By Definition 12, the number of constants in DD(KB) is bounded by ℓ1 = c+cf (cf accounts for constants of the form af ), and the number of facts in DD(KB) is bounded by ℓ2 = s+c+2cf (c accounts for facts HU (a), one cf accounts for facts Sf (a, af ), and the other cf accounts for facts HU (af )). All function symbols are introduced by skolemizing TBox concepts ∃R.C and ≥ n R.C. Since |KB T | and |KB R | are constant, f is also a constant, so ℓ1 and ℓ2 are linear in |KB A |. Hence, |DD(KB )| can be exponential in |KB| only because the nonground rules in DD(KB) are obtained from exponentially many closures of types 1–7. Since this does not include the ABox closures, the number of closures after saturation is exponential only in |KB T |+ |KB R |. Since we assume that the latter is constant, both the number of rules in DD(KB) and their length are bounded by constants, so |DD(KB)| is polynomial in |KB A |, and can be computed from KB in time polynomial in |KB A |. Since KB and DD(KB ) are equisatisfiable, the data complexity of checking satisfiability of KB follows from the data complexity
paper.tex; 2/07/2007; 21:08; p.31
32 of checking satisfiability of DD(KB ), which is in NP for disjunctive datalog programs without negation-as-failure [13]. 2 Intuitively, TBox and RBox reasoning in SHIQ does not “interfere” with ABox reasoning; that is, all nonground consequences of KB can be computed without taking the ABox into account. Notice also that Lemma 19 holds even for binary coding of numbers. The hardness of the satisfiability checking problem follows from [36, Lemma 4.2.7]. Actually, the lemma shows co-NP-hardness of instance checking by a reduction of satisfiability of 2-2-CNF propositional formulae. The reduction produces an extensionally reduced ABox and a single TBox axiom, so it is applicable to our case as well. Hence, we immediately obtain the following result: THEOREM 20. Let KB be an extensionally reduced knowledge base in any logic between ALC and SHIQ. Then, ( i) deciding KB satisfiability is data complete for NP and ( ii) deciding whether KB |= (¬)C(a) with |C| bounded is data complete for co-NP. 4.2. A Horn Fragment of SHIQ Horn logic is a well-known fragment of first-order logic in which formulae are restricted to clauses containing at most one positive literal. The main limitation of Horn logic is its inability to represent disjunctive information; however, its main benefit is the existence of practical refutation procedures. Data complexity of query answering in Horn logic without function symbols is P-complete [13], which makes it particularly appealing for practical usage. Following this idea, we now identify the Horn fragment of SHIQ that exhibits similar properties: in HornSHIQ, the capability of representing disjunctive information is traded for polynomial data complexity of reasoning. Horn-SHIQ allows only for axioms that do not require d reasoning by case. Roughly speaking, only TBox axioms of the form Ci ⊑ D are allowed, where Ci is of the form A, ∃R.A, or ≥ 1 R.A, and D is of the form A, ⊥, ∃R.A, ∀R.A, ≥ n R.A, or ≤ 1 R; additionally, we allow for role inclusion axioms and, in certain situations, transitivity axioms, as discussed after Definition 21. We call such axioms simple Horn. Such a fragment of description logics is interesting because it can express many features of conceptual data models, such as the EntityRelationship Model [11] or the Unified Modeling Language (UML); see [10] for more details. Horn-SHIQ is expressive enough to represent the following properties:
paper.tex; 2/07/2007; 21:08; p.32
33 − inclusion of simple concepts (e.g., Woman ⊑ Person) − concept disjointness (e.g., Man ⊓ Woman ⊑ ⊥) − domain restrictions (e.g., ∃husbandOf .⊤ ⊑ Man) − range restrictions (e.g., ⊤ ⊑ ∀husbandOf .Woman) − functionality restriction (e.g., ⊤ ⊑ ≤ 1 husbandOf ) − participation constraints (e.g., Husband ⊑ ∃husbandOf .Woman) − role inclusions (e.g., husbandOf ⊑ spouseOf ) Horn-SHIQ does not provide for the definition of covering constraints, such as Man ⊔ Woman ≡ Person. Horn-SHIQ is a proper extension of DL-lite [9]—a description logic with LogSpace data complexity. Unlike DL-lite, Horn-SHIQ can express recursive axioms of the form ∃R.C ⊑ C, which causes an increase in data complexity to polynomial time. The definition of simple Horn axioms succinctly demonstrates the expressivity of the fragment, but it is too restricting in general. For example, the axiom A1 ⊔ A2 ⊑ ¬B is not simple Horn, but it is equivalent to simple Horn axioms A1 ⊓ B ⊑ ⊥ and A2 ⊓ B ⊑ ⊥. Similarly, an axiom A ⊑ ∃R.(∃R.B) is not simple Horn, but it can be transformed into simple Horn axioms A ⊑ ∃R.Q and Q ⊑ ∃R.B by replacing ∃R.B with a new name Q. To avoid dependency on such obvious syntactic transformations, we use the following, rather technical definition: DEFINITION 21. In Table V, we define two mutually recursive functions pl+ and pl− , where sgn(0) = 0 and sgn(n) = 1 for n > 0. For a concept C and a position p of a subconcept in C, let pl(C, p) = pl+ (C|p ) if pol(C, p) = 1, and let pl(C, p) = pl− (C|p ) if pol(C, p) = −1. A concept C is Horn if pl(C, p) ≤ 1 for each position p such that C|p is a concept (including the empty position ǫ). An extensionally reduced ALCHIQ knowledge base KB is Horn if, for each axiom C ⊑ D ∈ KB, the concept ¬C ⊔D is Horn. An extensionally reduced SHIQ knowledge base KB is Horn if Ω(KB) is Horn. It is easy to see that, for a concept C without complex subconcepts, pl+ (C) gives the maximal number of positive literals in closures obtained by clausifying ∀x : πx (C). To clausify a concept C containing a complex subconcept at a position p, we should consider if C|p occurs in C under positive or negative polarity. For example, in ¬(¬A ⊓ ¬B), the concepts A and B occur effectively positively, and ⊓ is effectively ⊔. Hence, pl+ (C|p ) (pl− (C|p )) counts the number of positive literals used to clausify C|p , provided that C|p occurs in C under positive (negative) polarity. The function sgn(·) takes into account that C|p will be replaced
paper.tex; 2/07/2007; 21:08; p.33
34 Table V. Definitions of pl+ and pl− D
pl+ (D)
pl− (D)
⊤ ⊥ A ¬C d C F i Ci ∃R.C ∀R.C ≥ n R.C ≤ n R.C
0 0 1 pl− (C) max sgn(pl+ (Ci )) P i sgn(pl+ (Ci )) i 1 sgn(pl+ (C)) 1 n(n+1) + (n + 1)sgn(pl− (C)) 2
0 0 0 pl+ (C) P sgn(pl− (Ci )) i maxi sgn(pl− (Ci )) sgn(pl− (C)) 1 (n−1)n + n sgn(pl+ (C)) 2 1
in C by structural transformation with only one concept name, even if clausification of C|p produces more than one positive literal. For example, to clausify C = ∀R.(D1 ⊔ D2 ), the structural transformation replaces D1 ⊔D2 with a new concept name Q, yielding C ′ = ∀R.Q; then clausifying C ′ produces a closure with only one positive literal. Now a concept C is Horn if the maximal number of positive literals obtained by clausifying subconcepts of C is at most one. If a concept C has a complex subconcept at position p, care has to be taken in introducing a new name for C|p . Consider the Horn concept C = ∀R.D1 ⊔ ∀R.¬D2 . In applying structural transformation, one might replace ∀R.D1 and ∀R.¬D2 with new concept names Q1 and Q2 , respectively, yielding concepts ¬Q1 ⊔ ∀R.D1 , ¬Q2 ⊔ ∀R.¬D2 , and Q1 ⊔ Q2 . The problem with this approach is that a Horn concept C was reduced to a non-Horn concept Q1 ⊔ Q2 , so the structural transformation destroyed Horn-ness. To remedy this, we modify the structural transformation to replace each C|p with a literal concept α such that clausifying α and C|p requires the same number of positive literals. In the above example, this would mean that ∀R.D1 should be replaced with Q1 , but ∀R.¬D2 should be replaced with ¬Q2 , yielding concepts ¬Q1 ⊔ ∀R.D1 , Q2 ⊔ ∀R.¬D2 , and Q1 ⊔ ¬Q2 , all of which are Horn. Although transitivity axioms are translated by π into Horn closures, the algorithm from Section 3.2 replaces them with axioms of the form ∀R.C ⊑ ∀S.(∀S.C). Now pl+ (∃R.¬C ⊔ ∀S.(∀S.C)) = 1 + pl+ (C), so if pl+ (C) > 0, Ω(KB) is not a Horn knowledge base. Hence, the presence of transitivity axioms can make a knowledge base non-Horn.
paper.tex; 2/07/2007; 21:08; p.34
35 DEFINITION 22. The Horn-compatible structural transformation is as in Definition 3, with the following difference to Def(C), where α = Q if pl(C, p) > 0, and α = ¬Q if pl(C, p) = 0, for Q a new atomic concept and ¬(¬Q) = Q: Def(C) =
{¬α ⊔ C|p } ∪ Def(C[α]p ) if pol(C, p) = 1 {¬α ⊔ ¬C|p } ∪ Def(C[¬α]p ) if pol(C, p) = −1
By [32], ∀x : πx (C) and D∈Def(C) ∀x : πx (D) are equisatisfiable, so Ξ(KB) and π(KB ) are equisatisfiable as well. V
LEMMA 23. For a Horn-SHIQ knowledge base KB, each closure from Ξ(KB) contains at most one positive literal. Proof. We first show the following property (*): for a Horn concept C, all concepts in Def(C) are Horn concepts. The proof is by induction on the recursion depth. The induction base for Λ(C) = ∅ is obvious. Consider an application of Def(C), where C is a Horn concept and p a position of a subconcept of C, such that C|p is not a literal concept and, for each position q below p, C|q is a literal concept. In all cases, we have pl+ (α) = pl(C, p) and pl+ (¬α) = 1 − pl(C, p). If pol(C, p) = 1, then pl+ (¬α ⊔ C|p ) = pl+ (¬α) + pl+ (C|p ) = pl+ (¬α) + pl(C, p) = 1; furthermore, pl(C, p) = pl(C[α]p , p), so C[α]p is Horn. Similar considerations hold for pol(C, p) = −1. Hence, Def decomposes a Horn concept C into two simpler Horn concepts, so (*) holds. For D ∈ Def(C), one can see that pl+ (D) gives the maximal number of positive literals occurring in Cls(∀x : πx (D)). Thus, if C is a Horn concept, all closures from Cls(C) contain at most one positive literal. Finally, the closures of Ω(KB) obtained by translating the RBox and the ABox also contain at most one positive literal. 2 LEMMA 24. If all premises of an inference by BS + DL contain at most one positive literal, then inference conclusions also contain at most one positive literal. Proof. In ordered hyperresolution and positive or negative superposition, each side premise participates in an inference on the positive literal, which does not occur in the conclusion. Hence, the number of positive literals in the conclusion is equal to the number of positive literals in the main premise. Furthermore, reflexivity resolution only reduces the number of negative literals in a closure, and equality factoring is never applicable to a closure with only one positive literal. Finally, a closure participating in a decomposition inference contains the single positive literal R(t, f (t)), so both resulting closures have exactly one positive literal. 2
paper.tex; 2/07/2007; 21:08; p.35
36 LEMMA 25 (Hardness). For a Horn ALC knowledge base KB, instance checking w.r.t. KB is P-hard in |KB A |. Proof. The proof is by a reduction from the well-known Boolean circuit value problem [33]. A Boolean circuit C is a graph (G, δ, E) defined as follows: (i) G = {γ1 , ..., γn } is the set of nodes, also called gates; (ii) δ : G → {T, F, ∧, ∨, ¬} is a function assigning a label to each gate; and (iii) E ⊆ G × G is the acyclic set of edges such that the in-degree of gates labeled with T or F is zero, of gates labeled with ¬ is one, and of gates labeled with ∧ or ∨ is two. A valuation µ : G → {T, F } over gates of C is defined according to standard truth tables for Boolean connectives, and the value of C is defined as µ(C) = µ(γn ). For an arbitrary circuit C, checking whether µ(C) = T is P-complete [33]. For a Boolean circuit C, we construct the knowledge base KB C in which each gate γi corresponds to an individual γi . Let T and F be concept names, and let not, and 1 , and 2 , or 1 , and or 2 be role names. We convert C into ABox assertions as follows: (i) add not (γ, γ1 ) for all nodes γ, γ1 such that δ(γ) = ¬ and (γ1 , γ) ∈ E; (ii) add and 1 (γ, γ1 ) and and 2 (γ, γ2 ) for all nodes γ, γ1 , γ2 such that δ(γ) = ∧, (γ1 , γ) ∈ E, and (γ2 , γ) ∈ E; (iii) add or 1 (γ, γ1 ) and or 2 (γ, γ2 ) for all nodes γ, γ1 , γ2 such that δ(γ) = ∨, (γ1 , γ) ∈ E, and (γ2 , γ) ∈ E; (iv ) add T (γ) for each node γ such that δ(γ) = T ; and (v ) add F (γ) for each node γ such that δ(γ) = F . The TBox of KB C contains the following axioms: ∃not.T ∃not.F ∃and 1 .T ⊓ ∃and 2 .T ∃and 1 .T ⊓ ∃and 2 .F ∃and 1 .F ⊓ ∃and 2 .T ∃and 1 .F ⊓ ∃and 2 .F
⊑F ⊑T ⊑T ⊑F ⊑F ⊑F
T ⊓F ⊑⊥ ∃or 1 .T ⊓ ∃or 2 .T ∃or 1 .T ⊓ ∃or 2 .F ∃or 1 .F ⊓ ∃or 2 .T ∃or 1 .F ⊓ ∃or 2 .F
⊑T ⊑T ⊑T ⊑F
The TBox axioms of KB C obviously implement the standard semantics of propositional connectives, so, for each gate γ, µ(γ) = T (µ(γ) = F ) if and only if KB C |= T (γ) (KB C |= F (γ)). The size of the TBox of KB C is constant, the size of the ABox of KB C is linear in the size of C, and KB C is a Horn knowledge base, so the claim follows. 2 By Lemma 23 and 24, if KB is a Horn-SHIQ knowledge base, then DD(KB) is a Horn program. This implies the following result: THEOREM 26. For KB an extensionally reduced Horn knowledge base in any logic between ALC and SHIQ, deciding KB (un)satisfiability, and deciding whether KB |= (¬)C(a) with |C| bounded, is P-complete in |KB A |.
paper.tex; 2/07/2007; 21:08; p.36
37 Proof. Membership in P is a consequence of the fact that DD(KB ) is a Horn program, whose satisfiability can be checked in polynomial time [13]. Hence, the claim of this theorem follows from Lemma 25. 2
5. Related Work We now discuss related approaches to reasoning in description logics via rule-based formalisms. Our work was largely motivated by Grosof, Horrocks, Decker, and Volz, who have investigated a decidable intersection of description logic and logic programming [16]. In particular, the authors identify the description logic constructs that can be straightforwardly encoded and executed using existing logic programming systems. Thus, the DL component allows only existential quantifiers to occur under negative, and universal quantifiers to occur under positive polarity. The authors present an operator for translating a description logic knowledge base into a logic program. Our approach is a significant extension since we handle the DL SHIQ, which requires a more complex reduction. Heymans and Vermeir showed how to convert SHIQ∗ knowledge bases into conceptual logic programs (CLP) [19]. CLPs generalize the good properties of description logic to the framework of answer set programming. Apart from the usual constructs, SHIQ∗ supports the transitive closure of roles. Although the presented transformation preserves the semantics of the knowledge base, the resulting answer set program is not safe. Hence, its grounding is infinite, so the program cannot be evaluated using existing answer set solvers. The problem of decidable reasoning for CLPs is addressed by an automata-based technique. In contrast, our transformation produces a safe program with a finite grounding, so decidability of reasoning is guaranteed already by the transformation. An approach for deciding satisfiability of DL concepts using answer set programming was presented in [37]. This work, however, does not consider general concept inclusion axioms. Another approach for reducing description logic knowledge bases to answer set programming was developed by Alsa¸c and Baral [2]. To deal with existential quantification, this approach uses function symbols. Thus, the Herbrand universe of the programs obtained by the reduction is infinite, so existing answer set solvers cannot be used for reasoning. In fact, decidability is not considered at all.
paper.tex; 2/07/2007; 21:08; p.37
38 6. Conclusion We have presented an algorithm for reducing a SHIQ knowledge base to a disjunctive datalog program which entails the same set of ground facts as the original knowledge base. Thus, DL query answering can be implemented using various optimizations that were developed for disjunctive datalog, such as join order optimizations or the magic sets transformation. The latter has been shown to dramatically improve the evaluation of disjunctive datalog programs. Our experiments, reported in [29], indeed show significant performance improvements over existing DL systems in answering queries over knowledge bases with large ABoxes but modest TBoxes. Furthermore, our approach allows us to derive tight data complexity bounds—that is, the complexity under the assumption that the TBox is stable, whereas the ABox is varying and is possibly very large. We show that checking satisfiability of a SHIQ knowledge base is NP-complete, and that unsatisfiability and instance checking are co-NP-complete in the size of the ABox. Additionally, we identify Horn-SHIQ, a fragment of SHIQ which, analogously to Horn logic, does not allow for disjunctive knowledge, and for which the basic reasoning problems are P-complete in the size of the ABox. For our future work, the main challenge lies in extending the algorithm to SHOIQ. In [27] we presented a resolution-based decision procedure for this logic; however, it is currently not clear whether this result can be used to extend the reduction algorithm presented here.
References 1. 2.
3.
4. 5.
6.
Abiteboul, S., R. Hull, and V. Vianu: 1995, Foundations of Databases. Addison Wesley. Alsa¸c, G. and C. Baral: 2002, ‘Reasoning in description logics using declarative logic programming’. Technical report, Arizona State University, Arizona, USA. http://www.public.asu.edu/ cbaral/papers/descr-logic-aaai2.pdf. Baader, F., D. Calvanese, D. McGuinness, D. Nardi, and P. F. Patel-Schneider (eds.): 2003, The Description Logic Handbook: Theory, Implementation and Applications. Cambridge University Press. Baader, F. and T. Nipkow: 1998, Term Rewriting and All That. Cambridge University Press. Baaz, M., U. Egly, and A. Leitsch: 2001, ‘Normal Form Transformations’. In: A. Robinson and A. Voronkov (eds.): Handbook of Automated Reasoning, Vol. I. Elsevier Science, Chapt. 5, pp. 273–333. Bachmair, L., H. Ganzinger, C. Lynch, and W. Snyder: 1995, ‘Basic Paramodulation’. Information and Computation 121(2), 172–192.
paper.tex; 2/07/2007; 21:08; p.38
39 7.
8. 9.
10.
11. 12.
13.
14. 15. 16.
17.
18.
19.
20.
21. 22.
Beeri, C. and R. Ramakrishnan: 1987, ‘On the power of magic’. In: Proc. of the 6th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS ’87). San Diego, CA, USA, pp. 269–283. Borgida, A.: 1996, ‘On the Relative Expressiveness of Description Logics and Predicate Logics’. Artificial Intelligence 82(1–2), 353–367. Calvanese, D., G. D. Giacomo, D. Lembo, M. Lenzerini, and R. Rosati: 2006, ‘Data Complexity of Query Answering in Description Logics’. In: P. Doherty, J. Mylopoulos, and C. A. Welty (eds.): Proc. of the 10th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR 2006). Lake District, United Kingdom, pp. 260–270. Calvanese, D., M. Lenzerini, and D. Nardi: 1998, ‘Description Logics for Conceptual Data Modeling’. In: J. Chomicki and G. Saake (eds.): Logics for Databases and Information Systems. Kluwer, Chapt. 8, pp. 229–263. Chen, P. P.: 1976, ‘The Entity-Relationship Model - Toward a Unified View of Data’. ACM Transactions on Database Systems 1(1), 9–36. Cumbo, C., W. Faber, G. Greco, and N. Leone: 2004, ‘Enhancing the Magic-Set Method for Disjunctive Datalog Programs’. In: B. Demoen and V. Lifschitz (eds.): Proc. of the 20th Int. Conf. on Logic Programming (ICLP 2004), Vol. 3132 of LNCS. Saint-Malo, France, pp. 371–385. Dantsin, E., T. Eiter, G. Gottlob, and A. Voronkov: 2001, ‘Complexity and expressive power of logic programming’. ACM Computing Surveys 33(3), 374– 425. Eiter, T., G. Gottlob, and H. Mannila: 1997, ‘Disjunctive Datalog’. ACM Transactions on Database Systems 22(3), 364–418. Fitting, M.: 1996, First-Order Logic and Automated Theorem Proving, 2nd Edition, Texts in Computer Science. Springer. Grosof, B. N., I. Horrocks, R. Volz, and S. Decker: 2003, ‘Description Logic Programs: Combining Logic Programs with Description Logic’. In: Proc. of the 12th Int. World Wide Web Conference (WWW 2003). Budapest, Hungary, pp. 48–57. Haarslev, V. and R. M¨ oller: 2001, ‘RACER System Description’. In: R. Gor´e, A. Leitsch, and T. Nipkow (eds.): Proc. of the 1st Int. Joint Conf. on Automated Reasoning (IJCAR 2001), Vol. 2083 of LNAI. Siena, Italy, pp. 701–706. Haarslev, V., R. M¨ oller, and A.-Y. Turhan: 2001, ‘Exploiting Pseudo Models for TBox and ABox Reasoning in Expressive Description Logics’. In: R. Gor´e, A. Leitsch, and T. Nipkow (eds.): Proc. of the 1st Int. Joint Conf. on Automated Reasoning (IJCAR 2001), Vol. 2083 of LNAI. Siena, Italy, pp. 61–75. Heymans, S. and D. Vermeir: 2003, ‘Integrating Semantic Web Reasoning and Answer Set Programming’. In: M. D. Vos and A. Provetti (eds.): Proc. of the 2nd Int. Workshop on Answer Set Programming, Advances in Theory and Implementation (ASP’03), Vol. 78 of CEUR Workshop Proceedings. Messina, Italy, pp. 194–208. Horrocks, I., P. F. Patel-Schneider, and F. van Harmelen: 2003, ‘From SHIQ and RDF to OWL: the making of a Web Ontology Language’. Journal of Web Semantics 1(1), 7–26. Horrocks, I., U. Sattler, and S. Tobies: 2000, ‘Practical Reasoning for Very Expressive Description Logics’. Logic Journal of the IGPL 8(3), 239–263. Hustadt, U., B. Motik, and U. Sattler: 2004, ‘Reducing SHIQ− Description Logic to Disjunctive Datalog Programs’. In: D. Dubois, C. A. Welty, and M.A. Williams (eds.): Proc. of the 9th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR 2004). Whistler, Canada, pp. 152–162.
paper.tex; 2/07/2007; 21:08; p.39
40 23.
24.
25.
26.
27.
28. 29.
30.
31.
32.
33. 34.
35. 36.
37.
Hustadt, U., B. Motik, and U. Sattler: 2005a, ‘A Decomposition Rule for Decision Procedures by Resolution-based Calculi’. In: F. Baader and A. Voronkov (eds.): Proc. of the 11th Int. Conf. on Logic for Programming Artificial Intelligence and Reasoning (LPAR 2004), Vol. 3452 of LNAI. Montevideo, Uruguay, pp. 21–35. Hustadt, U., B. Motik, and U. Sattler: 2005b, ‘Data Complexity of Reasoning in Very Expressive Description Logics’. In: Proc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI 2005). Edinburgh, UK, pp. 466–471. Hustadt, U. and R. A. Schmidt: 1999, ‘On the Relation of Resolution and Tableaux Proof Systems for Description Logics’. In: D. Thomas (ed.): Proc. of the 16th Int. Joint Conf. on Artificial Intelligence (IJCAI ’99). Stockholm, Sweden, pp. 110–115. Kazakov, Y. and H. de Nivelle: 2004, ‘A Resolution Decision Procedure for the Guarded Fragment with Transitive Guards’. In: D. Basin and M. Rusinowitch (eds.): Proc. of 2nd Int. Joint Conf. on Automated Reasoning (IJCAR 2004), Vol. 3097 of LNAI. Cork, Ireland, pp. 122–136. Kazakov, Y. and B. Motik: 2006, ‘A Resolution-Based Decision Procedure for SHOIQ’. In: U. Furbach, J. Harrison, and N. Shankar (eds.): Proc. of the 3rd Int. Joint Conf. on Automated Reasoning (IJCAR 2006), Vol. 4130 of LNAI. Seattle, WA, USA, pp. 662–667. Motik, B.: 2006, ‘Reasoning in Description Logics using Resolution and Deductive Databases’. Ph.D. thesis, Univesit¨ at Karlsruhe, Germany. Motik, B. and U. Sattler: 2006, ‘A Comparison of Reasoning Techniques for Querying Large Description Logic ABoxes’. In: M. Hermann and A. Voronkov (eds.): Proc. of the 13th Int. Conf. on Logic for Programming Artificial Intelligence and Reasoning (LPAR 2006). Phnom Penh, Cambodia. Accepted for publication. Nebel, B.: 1991, ‘Terminological Cycles: Semantics and Computational Properties’. In: J. F. Sowa (ed.): Principles of Semantic Networks: Explorations in the Representation of Knowledge. San Mateo, CA, USA: Morgan Kaufmann Publishers, pp. 331–361. Nieuwenhuis, R. and A. Rubio: 1995, ‘Theorem Proving with Ordering and Equality Constrained Clauses’. Journal of Symbolic Computation 19(4), 312– 351. Nonnengart, A. and C. Weidenbach: 2001, ‘Computing Small Clause Normal Forms’. In: A. Robinson and A. Voronkov (eds.): Handbook of Automated Reasoning, Vol. I. Elsevier Science, Chapt. 6, pp. 335–367. Papadimitriou, C. H.: 1993, Computational Complexity. Addison Wesley. Parsia, B. and E. Sirin, ‘Pellet: An OWL-DL Reasoner’. Poster, In Proc. of the 3rd Int. Semantic Web Conference (ISWC 2004), Hiroshima, Japan, November 7–11, 2004. Plaisted, D. A. and S. Greenbaum: 1986, ‘A Structure-Preserving Clause Form Translation’. Journal of Symbolic Logic and Computation 2(3), 293–304. Schaerf, A.: 1994, ‘Query Answering in Concept-Based Knowledge Representation Systems: Algorithms, Complexity, and Semantic Issues’. Ph.D. thesis, Dipartimento di Informatica e Sistemistica, Universit` a di Roma “La Sapienza”, Italy. Swift, T.: 2004, ‘Deduction in Ontologies via ASP’. In: V. Lifschitz and I. Niemel¨ a (eds.): Proc. of the 7th Int. Conf. on Logic Programming and Nonmonotonic Reasoning (LPNMR 2004), Vol. 2923 of LNCS. Fort Lauderdale, FL, USA, pp. 275–288.
paper.tex; 2/07/2007; 21:08; p.40
41 38. 39.
Tobies, S.: 2001, ‘Complexity Results and Practical Algorithms for Logics in Knowledge Representation’. Ph.D. thesis, RWTH Aachen, Germany. Tsarkov, D. and I. Horrocks: 2006, ‘FaCT++ Description Logic Reasoner: System Description’. In: Proc. of the 3rd Int. Joint Conf. on Automated Reasoning (IJCAR 2006), Vol. 4130 of LNAI. Seattle, WA, USA, pp. 292–297.
paper.tex; 2/07/2007; 21:08; p.41
paper.tex; 2/07/2007; 21:08; p.42