Academia.eduAcademia.edu

On the Web Ontology Rule Language OWL 2 RL

2011, Lecture Notes in Computer Science

It is known that the OWL 2 RL Web Ontology Language Profile has PTime data complexity and can be translated into Datalog. However, a knowledge base in OWL 2 RL may be unsatisfiable. The reason is that, when translated into Datalog, the result may consist of a Datalog program and a set of constraints in the form of negative clauses. In this paper we first identify a maximal fragment of OWL 2 RL called OWL 2 RL + with the property that every knowledge base expressed in this fragment can be translated into a Datalog program and hence is satisfiable. We then propose some extensions of OWL 2 RL and OWL 2 RL + that still have PTime data complexity.

On the Web Ontology Rule Language OWL 2 RL Son Thanh Cao1 , Linh Anh Nguyen2 , and Andrzej Szalas2,3 1 3 Faculty of Information Technology, Vinh University 182 Le Duan street, Vinh, Nghe An, Vietnam [email protected] 2 Institute of Informatics, University of Warsaw Banacha 2, 02-097 Warsaw, Poland {nguyen,andsz}@mimuw.edu.pl Dept. of Computer and Information Science, Linköping University SE-581 83 Linköping, Sweden Abstract. It is known that the OWL 2 RL Web Ontology Language Profile has PTime data complexity and can be translated into Datalog. However, a knowledge base in OWL 2 RL may be unsatisfiable. The reason is that, when translated into Datalog, the result may consist of a Datalog program and a set of constraints in the form of negative clauses. In this paper we first identify a maximal fragment of OWL 2 RL called OWL 2 RL+ with the property that every knowledge base expressed in this fragment can be translated into a Datalog program and hence is satisfiable. We then propose some extensions of OWL 2 RL and OWL 2 RL+ that still have PTime data complexity. 1 Introduction Semantic Web is a rapidly growing research area that has received lots of attention from researchers in the last decade. One of the layers of Semantic Web is OWL (Web Ontology Language), which is used to specify knowledge of the domain in terms of concepts, roles and individuals. The second version OWL 2 of OWL, recommended by the W3C consortium in October 2009, is based on the description logic SROIQ [7]. This logic is highly expressive but has intractable combined complexity (N2ExpTime-complete) and data complexity (NP-hard) for basic reasoning problems. Thus, W3C recommended also profiles of OWL 2 with lower expressiveness and tractable complexity. OWL 2 RL [13] is one of such profiles. It restricts the full language OWL 2 to allow a translation into Datalog and hence to obtain PTime data complexity and efficient computational methods. However, a knowledge base in OWL 2 RL may be unsatisfiable. Namely, the Datalog program resulting from the translation may also contain a set of constraints expressed as negative clauses. In database applications, constraints are important for keeping the database consistent w.r.t. its specification. They are used to block data modifications that are not allowed. In Semantic Web applications, the situation is a bit different. An ontology may consist of many component ontologies which were developed independently by P. Jedrzejowicz et al. (Eds.): ICCCI 2011, Part I, LNCS 6922, pp. 254–264, 2011. ֒ c Springer-Verlag Berlin Heidelberg 2011  On the Web Ontology Rule Language OWL 2 RL 255 different people. It may also include component ontologies which will be updated independently by different people. Thus, constraints are less important for ontologies, and when possible, should be replaced by syntactic restrictions. This is the case of OWL 2 RL. In this paper we first identify a maximal fragment of OWL 2 RL called OWL 2 RL+ with the property that every knowledge base expressed in this fragment can be translated into a Datalog program and hence is satisfiable. We then propose an extension OWL 2 eRL of OWL 2 RL with PTime data complexity, and an extension OWL 2 eRL+ of OWL 2 RL+ that can be translated into eDatalog (an extended version of Datalog). Next, we extend both OWL 2 eRL and OWL 2 eRL+ with eDatalog. Combining OWL 2 eRL or OWL 2 eRL+ with eDatalog gives us the freedom to use the syntax of both the languages and allows us to represent knowledge about the domain not only in terms of concepts and roles but also by using predicates with higher arities. Related Work: OWL 2 RL has been inspired by Description Logic Programs (DLP) [5] and pD∗ [14]. The logical base of DLP is the description Horn logic DHL [5]. Some extensions of DHL were studied by Nguyen in [11]. There are a number of fragments of description logics with PTime data complexity (see [12, Section 4] for an overview). Some other related works are [6,4] (on description logic programs with negation), [2] (on layered rule-based architecture) and [9,10,3] (on Horn fragments of modal logics). The Structure of this Paper: In Section 2 we specify OWL 2 RL [13] as a logical formalism. Section 3 is devoted to OWL 2 RL+ . Section 4 presents extensions of OWL 2 RL and OWL 2 RL+ . Section 5 concludes this work. Due to the lack of space, proofs of our theorems are presented only in [1]. 2 The Logical Formalism of OWL 2 RL In this section we specify OWL 2 RL as a logical formalism, using the syntax of description logics. We strictly follow the specification of OWL 2 RL given in [13]. We denote the set of concept names by CNames, and the set of role names by RNames. We use the truth symbol ⊤ to denote owl:Thing [13], and use: – – – – – – – – – – – – a and b to denote individuals (i.e. objects) d to denote a literal [13] (i.e. a data constant) A and B to denote concept names (i.e. Class elements [13]) C and D to denote concepts (i.e. ClassExpression elements [13]) lC to denote a concept standing for a subClassExpression of [13] rC to denote a concept standing for a superClassExpression of [13] eC to denote a concept standing for an equivClassExpression of [13] DT to denote a data type (i.e. a Datatype of [13]) DR to denote a data range (i.e. a DataRange of [13]) r and s to denote object role names (i.e. ObjectProperty elements [13]) R and S to denote object roles (i.e. ObjectPropertyExpression elements [13]) σ and ̺ to denote data role names (i.e. DataProperty elements [13]). 256 S.T. Cao, L.A. Nguyen, and A. Szalas The families of R, DR, lC, rC, eC are defined by the following BNF grammar: R := r | r− DR := DT | DT ⊓ DR lC := A | {a} | lC ⊓ lC | lC ⊔ lC | ∃R.lC | ∃R.⊤ | ∃σ.DR | ∃σ.{d} rC := A | rC ⊓ rC | ¬lC | ∀R.rC | ∃R.{a} | ∀σ.DR | ∃σ.{d} | ≤ 1 R.lC | ≤ 0 R.lC | ≤ 1 R.⊤ | ≤ 0 R.⊤ | ≤ 1 σ.DR | ≤ 0 σ.DR eC := A | eC ⊓ eC | ∃R.{a} | ∃σ.{d} The class constructor ObjectOneOf [13] can be written as {a1 , . . . , ak } and expressed as {a1 } ⊔ . . . ⊔ {ak }. We will use the following abbreviations: Disj (Disjoint), Func (Functional), InvFunc (InverseFunctional), Refl (Reflexive), Irref (Irreflexive), Sym (Symmetric), Asym (Asymmetric), Trans (Transitive), Key (HasKey). A TBox axiom, which stands for a ClassAxiom or a DatatypeDefinition or a HasKey axiom [13], is an expression of one of the following forms: lC ⊑ rC, eC = eC ′ , Disj(lC1 , . . . , lCk ), DT = DR, Key(lC, R1 , . . . , Rk , σ1 , . . . , σh ). An RBox axiom, which stands for an ObjectPropertyAxiom or a DataPropertyAxiom [13], is an expression of one of the following forms: R1 ◦ . . . ◦ Rk ⊑ S, R = S, R = S − , Disj(R1 , . . . , Rk ), ∃R.⊤ ⊑ rC, ⊤ ⊑ ∀R.rC, Func(R), InvFunc(R), Irref(R), Sym(R), Asym(R), Trans(R), σ ⊑ ̺, σ = ̺, Disj(σ1 , . . . , σk ), ∃σ ⊑ rC, ⊤ ⊑ ∀σ.DR, Func(σ). Note that axioms of the form R = S, R = S − , Sym(R) or Trans(R) are expressible by axioms of the form R1 ◦ . . . ◦ Rk ⊑ S, and hence can be deleted from the above list. An RBox axiom of the form ∃R.⊤ ⊑ rC (resp. ⊤ ⊑ ∀R.rC, ∃σ ⊑ rC, ⊤ ⊑ ∀σ.DR) stands for an ObjectPropertyDomain (resp. ObjectPropertyRange, DataPropertyDomain, DataPropertyRange) axiom [13]. One can classify these latter axioms as TBox axioms instead of RBox axioms. Similarly, Key(. . .) axioms can be classified as RBox axioms instead. An ABox assertion is a formula of one of the following forms: a = b, a = b, rC(a), DT(d), R(a, b), ¬R(a, b), σ(a, d), ¬σ(a, d). In OWL 2 RL [13], assertions of the form DT(d) are implicitly provided by declarations of DT and d. The other ABox assertions stand for Assertion elements of [13]. We also call an ABox assertion as an ABox axiom. In OWL 2 RL [13], there are also axioms standing for declarations and annotation axioms and used for keeping meta information about the ontology. These kinds of axioms are inessential from the logical point of view and hence are omitted here. An RBox (resp. TBox, ABox) is a finite set of RBox (resp. TBox, ABox) axioms. An ABox A is said to be extensionally reduced if it does not contain On the Web Ontology Rule Language OWL 2 RL 257 {d}I = {dI }, (DT ⊓ DR)I = DTI ∩ DRI (R− )I = (RI )−1 = {(y, x) | (x, y) ∈ RI } ⊤I = ∆Io , {a}I = {aI }, (¬C)I = ∆Io \ C I (C ⊓ D)I = C I ∩ DI , (C ⊔ D)I = C I ∪ DI (∀R.C)I = {x ∈ ∆Io | ∀y[(x, y) ∈ RI implies y ∈ C I ]} (∃R.C)I = {x ∈ ∆Io | ∃y[(x, y) ∈ RI and y ∈ C I ]} (∀σ.DR)I = {x ∈ ∆Io | ∀y[(x, y) ∈ σ I implies y ∈ DRI ]} (∃σ.ϕ)I = {x ∈ ∆Io | ∃y[(x, y) ∈ σ I and y ∈ ϕI ]} (∃σ)I = {x ∈ ∆Io | ∃y (x, y) ∈ σ I } (≤ n R.C) = {x ∈ ∆Io | #{y ∈ ∆Io | (x, y) ∈ RI and y ∈ C I } ≤ n} I (≤ n σ.DR)I = {x ∈ ∆Io | #{y ∈ ∆Id | (x, y) ∈ σ I and y ∈ DRI } ≤ n} Fig. 1. Interpretation of data ranges, inverse object roles, and complex concepts. In this figure, ϕ is of the form DR or {d}, and #Γ denotes the cardinality of the set Γ . axioms of the form C(a) with C being a complex concept (i.e., not a concept name). A knowledge base (i.e. an ontology) in OWL 2 RL is defined to be a tuple (R, T , A) consisting of an RBox R, a TBox T , and an ABox A. We may present a knowledge base as a set of axioms. An interpretation I = ∆Io , ∆Id , ·I consists of a non-empty set ∆Io called the object domain of I, a non-empty set ∆Id disjoint with ∆Io called the data domain of I, and a function ·I called the interpretation function of I, which maps – – – – – – every every every every every every individual a to an element aI ∈ ∆Io literal d to an element dI ∈ ∆Id concept name A to a subset AI of ∆Io data type DT to a subset DTI of ∆Id object role name r to a binary relation rI ⊆ ∆Io × ∆Io data role name σ to a binary relation σ I ⊆ ∆Io × ∆Id . As OWL 2 RL has no features for declaring whether two literals are equal or not, we adopt the unique name assumption for literals, which means that if d1 = d2 then dI1 = dI2 . The interpretation function is extended to interpret data ranges, inverse object roles and complex concepts as shown in Figure 1. From now on, if not stated otherwise, by an axiom we mean an RBox axiom, a TBox axiom or an ABox axiom. The satisfaction relation I |= ϕ between an interpretation I and an axiom ϕ is defined below and stands for “I validates ϕ”: – – – – I I I I |= R1 ◦ . . . ◦ Rk ⊑ S iff R1I ◦ . . . ◦ RkI ⊑ S I |= C ⊑ D iff C I ⊆ DI |= C(a) iff aI ∈ C I |= R(a, b) iff (aI , bI ) ∈ RI 258 S.T. Cao, L.A. Nguyen, and A. Szalas – I |= σ(a, d) iff (aI , dI ) ∈ σ I – I |= ϕ = ψ iff ϕI = ψ I , where ϕ and ψ may be of the form C, R, R− , DT, DR or a – I |= a = b iff aI = bI – I |= Disj(ϕ1 , . . . , ϕk ), where ϕ1 , . . . ϕk are of the form C, R or σ, iff, for all 1 ≤ i < j ≤ k, ϕIi ∩ ϕIj = ∅ – I |= Func(R) iff RI is functional (i.e. ∀x, y, z(RI (x, y) ∧ RI (x, z) → y = z)) – I |= InvFunc(R) iff RI is inverse-functional (i.e. ∀x, y, z(RI (x, z) ∧ RI (y, z) → x = y)) – I |= Irref(R) iff RI is irreflexive – I |= Sym(R) iff RI is symmetric – I |= Asym(R) iff RI is asymmetric – I |= Trans(R) iff RI is transitive – I |= Func(σ) iff σ I is functional – I |= Key(C, R1 , . . . , Rk , σ1 , . . . , σh ) iff, for every x, y ∈ C I , z1 , . . . , zk ∈ ∆Io and d1 , . . . , dh ∈ ∆Id , if {(x, zi ), (y, zi )} ⊆ RiI and {(x, dj ), (y, dj )} ⊆ σiI for all 1 ≤ i ≤ k and 1 ≤ j ≤ h, then x = y. The semantics of Key(C, R1 , . . . , Rk , σ1 , . . . , σh ) is defined according to the semantics of the HasKey constructor of [13], but note that it has a clear meaning only when all the roles R1 , . . . , Rk , σ1 , . . . , σh are assumed to be functional. When ϕ is an ABox axiom, we also say I satisfies ϕ to mean I validates ϕ. An interpretation I is called a model of an RBox, a TBox or an ABox if it validates all the axioms of the box. I is called a model of a knowledge base (R, T , A), denoted by I |= (R, T , A), if it is a model of all R, T and A. A (conjunctive) query is a formula of the form ϕ1 ∧ . . . ∧ ϕk , where each ϕi is an ABox assertion. An interpretation I satisfies a query ϕ = ϕ1 ∧ . . . ∧ ϕk , denoted by I |= ϕ, if I |= ϕi for all 1 ≤ i ≤ k. We say that a query ϕ is a logical consequence of a knowledge base (R, T , A), denoted by (R, T , A) |= ϕ, if every model of (R, T , A) satisfies ϕ. Note that, queries are defined to be “ground”. In a more general context, queries may contain variables for individuals or literals. However, one of the approaches to deal with such queries is to instantiate variables by individuals or literals occurring in the knowledge base or the query. The data complexity of OWL 2 RL (for the conjunctive query answering problem) is the complexity of checking where a query ϕ is a logical consequence of a knowledge base (R, T , A), measured w.r.t. the size of the ABox A when assuming that A is extensionally reduced and R, T and ϕ are fixed. In [1] we present examples of unsatisfiable knowledge bases in OWL 2 RL. 3 The Fragment OWL 2 RL+ We define OWL 2 RL+ to be the restriction of OWL 2 RL such that: – the constructors ¬lC, ≤ 0 R.lC, ≤ 0 R.⊤ and ≤ n σ.DR (where n is 0 or 1) are disallowed in the BNF grammar rule defining the family of rC On the Web Ontology Rule Language OWL 2 RL 259 – axioms of the forms Disj(. . .), Irref(R), Asym(R), a = b, ¬R(a, b), ¬σ(a, d) are disallowed. These restrictions correspond to the following ones for the OWL 2 RL of [13]: – the constructors superComplementOf, superObjectMaxCardinality with limit 0, and superDataMaxCardinality are disallowed in the definition of superClassProperty – axioms of the following kinds are disallowed • • • • DisjointClasses, DisjointObjectProperties, DisjointDataProperties, IrreflexiveObjectProperty, AsymmetricObjectProperty, DifferentIndividuals, NegativeObjectPropertyAssertion, NegativeDataPropertyAssertion. A query is said to be in the language of KB if it does not use predicates not occurring in KB. A positive query is a formula of the form ϕ1 ∧ . . . ∧ ϕk , where each ϕi is an ABox assertion of one of the forms a = b, rC(a), R(a, b), σ(a, d). We now recall definitions of Datalog: – A term is either a constant or a variable. – If p is an n-array predicate and t1 , . . . , tn are terms then p(t1 , . . . , tn ) is an atomic formula, which is also called an atom. – A Datalog program clause is a formula of the form ϕ1 ∧ . . . ∧ ϕn → ψ, where n ≥ 0 and ϕ1 , . . . , ϕn , ψ are atoms. The conjunction ϕ1 ∧. . .∧ϕn is called the body and ψ is called the head of the clause. The program clause is required to satisfy the range-restrictedness condition, which states that every variable occurring in the clause’s head must occur also in the clause’s body. – A Datalog program is a finite set of Datalog program clauses. Theorem 3.1 1. OWL 2 RL+ is a maximal fragment (w.r.t. allowed features) of OWL 2 RL such that every knowledge base expressed in the fragment is satisfiable. 2. Every knowledge base KB in OWL 2 RL+ can be translated into a Datalog program P which is equivalent to KB in the sense that, for every query ϕ in the language of KB, KB |= ϕ iff P |= ϕ. ⊳ Let ⊥ stands for the falsity symbol, with the semantics that ⊥I = ∅ ⊂ ∆Io . Let KB be a knowledge base in OWL 2 RL. The normal form of KB is the knowledge base obtained from KB as follows: if ¬lC occurs as an rC in the knowledge base then replace it by a fresh (new) concept name A and add to the knowledge base the axiom A ⊓ lC ⊑ ⊥. The corresponding version of KB in OWL 2 RL+ is the knowledge base obtained from the normal form of KB by deleting all axioms of the forms A ⊓ lC ⊑ ⊥, Disj(. . .), Irref(R), Asym(R), a = b, ¬R(a, b), ¬σ(a, d). Theorem 3.2. Let KB be a knowledge base in OWL 2 RL, KB′ be the normal form of KB, and KB′′ be the corresponding version of KB in OWL 2 RL+ . Then: 260 S.T. Cao, L.A. Nguyen, and A. Szalas 1. KB′ is equivalent to KB in the sense that, for every query ϕ in the language of KB, KB |= ϕ iff KB′ |= ϕ 2. if KB is satisfiable and ϕ is a positive query in the language of KB then ⊳ KB |= ϕ iff KB′′ |= ϕ. The second assertion states that if KB is satisfiable then the corresponding version of KB in OWL 2 RL+ is equivalent to KB w.r.t. positive queries. This means that, ignoring constraints and considering only positive queries, OWL 2 RL can be replaced by OWL 2 RL+ without any further loss of generality. 4 Extensions of OWL 2 RL with PTime Data Complexity In this section we first define an extension of Datalog called eDatalog. We then propose an extension OWL 2 eRL of OWL 2 RL with PTime data complexity, and an extension OWL 2 eRL+ of OWL 2 RL+ that can be translated into eDatalog. Next, we extend both OWL 2 eRL and OWL 2 eRL+ with eDatalog. 4.1 eDatalog From the point of view of OWL, there are two basic types: individual (i.e. object) and literal (i.e. data). For simplicity, we do not divide the literal type into smaller ones like natural numbers, real numbers, strings. We denote the individual type by IType, and the literal type by LType. Thus, a concept name is a unary predicate of type P (IType), an object role name is a binary predicate of type P (IType × IType), and a data role name is a binary predicate of type P (IType × LType). Extending OWL 2 RL with Datalog, apart from concept names and role names we use also a set OPreds of ordinary predicates and a set ECPreds of external checkable predicates. We assume that the sets CNames, RNames, OPreds and ECPreds are pairwise disjoint. A k-ary predicate from OPreds has type P (T1 × . . . × Tk ), where each Ti is either IType or LType. A kary predicate from ECPreds has type P (LTypek ). We assume that each predicate from ECPreds has a fixed meaning which is checkable in the sense that, if p is a k-ary predicate from ECPreds and d1 , . . . , dk are constant elements of LType, then the truth value of p(d1 , . . . , dk ) is fixed and computable. For example, one may want to use the binary predicates >, ≥, <, ≤ on real numbers with the usual semantics. We assume there are two different equality predicates, both denoted by ‘=’. The first one belongs to OPreds and has the type P (IType × IType). The second one is a binary predicate belonging to ECPreds with the usual semantics according to the unique name assumption. Extending Datalog to eDatalog, we want to drop the range-restrictedness condition. However, to allow external checkable predicates we cannot do so totally. For this reason, we distinguish a subset RRPreds ⊆ CNames ∪ RNames ∪ OPreds as the set of range-restricted predicates. We define eDatalog as follows: – A term is either an individual (of type IType) or a literal (of type LType) or a variable (of type IType or LType). If p is a predicate of type P (T1 × . . . × Tk ), On the Web Ontology Rule Language OWL 2 RL 261 and for 1 ≤ i ≤ k, ti is a term of type Ti , then p(t1 , . . . , tk ) is an atomic formula (also called an atom). An atom is ground if it contains no variables. – An eDatalog program clause is a formula of the form ϕ1 ∧ . . . ∧ ϕn → ψ, where n ≥ 0 and ϕ1 , . . . , ϕn , ψ are atomic formulas such that: • ψ is an atom of a predicate from CNames ∪ RNames ∪ OPreds • if the predicate of ψ belongs to RRPreds then every variable occurring in ψ occurs also in some ϕi whose predicate also belongs to RRPreds • every variable occurring in some ϕi whose predicate belongs to ECPreds occurs also in some atom ϕj whose predicate belongs to RRPreds – An eDatalog program is a finite set of eDatalog program clauses. – A knowledge base in eDatalog is a pair (P, A), where P is an eDatalog program and A is an ABox consisting of ground atoms of predicates from CNames ∪ RNames ∪ OPreds. Related notions for eDatalog like interpretation, model and data complexity are defined in the usual way, assuming the usual semantics for ‘=’ and the unique name assumption for literals (i.e. data constants). 4.2 OWL 2 eRL and OWL 2 eRL+ Axioms of the form Refl(R) (i.e. reflexive object property axioms) are disallowed for OWL 2 RL. The reason is probably that translating Refl(R) into Datalog we get a program clause ∀x R(x, x) which violates the range-restrictedness condition. Similarly, ⊤ is disallowed as lC in OWL 2 RL. However, these restrictions are unnecessary. The Horn fragment without function symbols of predicate logic also has PTime data complexity. Furthermore, as shown in [8], evaluation methods of Datalog can be extended to Horn knowledge bases without function symbols in predicate logic. Thus, our first proposal is to extend OWL 2 RL with the feature of ReflexiveObjectProperty axioms and allowing ⊤ as lC. Our second proposal for extending OWL 2 RL is to allow unary predicates from ECPreds to appear in the places of DataRange elements. For example, it is desirable to express concepts like the class of all laptops with price not greater than 1000 USD. Using the syntax of description logic, the concept can be written as laptop ⊓ ∃price.(≤ 1000). Here, “≤ 1000” is a unary predicate. Other useful predicates are the other comparison operators, the between operator, the operator used for checking pattern of a string. RDF or XML syntax for these operators and for constructing complex checkable predicates should be standardized. By OWL 2 eRL we denote the extension of OWL 2 RL according to the two above mentioned proposals. By OWL 2 eRL+ we denote the extension of OWL 2 RL+ by allowing axioms of the form Refl(R) (i.e. ReflexiveObjectProperty axioms), allowing ⊤ as lC, and allowing unary predicates from ECPreds to appear in the places of DR in the BNF grammar rule defining lC. Clearly, OWL 2 eRL+ is a sublanguage of OWL 2 eRL. The data complexity of OWL 2 eRL or OWL 2 eRL+ is defined as usual. 262 S.T. Cao, L.A. Nguyen, and A. Szalas Theorem 4.1 1. The languages OWL 2 eRL and OWL 2 eRL+ have PTime data complexity. 2. Every knowledge base KB in OWL 2 eRL+ can be translated into a knowledge base KB′ in eDatalog which is equivalent to KB in the sense that, for every query ϕ in the language of KB, KB |= ϕ iff KB′ |= ϕ. ⊳ 4.3 Combining OWL 2 eRL and OWL 2 eRL+ with eDatalog For the combined languages OWL 2 eRL-eDatalog and OWL 2 eRL+ -eDatalog studied here we assume that all data role names belong to RRPreds (i.e. are range-restricted predicates). A knowledge base in the combined language OWL 2 eRL-eDatalog (resp. OWL 2 eRL+ -eDatalog) is a tuple (R, T , P, A), where R is an RBox of OWL 2 eRL (resp. OWL 2 eRL+ ), T is a TBox of OWL 2 eRL (resp. OWL 2 eRL+ ), P is an eDatalog program, and A is a set consisting of ABox assertions of OWL 2 eRL (resp. OWL 2 eRL+ ) and ground atoms of ordinary predicates (from OPreds). The set A is called an ABox and its elements are called ABox assertions. A (conjunctive) query to a knowledge base of OWL 2 eRL-eDatalog (resp. OWL 2 eRL+ -eDatalog) is a formula of the form ϕ1 ∧ . . . ∧ ϕk , where each ϕi is an ABox assertion of OWL 2 eRL-eDatalog (resp. OWL 2 eRL+ -eDatalog). Other related notions are defined in the usual way. Theorem 4.2 1. The combined languages OWL 2 eRL-eDatalog and OWL 2 eRL+ -eDatalog have PTime data complexity. 2. Given a knowledge base KB = (R, T , P, A) in OWL 2 eRL+ -eDatalog, the set R ∪ T can be translated into an eDatalog program P ′ such that KB is equivalent to the eDatalog knowledge base (P ′ ∪ P, A) in the sense that, for every query ϕ in the language of KB, KB |= ϕ iff P ′ ∪ P ∪ A |= ϕ. ⊳ Example 4.3. This example involves car insurance discounts. It comes from [11]. Consider the knowledge base in OWL 2 eRL+ -eDatalog with R = ∅ and T = {∃has child.⊤ ⊑ parent, parent ⊓ male ⊑ father, parent ⊓ female ⊑ mother} P = {father(x) ∧ has child(x, y) ∧ age(y, k) ∧ k ≤ 3 → discount(x, 10), mother(x) ∧ has child(x, y) ∧ age(y, k) ∧ k ≤ 3 → discount(x, 15)} A = {female(Jane), male(Mike), male(Peter), has child(Jane, Peter), has child(Mike, Peter), age(Peter, 2)}. The query discount(x, y) to this knowledge base has answers (Jane, 15) and (Mike, 10). (The discounts are in percentage.) ⊳ On the Web Ontology Rule Language OWL 2 RL 5 263 Conclusions We have identified the maximal fragment OWL 2 RL+ of OWL 2 RL with the property that every knowledge base expressed in this fragment is satisfiable. We have also proposed extensions of OWL 2 RL and OWL 2 RL+ with PTime data complexity by allowing ReflexiveObjectProperty axioms, external checkable predicates, eDatalog program clauses, and allowing ⊤ as lC. These extensions are novel and very natural. They allow efficient computational methods (based on the ones of Datalog) and are useful for practical applications of Semantic Web. Acknowledgements. This work was supported by the National Centre for Research and Development (NCBiR) under Grant No. SP/I/1/77065/10 by the strategic scientific research and experimental development program: “Interdisciplinary System for Interactive Scientific and Scientific-Technical Information”. References 1. Cao, S.T., Nguyen, L.A., Szalas, A.: The long version of this paper (2011), Available at http://www.mimuw.edu.pl/~nguyen/owl2rl-long.pdf 2. Dunin-Kȩplicz, B., Nguyen, L.A., Szalas, A.: A layered rule-based architecture for approximate knowledge fusion. Computer Science and Information Systems 7(3), 617–642 (2010) 3. Dunin-Kȩplicz, B., Nguyen, L.A., Szalas, A.: Tractable approximate knowledge fusion using the Horn fragment of serial propositional dynamic logic. Int. J. Approx. Reasoning 51(3) (2010) 4. Eiter, T., Ianni, G., Lukasiewicz, T., Schindlauer, R.: Well-founded semantics for description logic programs in the Semantic Web. ACM Trans. Comput. Log. 12(2), 11 (2011) 5. Grosof, B.N., Horrocks, I., Volz, R., Decker, S.: Description logic programs: combining logic programs with description logic. In: Proceedings of WWW 2003, pp. 48–57 (2003) 6. Heymans, S., Eiter, T., Xiao, G.: Tractable reasoning with DL-programs over Datalog-rewritable description logics. In: Coelho, H., Studer, R., Wooldridge, M. (eds.) Proceedings of ECAI 2010, pp. 35–40. IOS Press, Amsterdam (2010) 7. Horrocks, I., Kutz, O., Sattler, U.: The even more irresistible SROIQ. In: Doherty, P., Mylopoulos, J., Welty, C.A. (eds.) Proceedings of KR 2006, pp. 57–67. AAAI Press, Menlo Park (2006) 8. Madalińska-Bugaj, E., Nguyen, L.A.: Generalizing the QSQR evaluation method for Horn knowledge bases. In: Nguyen, N.T., Katarzyniak, R. (eds.) New Challenges in Applied Intelligence Technologies. Studies in Computational Intelligence, vol. 134, pp. 145–154. Springer, Heidelberg (2008) 9. Nguyen, L.A.: On the deterministic Horn fragment of test-free PDL. In: Hodkinson, I., Venema, Y. (eds.) Advances in Modal Logic, pp. 373–392. King’s College Publications (2006) 10. Nguyen, L.A.: Constructing finite least Kripke models for positive logic programs in serial regular grammar logics. Logic Journal of the IGPL 16(2), 175–193 (2008) 264 S.T. Cao, L.A. Nguyen, and A. Szalas 11. Nguyen, L.A.: Extending the description Horn logic DHL. In: Czaja, L., Szczuka, M. (eds.) Proceedings of CS&P 2009, pp. 419–430 (2009) 12. Nguyen, L.A.: Horn knowledge bases in regular description logics with PTime data complexity. Fundamenta Informaticae 104(4), 349–384 (2010) 13. OWL 2 RL (2009), http://www.w3.org/TR/owl2-profiles/#OWL_2_RL 14. ter Horst, H.J.: Completeness, decidability and complexity of entailment for RDF Schema and a semantic extension involving the OWL vocabulary. J. Web Sem. 3(2-3), 79–115 (2005)