Undefined 1 (2012) 1–5 1 IOS Press

Efficient Query Answering over Fuzzy EL-OWL Based on Crisp Datalog Rewritable Fuzzy EL++

Afef Bahri a,∗, Rafik Bouaziz a and Faïez Gargouri a a MIRACL Laboratory, University of Sfax, Tunisia E-mail: [email protected], [email protected], [email protected]

Abstract. OWL EL is an extension of the tractable EL++ description . Despite their inference capabilities over TBoxes, DL reasoners have a high ABox reasoning which may constitute a serious limitation in the Semantic Web where we rely mainly on query answering (i.e. instance checking). The subsomption used in fuzzy EL++ reduce instance checking into satisfiability. To allow efficient instance checking and query answering over fuzzy EL-OWL, we propose in this paper two approaches for integrating fuzzy EL++ and crisp Datalog programs: homogenous and hybrid approaches. In the homogenous approach, we define crisp EL++ rules based on a crisp rewriting of fuzzy EL++. To preserve decidability, crisp EL++ rules are then written with Datalog safe ones. In the hybrid approach, fuzzy EL++ and assertions are defined with EDB facts and Datalog rules are used to denote fuzzy EL++ instance checking deduction rules. That is, DL axioms and assertions are translated into Datalog EDB facts and Datalog rules are used to derive conclusions about them.

Keywords: Fuzzy EL++, Instance checking, Homogenous and hybrid approaches, Rule based fuzzy OWL reasoning, Datalog entailment rules

1. Introduction logic programming has attracted the interest of many researches [10,12,11,8,13,9]. The rules languages which The OWL is a knowledge representation standard are subject of theses integration are the ones based proposed by the W3C Consortium. Its semantics is on Horn clausal . The integration of the two based on description logics and particularly on the ex- paradigms should play an important role in the Se- pressive SROIQ(DL). This expressivity lead to high mantic Web. In fact, despite their inference capabili- reasoning complexity and make reasoning algorithm ties over complex TBoxes, DL reasoners have a high impractical in real life applications. To solve this is- ABox reasoning complexity which may constitute a sue, three lightweight sublangages of OWL have been serious limitation in the Semantic Web where we rely introduced. We talk about OWL RL, OWL QL and mainly on query answering (i.e. instance checking). OWL EL profiles. OWL RL is the rule based fragment The subsomption algorithm used in fuzzy EL++ re- of OWL, OWL QL is a query language and OWL EL duce instance checking into concept satisfiability. That is used for conceptual modelling. OWL EL is an ex- is, to retrieve the instances of a given concept, we need ++ tended version of the EL description logic. OWL to run the subsumption algorithm for each individual EL supports, among others, local reflexivity and con- in the ABox. In Datalog systems, query answers are cept products. computed in one pass (i.e. bottom-up, top-down). Two The integration of description logics with rules and principal integration approaches are used in the lit- erature: the hybrid and the homogenous approaches. *Corresponding author. E-mail: [email protected] In the hybrid approach, the two paradigms are used

0000-0000/12/$00.00 °c 2012 – IOS Press and the authors. All rights reserved 2 to represent a knowledge bases. That is, a knowledge we begin by transforming fuzzy and roles are base KB is defined as KB = hLD, PLi where LD is mapped into crisp ones based on [4]. We define after defined with description logic and PL is defined with that, crisp EL++ rules based on DL axioms and as- Logic Programming. In hybrid approach, the reason- sertions. To preserve decidability, the obtained EL++ ing over DL is performed only by the DL rules are then mapped into safe Datalog ones. In the reasoner. The rules are used to define constraints on second approach, DL constructors are defined with the defined and rule engine are just used for EDB facts and Datalog rules are used to denote fuzzy rule execution. EL++ instance checking deduction rules. DL axioms While, in hybrid approaches, the rules and ontolo- and assertions are translated into Datalog EDB facts gies are treated separately, in homogenous ones rules and Datalog rules are used to derive conclusions about and ontology are combined in a new single logic lan- them. guage. In practice, the description logic is mapped into a rule based formalisms known as description logic programs. Such an integration approach may lead to ++ undecidability of reasoning problems due the opposite 2. Fuzzy EL and crisp Datalog programs assumption (Closed world and Open world assump- tion) of the two paradigms. Decidability may be ob- EL++ is a tractable (polynomial-time decidable) tained by restricting rules to DL-safe ones [12]. Ho- description logic proposed in [2]. The semantic of mogenous approaches perform reasoning only by rules fuzzy description logic is based on an interpretation engine. I = (∆I , ⊥I ). ∆I is a nonempty set called the domain The problem of combination of rules and ontologies whereas ⊥I is a function that associates to every con- has equally been treated for fuzzy ontologies. The ma- cept C a membership function CI :∆I → [0, 1]; and to jority of the works realized on this subject propose ho- every role R a membership function RI :∆I × ∆I → mogenous integration approaches in which fuzzy DL [0, 1]; and as for the crisp case, to every individual an programs are defined as a result of the integration of element of ∆I [14]. CI (resp. RI ) is thus interpreted fuzzy DLs and fuzzy rule languages [15]. The reason- as the membership degree function of fuzzy concept ing should be performed by fuzzy inference engines. C (respectively role R). CI (d) gives the degree of d The fact that there is no common implementation of (d ∈ ∆I ) being an element of the fuzzy concept C fuzzy rule engines, theses works have only focused on under interpretation I. A concrete domain is consid- the theoretical aspects of the integration. ered as a . A fuzzy domain is defined with a In this paper we focus on the problem of combina- pair (∆D,ΦD) where ∆D is an interpretation domain tion of the fuzzy EL++ with crisp rule language for and ΦD is a set of fuzzy predicates d of arity n and tractable query answering over large scale ABoxes. We D n an interpretation d : ∆D → [0, 1]. For example, propose in this paper two integration approach of the Large is a fuzzy predicate which measures the degree two paradigms: in the first one we adopt a tight inte- of largeness of the width of a given country c and may gration approach in the sense that a unified language be defined with a trapezoidal membership function as and semantics are used to represent the two paradigms shown in figure 1. We may define the fuzzy concept (homogenous like). The crisp Datalog rule language GreatCountry is a fuzzy concept and is defined as acts as a unified language and Datalog based system follows: correspond to the unique framework in which various reasoning tasks are realized. In the second, a loose GreatCountry = Country u ∃width.Large coupled integration approach (hybrid like), the two paradigms act separately but in a complementary way. That is, fuzzy DL reasoners are used to reason over the TBox of the ontology and crisp Datalog inference The fuzzy predicates used in this paper are defined as engines reason over the ABoxes for instance checking follows : and query answering. As we want to work with crisp Datalog program, we – Trapezoidal : trz(u,v,w,o) need to represent fuzzy ontology axioms and asser- – Triangular : tri(u,v,w) tions with crisp Datalog predicates. Two approaches – Left shoulder : ls(u,v) are equally used in this paper. In the first approach, – Right shoulder : rs(u,v) 3

3. Homogenous approach for integrating fuzzy µLarge(width) EL++ and Datalog programs 6 We propose in this section an homogenous approach ++ 1 L for integration fuzzy EL description logic and crisp L Datalog programs. Fuzzy concept and roles axioms L and assertions are then represented used crisp Data- L log rules. The algorithm that we adopt to transform an L - ++ u v w o width EL fuzzy knowledge base into a Datalog program is defined as follows: Fig. 1. Trapezoidal representation of the linguistic term Large 1. Normalization of fuzzy EL++. ++ The fuzzy EL++ description logic is based on four dis- 2. Mapping of normalized fuzzy EL into crisp EL++. joint finite sets : the set of fuzzy concept names NC , 3. Definition of EL++ rules. the set of fuzzy role names NR, the set of individual 4. Mapping EL++ rules into Datalog rules. names NI and the set of fuzzy predicates ΦD. We give in table 1 the syntax and the semantics of fuzzy EL++. A fuzzy CBox is in normal form if: 1. all GCIs have one of the following forms: Syntax DL Semantic C1 vα D, C1 vα ∃r.C1, ⊥ ⊥I = 0 > >I = 1 C1 u C2 vα D, ∃r.C1 vα D I I I C1 u C2 (C1 u C2) (a) = min(C1 (a),C2 (a)) I where, C1, C2 ∈ BCC and D ∈ BCC ∪ {⊥}. {α1/a1, ..., αn/an}{α1/a1, ..., αn/an} (a) = supi|a=aI αi i I I I 2. all RIs are of the form r v s or r1 ◦ r2 v s (we ∃ r.C (∃r.C) (a) = supb∈∆I {min(r (a, b),C (b))} I I D use a crisp definition of RIs). ∃ r.D (∃r.D) (a) = supb∈∆n {min(r (a, b), d (b))} D I I C1 vα C2 α ≤ infa∈∆I {ψ(C1 (a),C2 (a))} ++ I I I 3.1. Crisp representation of fuzzy EL r1 ◦ ... ◦ rk v s [r1 ◦ ... ◦ rk ](x, y) ≤ s (x, y)

C,C1,C2 ∈ NC , D ∈ ΦD , r1, ..., rk, s, r ∈ NR, a, b ∈ N and α ∈ [0, 1] We present in this section a crisp representation of I ++ Table 1 fuzzy EL based on the works of Bobillo and al. Syntax and semantics of fuzzy EL++ [3,5]. The principle of crisp representation of fuzzy DLs is based on the definition of new crisp concepts A fuzzy constraint box (CBox) is a finite set of Gen- and rôles as α−cuts of fuzzy ones. The set of degrees eral fuzzy Concept Inclusions (GCIs) and fuzzy role of degrees to be considered for the definition of theses α−cuts depends on the semantic used for the defini- inclusions (RIs). Given an interpretation I = (∆I , ·I ), tion of logic operators {⊕, ⊗, ª, ⇒}. That is, we ob- I is a model of a CBox, if it is a model for each GCI tain different sets of d.o.m if we transform a fuzzy DL and RI of the CBox, in other words, if the conditions based on Gödel or Zadeh [4] or on Lukasiewicz [6]. given in the table 1, column semantic are satisfied. I Equally, the number of degrees to be considered may is a model of a fuzzy concept inclusion C1 vα C2 if I I influence the complexity of reasoning as the cardinal- inf I {ψ(C (a),C (a))} ≥ α. a∈∆ 1 2 ity of the obtained crisp knowledge base depends on Given a A fuzzy EL++ CBox C, BC is the smallest set the number of d.o.m and by the way the number of ob- of concept description that contains all the fuzzy con- tained αcuts. cept names in C, the top concept >, fuzzy predicates Given a fuzzy EL++ knowledge base FK, the princi- and nominals appearing in C. C is normalized if: ple of transformation of this FK into a crisp knowl- 1. all the GCIs have one of the following forms: edge base K is defined as follows:

C1 vα D, C1 vα ∃r.C2, – Definition of crisp concepts and roles as α−cuts C1 u C2 vα D, ∃r.C1 vα D of fuzzy ones from FK. Based on Zadeh seman- tics, the set of d.o.m N to be considered is defined C , C ∈ BC et D ∈ BC ∪ {⊥}. 1 2 as follows: 2. all the RIs have one of the following forms: FK FK r vα s or r1 ◦ r2 v s. N = X ∪ {1 − α|α ∈ X } XFK = {0, 0.5, 1} ∪ {γ|hτ ./ γi ∈ FK} 4

For each fuzzy concept C ∈ FK and α, β ∈]0, 1] and a set of predicate NP . We have, C ∪ R ∪ D D defined in N , two crisp concepts C>α and C≥β P ⊆ NP . A term in an element of V ∪ NI ∪ ∆ . We are defined in the crisp knowledge base K. Theses consider two terms t and u defined in V ∪ NI , n terms two concepts corresponds to the set of individuals defined in ∆D a concept C ∈ C and a role r ∈ R which belong respectively to C with a degree ≥ α and a concrete predicate of arity n p ∈ PD. An EL++ > β. The same is for fuzzy roles. atom has the forms C(t), R(t, u) et p(t1, ..., tn). A non – In order to preserve reasoning, new subsumption EL++ atom is defined with predicate symbols 6∈ C ∪ axioms are defined between crisp concepts. Then, R ∪ PD. An EL++ rule has the following form: for each fuzzy concept C and for each α ∈]0, 1] H ← B and β ∈ [0, 1] defined in N with α > β, the fol- lowing axioms are defined in the knowledge base where B and H are conjunction of EL++ atoms. K:

++ ++ C≥α v C>β Crisp EL EL rules ABox

Equally, for each γ ∈ N , we have: ha : C≥αi C≥α(a) ← h(a, b): R≥αi R≥α(a, b) ← C>γ v C≥γ CBox The same is for fuzzy roles. C v ⊥ ⊥ ← C(t) C>1−α v E≥α E≥α(t) ← C>1−α(t) – Crisp rewriting of fuzzy axioms as shown in table C>1−α u D>1−α v E≥α E≥α(t) ← C>1−α(t) ∧ D>1−α(t) 2. C>1−α v E≥α u F≥α E≥α(t) ← C>1−α(t) F≥α(t) ← C>1−α(t) ∃R>1−α.C>1−α v E≥α E≥α(t1) ← R>1−α(t1, t2) ∧ C>1−α(t2) ++ ++ EL flou EL exacte C>1−α v ∃R≥α.E≥α E≥α(t2) ← C>1−α(t1) ∧ R≥α(t1, t2) ABox {ai|αi > 1 − α, i : 1..n} v C≥α C≥α(ai) ← (pour i : 1..n) p>1−α(f1, ..., fk) v C≥α C≥α(t) ← p>1−α(f1, ..., fk)(t) ha : C, αi ha : C≥αi C>1−α v p≥α(f1, ..., fk) p≥α(f1, ..., fk)(t) ← C>1−α(t) h(a, b): R,αi h(a, b): R i ≥α r1 ◦ r2 v s s(x1, x3) ← r1(t1, t2) ∧ r2(t2, t3) CBox Table 3 ++ ++ C vα EC>1−α v E≥α Mapping EL into EL rules. C u D vα EC1−α u D>1−α v E≥α ∃R.C vα E ∃R>1−α.C>1−α v E≥α We present in table 3, the mapping of an EL++ knowl- C vα {α1/a1, ..., αn/an} C>1−α v {ai|αi ≥ α, i : 1...n} edge base K into an EL++ rule base RB. As we can p(f1, ..., fk) vα C p>1−α(f1, ..., fk) v C≥α see K are RB semantically equivalent and my that is r1 ◦ r2 v s r1 ◦ r2 v s induce the same facts. As we can see, each EL++ as- Table 2 sertion is transformed into a fact. Except the one de- Crisp rewriting fuzzy normalized EL++ axioms. fined with nominals, each EL++ is transformed into one rule. The axiom defined with nominals is

++ transformed into n facts where n corresponds to the Theorem 3.1 Crisp representation of fuzzy EL un- number of nominals used in the axiom. We may then der Zadeh semantic is correct. deduce the following proposition. 3.2. EL++ rules definition Proposition 3.1 Given an EL++ knowledge base KB, the algorithm maps KB into an EL++ rule base RB We present in this section the third step of fuzzy in linear time and is correct. Given, a concept or role EL++ Datalog rewriting algorithm. The EL++ knowl- assertion τ and ρ(τ) the fact obtained as a result of edge base K is mapped into an EL++ rule base RB. the mapping of τ, we have: KB |= τ ssi RB |= ρ(τ). We propose in the following a definition for EL++ rules. 3.3. Mapping EL++ rules into safe Datalog rules Definition 3.1 EL++ rules. Given a description logic To define the syntax of Datalog we need some basic DL with a set of concept expressions C, a set of roles concepts. A term is defined as follows: expressions R, a set of individual names NI , a finite set of variables V and a set of concrete predicates PD – Every constant is a term. 5

– For every n-ary predicate p and vector (t1, ..., tn) 2. All the variables of a rule have to appear in at of terms, p(t1, ..., tn) is a term. least one abstract predicate. – A constant term contains no variables. Definition 3.5 An EL++ rule r is a safe Datalog rule 0 An atom has the form p(t1, ..., tn) where the t s are iff: terms and p is a predicate of arity n. An atom is ground if no variables occur on it. – All the predicates defined on r have one of the following forms: Definition 3.2 A Datalog program P is a finite set of rules (or function-free Horn clauses) of the form: C(t), r(t, u), p(t1, ..., tn), O(t) C ∈ C, r ∈ R, p ∈ PD, O ∈ EDB and t, u ∈ a ← b1, ..., bn D NI ∪ V ∪ NI and ti ∈ ∆ . – All the variables that occur in the head of r occur where a and b are positive atoms. The left-hand side i in at least one atom in the body of the rule. is called the head of the rule and the right-hand side is – All the variables that occur in the head of a r called the body of the rule. When the body of the rule should occur in at least one non-EL++ atom in is empty, the rule is called a fact. the body of the rule. Given a Datalog program P , the predicates that appear – Concrete predicates occur only in the body of the only in the body of the program’s rules are called edb rule. (extensional database) predicates, while those that ap- – All the variables of a rule have to occur in a least pear in the head of a given rule are called idb (inten- one abstract predicate. sional database) predicates. We present in this section the last step of the algo- Concrete predicate used in EL++ rules are based on rithm which consists on the mapping of EL++ rules fuzzy concrete predicates used to define membership into Datalog rules. As a description logic, the assump- functions. The fuzzy concrete predicates are trans- tion world of EL++ logic is made on Open World As- formed into crisp ones based on the same princi- sumption opposed to the Closed World Assumption of ple adopted for the definition of fuzzy concepts and Datalog programs. In a Datalog program, all the in- roles. Crisp concrete predicates are defined as α-cuts stances of a concept or a role are defined in the as- of fuzzy concrete predicates. We propose in this sec- sertional level, while an EL++ knowledge base may tion an approach to represent fuzzy concrete predicates induce new “unkown” instances not explicitly defined (membership functions) and their α-cuts with Datalog in the assertion level. In logic programs, the definition built-in. The idea is to define membership functions of a model with an infinity of elements may lead to corresponding to theses concrete predicates with Dat- a problem of calculability and complexity. In order to alog rules. We present in table 4, the principle of this resolve this problem, we need to defined then EL++ approach applied to fuzzy concretes predicates cor- safe rules. responding to trapezoidal and triangular membership functions. Definition 3.3 A rule r is safe if all the variables that occur in the head of the rule occur at least in one atom Trapezoidal T : a, b, c, d of the body of the rule. T (t, 0) ← t <= a Definition 3.4 A rule r is EL++ safe if all its variables T (t, 0) ← t >= d occur in at least one non-EL++ predicate in the body T (t, 1) ← t > c, t < d of the rule. T (t, v) ← t > a, t < b, t = v ∗ (b − a) + a T (t, v) ← t > c, t < d, t = v ∗ (d − c) + d ++ The description logic EL supports the definition of Triangular A : a, m, b concrete domains. We recall that, concrete domains are A(t, 0) ← t <= a ++ used in fuzzy EL to define membership functions. A(t, 0) ← t >= b In Datalog, concrete domains are defined with what we A(t, v) ← t > a, t <= m, t = v ∗ (m − a) + a call Datalog built-ins. We define in the following two A(t, v) ← m < t, t < b, t = v ∗ (b − m) + b restrictions made on Datalog concrete predicate: Table 4 1. Concrete predicates should only appear in the Rewriting fuzzy concrete predicates with Datalog. body of a rule. 6

Example 1 We consider the two fuzzy concrete pred- Adult≥0.6(t) ← Y oung>0.4(t) icates Y oung and Adult defined with trapezoidal This rule is transformed into a safe Datalog rule as membership functions: T : 15, 20, 30, 35 for Y oung follow: concrete predicate and T : 20, 25, 55, 60 for Adult concrete predicate. The definition of theses fuzzy con- ⊥ ← Adult<0.6(t), Y oung>0.4(t) crete predicate with Datalog is realized as follows : Adult≥0.6(t) et Y oung>0.4(t) are defined based on Young(t,0) ← t <= 15 example 1 as follows: Young(t,0) ← t >= 35 Adult (t) ← Adult(t, v), v < 0.6 Young(t,1) ← t > 20, t < 35 <0.6 Y oung (t) ← Y oung(t, v), v > 0.4 Young(t,v) ← t > 15, t < 20, t = v ∗ 5 + 15 >0.4

Young(t,v) ← t > 30, t < 35, t = v ∗ 5 + 35 ++ Adult(t,0) ← t <= 20 Given an EL rule knowledge base RB, the rewrit- Adult(t,0) ← t >= 60 ing of RB into a safe Datalog program P(RB) is de- Adult(t,1) ← t > 25, t < 55 fined as follows: ++ Adult(t,v) ← t > 20, t < 25, t = v ∗ 5 + 15 1. EL rules of the form p≥α(f1, ..., fk)(t) ← Adult(t,v) ← t > 55, t < 60, t = v ∗ 5 + 60 C>1−α(t) are mapped into rules of the form:

The α-cuts concrete predicates may be defined as fol- ⊥ ← C>1−α(t), p<α(f1, ..., fk)(t) lows: 2. Define fuzzy concrete predicates with Datalog built-in. Young≥α(t) ← Young(t,v), v >= α 3. Define rules for each α−cut concrete predicate. Based on this principle, the α-cuts of a fuzzy concrete 4. For each variable t defined in a rule, add a predi- predicate p may be defined with Datalog rules as fol- cate O(t) in the head of the rule (safe EL++ rule lows: see definition 3.4). 5. Add a fact O(a) for each individual a ∈ NI . p≥α(t) ← p(t, v), v >= α p>α(t) ← p(t, v), v > α Proposition 3.2 The transformation of an EL++ rule base RB into a Datalog program P(RB) is correct. Except the rule p≥α(f1, ..., fk)(t) ← C>1−α(t), the ++ EL rules of table 3 are safe Datalog rules. In fact, 3.4. Discussion of the homogenous approach and the rule p≥α(f1, ..., fk)(t) ← C>1−α(t) is not a safe implementation issues Datalog rule as its head contain a concrete predicate. This rule corresponds to the fuzzy axiom C vα p In this section, we presented an homogenous ap- which is transformed into a crisp axiom C>1−α v proach for integrating the fuzzy EL++ description p≥α(f1, ..., fk). This subsumption may be written as logic and Datalog programs. The particularity of this follows [?]: approach consists on the fact that the integration is re- alized between fuzzy and crisp based logics. In fact, C>1−α u ¬p≥α(f1, ..., fk) v ⊥ many implementation exist of crisp Datalog systems As ¬p≥α(f1, ..., fk) = p<α(f1, ..., fk) (µ¬p(f1,...,fk)(t) = which is not the case of fuzzy ones. The problem that 1 − µp(f1,...,fk)(t)), we obtain after that: we found in this approach is the number of degrees to be considered to define the α-cuts of fuzzy concepts C>1−α u p<α(f1, ..., fk) v ⊥ and roles. In fact, this number influence the complex- We may rewrite this crisp inclusion with a safe Datalog ity of reasoning as it depends on the size of the knowl- rule as follows: edge base. As it is shown in [4], while the size of a crisp TBox is larger then the size of the corresponding ⊥ ← C>1−α(t), p<α(f1, ..., fk)(t) fuzzy TBox, an ABox has the same number of axioms Example 2 Let us consider the fuzzy inclusion Y oung v0.6 as the original fuzzy ABox. Concerning reasoning, this Adult defined with two fuzzy concrete predicate Y oung approach need one rule based reasoner to realize infer- and Adult. This inclusion is defined with a EL++ rule ences on TBox and on ABox. Our rule based represen- as follows: tation of fuzzy EL++ may be enriched with OWL-EL 7 constructors such as local reflexivity or concept prod- Fuzzy DL Crisp datalog facts ucts. In fact, we may use the ELP rule language which r ∈ NR role(r) C ∈ NC (C) is a tractable fragment of the OWL2 supporting the a ∈ NI nominal(a) majority of OWL-EL constructors [11]. The authors of h a:C, αi type(a,c,α) [11] propose a polynomial reduction of ELP knowl- h(a, b): r, αi triplet(a,r,b,α) edge bases to a specific kind of Datalog programs that C vα D subClassOf(C,D,α) C1 u C2 vα D conjunctionOf(C1,C2,D,α) can be evaluated in polynomial time. C1 vα ∃r.D extRes(r,C1,D,α) − ∃r.C1 vα D extRes (C1,r,C2,α) {α1/a1, ..., αn/an} vα D D(ai,min(α,αi)) for i : 1...n ++ 4. Hybrid approach for integrating fuzzy EL r vα s subPropertyOf(r,s,α) and crisp Datalog programs r ◦ s v t propertyChain(r,s,t) C,C1,C2 ∈ BC, D ∈ BC ∪ {⊥} r, s, t ∈ NR, a, b, ai ∈ NI and α, αi ∈ [0, 1] We present in this section an hybrid approach to rep- Table 5 ++ resent fuzzy EL knowledge base using crisp Dat- of fuzzy EL++ constructors into Datalog facts alog programs. In this approach, DL constructors are defined with EDB facts and Datalog rules are used to ++ denote fuzzy EL++ instance checking deduction rules. spond to completion rules used in fuzzy EL . We In this sense, DL axioms and assertions are translated present in table 6 T-entailment rules defined with Dat- into Datalog EDB facts and Datalog rules are used to alog. We define in the following the predicates sym- derive conclusions about them. We present in table 5 bols: the translation of fuzzy DL constructors into Datalog – SC: SubClassOf predicate. facts. We may classify these facts into three classes: – SP : SubPropertyOf predicate. – Terminological predicates: subClassOf, conjunc- – ER and ER−: Existential restriction. − tionOf, extRest, extRest , subPropertyOf, prop- – Conj(C1,C2, D, α): ConjonctionOf predicate. ertyChain. Theses facts correspond to fuzzy ax- – PC(r, s, t): PropertyChain predicate. ioms defined with fuzzy abstract roles and con-

cepts. T-entailment rules

– Concrete predicates: these predicates correspond SC(C,D,α) ← SC(C,C1,α), SC(C1,D,β), α <= β to fuzzy concrete predicates used to define mem- SC(C,D,β) ← SC(C,C1,α), SC(C1,D,β), β < α bership functions (trapezoidal, triangular, left SC(C,D,α) ← SC(C,C1,α), SC(C,C2,β), Conj(C1,C2,D,γ), α <= β, α <= γ shoulder, right shoulder). SC(C,D,β) ← SC(C,C1,α), SC(C,C2,β), Conj(C1,C2,D,γ), β < α, β < γ SC(C,D,γ) ← SC(C,C1,α), SC(C,C2,β), Conj(C1,C2,D,γ), γ < α, γ < β – Assertional predicates: theses predicates corre- ER(r,C,D,α) ← SC(C,C1,α), ER(r,C1,D,β), α <= β spond to fuzzy assertions in description logics. ER(r,C,D,β) ← SC(C,C1,α), ER(r,C1,D,β), β < α We have a particular case in which fuzzy axiom ER(s,C,D,α) ← ER(r,C,D,α), SP(r,s,β), α <= β {α /a , ..., α /a } v D is translated into a ER(s,C,D,β) ← ER(r,C,D,α), SP(r,s,β), β < α 1 1 n n α ER(t,C,D,α) ← ER(r,C,D,α), ER(s,C,D,β), PC(r,s,t), α <= β set of fuzzy assertional predicates. Equally, an as- ER(t,C,D,β) ← ER(r,C,D,α), ER(s,C,D,β), PC(r,s,t), β < α

sertional predicate may correspond to a concrete C,C1,C2 ∈ BC, D ∈ BC ∪ {⊥} r, s, t ∈ NR and α, β, γ ∈ [0, 1] predicate if the fuzzy concept for which the as- Table 6 sertion is defined correspond to a fuzzy concrete T-entailment Datalog rules predicate (i.g. the fuzzy assertion ha:Young,αi where Y oung is a fuzzy concrete predicate is translated into the fact Y oung(a, α)). 4.2. A-entailment rules Based on our classification of fuzzy EL++ Data- log predicates, we define three classes of entailment A-entailment rules rules contain only fuzzy asser- rules: T-entailment rules, C-entailment rules and A- tional predicates in their conclusion and are used for entailment rules. instance checking. We define in table 7 A-entailment rules defined with Datalog. The predicates symbols 4.1. T-entailment rules used in table 7 are defined as follows: T-entailment rules contain only fuzzy terminologi- – type(a, C, α): a fuzzy concept assertion. a is an cal predicates in their conclusion. Theses rules corre- instance of the fuzzy concept C with a degree α. 8

– triplet(a, r, b, α): a fuzzy role assertion. a and b base. The problem is more challenging here as we need are related with r with a degree α. to do that between fuzzy description logic reasoning system (i.g. fuzzyDL [7]) and crisp rule inference en- A-entailment rules gine. type(a,a,1) ← nominal(a) type(a,C,α) ← type(a,C,α), SC(C,D,β), α <= β type(a,C,β) ← type(a,C,α), SC(C,D,β), β < α type(a,c,α) ← type(a,b,α), nominal(b), type(b,c,β), α <= β type(a,c,α) ← type(a,b,α), nominal(b), type(b,c,β), β < α 5. Conclusion and future works type(b,c,α) ← type(a,b,α), nominal(b), type(a,c,β), α <= β type(b,c,α) ← type(a,b,α), nominal(b), type(a,c,β), β < α We propose in this paper two approaches for inte- type(a,D,α) ← type(a,C1,α), type(a,C2,β), Conj(C1,C2,D,γ), α <= β, α <= γ ++ type(a,D,β) ← type(a,C1,α), type(a,C2,β), Conj(C1,C2,D,γ), β < α, β < γ grating fuzzy EL and crisp Datalog programs. This type(a,D,γ) ← type(a,C1,α), type(a,C2,β), Conj(C1,C2,D,γ), γ < α, γ < β − integration is realized to allow efficient instance check- type(a,D,α) ← ER (r,C1,D,α),triplet(a,r,b,β), type(b,C1,γ), γ < α, γ < β − ing and query answering over fuzzy EL-OWL. In the type(a,D,β) ← ER (r,C1,D,α),triplet(a,r,b,β), type(b,C1,γ), β < α, β < γ − type(a,D,γ) ← ER (r,C1,D,α),triplet(a,r,b,β), type(b,C1,γ), γ < α, γ < β first approach, we propose an algorithm to realize the triplet(a,r,b,α) ← triplet(a,s,b,α), SP(r,s,β), α <= β mapping of fuzzy EL++ knowledge base to a crisp triplet(a,r,b,β) ← triplet(a,s,b,α), SP(r,s,β), β < α triplet(a,t,b,α) ← PC(r,s,t,α), triplet(a,r,b,β), triplet(a,s,b,γ), α <= β, α <= γ Datalog program. We first realize a crisp rewriting of ++ ++ triplet(a,t,b,β) ← PC(r,s,t,α), triplet(a,r,b,β), triplet(a,s,b,γ), β < α, β < γ fuzzy EL . We define after that EL rules which triplet(a,t,b,γ) ← PC(r,s,t,α), triplet(a,r,b,β), triplet(a,s,b,γ), γ < α, γ < β are then rewritten using safe Datalog programs. In the triplet(a,r,b,α) ← type(a,c,α), nominal(c), triplet(c,r,b,β), α <= β ++ triplet(a,r,b,β) ← type(a,c,α), nominal(c), triplet(c,r,b,β), β < α second approach, fuzzy EL axioms and assertions

C,C1,C2 ∈ BC, D ∈ BC ∪ {⊥}, r, s, t ∈ NR, are defined with EDB facts and Datalog rules are used ++ a, b, c ∈ NI and α, β, γ ∈ [0, 1] to denote fuzzy EL instance checking deduction Table 7 rules. That is, DL axioms and assertions are translated A-entailment Datalog rules. into Datalog EDB facts and Datalog rules are used to derive conclusions about them. Concerning C-entailment rules, the same principle The size of the knowledge base in the homogenous ap- adopted in the homogenous approach for the definition proach depends on the number of degrees used to de- of fuzzy concrete predicates (membership functions) fine the α-cut of fuzzy concepts and roles. This num- is equally used in this approach. That is, trapezoidal and triangular membership functions defined in table 4 ber may lead to a crisp TBox larger then the size of correspond to some examples of C-entailment rules. the corresponding fuzzy TBox. Nevertheless, a crisp ABox has the same number of axioms as the original 4.3. Discussion of the hybrid approach and fuzzy ABox. The advantage of this approach consists implementation issues on the fact that we use one reasoner to realize infer- ences on the TBox and the ABox levels. In the hybrid We presented in this section an hybrid approach for approach, the number of rules does not depends on the integrating the fuzzy EL++ description logic and crisp number of used membership degrees and crisp ABox Datalog programs. In this approach, rule based sys- still have the same size the original fuzzy one. The is- tems are only used to reason on the ABox. We thus sue of this approach is the necessity of two reasoner need fuzzy DL reasoner to reason on the TBox level. ++ systems for the TBox and the ABox levels. An inter- After translating a fuzzy EL knowledge base to a facing mechanism is needed between the two reasoner Datalog facts, we may compute all the consequences in order to preserve the coherence of the hole knowl- of theses facts in a bottom-up fashion. Nevertheless, edge base. The homogenous approach may be imple- adopting the same principal for TBox reasoning (i.e. Classification) may lead to exponential complexity. mented using existent Datalog based system such as Class subsumption, for example may be reduced to in- KAON. Actually, we worked on the development of stance checking. That is C v D iff for each assump- an inference engine based on the hybrid approach us- tion D(a) we need to run instance checking for C(a). ing FLORA-2 and XSB. We project to use this in- The use of separate reasoning system for the TBox and ference engine for the implementation of an extended the ABox levels may require an interfacing mechanism version our fuzzy semantic annotation query language in order to maintain the coherence of the knowledge (FSAQL) proposed in [1]. 9

References swering over Ontologies,” Proceedings of the twenty-eighth ACM SIGMOD-SIGACT-SIGART symposium on Principles of [1] A. Bahri, R. Bouaziz, F. Gargouri, “Querying Fuzzy RDFS Se- database systems, New York, USA, 2009. mantic Annotations,” Proc. IEEE International Conference on [9] Thomas Eiter, Giovambattista Ianni, Thomas Lukasiewicz, Ro- Fuzzy Systems, Barcelona, Spain, 2010, accepted. Schindlauer, “Well-founded semantics for description logic [2] F. Baader, S. Brandt, and C. Lutz, Pushing the EL Envelope, In programs in the semantic web,” Transactions on Computational Proceedings of the Nineteenth International Joint Conference on Logic (TOCL), ACM, Volume 12 Issue 2, January 2011. Artificial Intelligence (IJCAI-05), Morgan-Kaufmann Publish- [10] U. Hustadt, “Description Logics and Disjunctive Datalog U˚ ers, 2005. The Story so Far,” Ian Horrocks, Ulrike Sattler, and Frank [3] F. Bobillo, M. Delgado, J. Gómez-Romero, “A Crisp Repre- Wolter, editors, Proceedings of the 2005 International Workshop sentation for Fuzzy SHOIN with Fuzzy Nominals and General on Description Logics (DL2005), Edinburgh, Scotland, UK, July Concept Inclusions‘,” Proc. of the 2nd Workshop on Uncer- 26-28, 2005. tainty Reasoning for the Semantic Web (URSW 2006), CEUR [11] Markus Krötzsch, Sebastian Rudolph, Pascal Hitzler In: Amit Workshop Proceedings 218, Athens (Georgia, USA), November Sheth, Steffen Staab, Mike Dean, Massimo Paolucci, Diana 2006. Maynard, Timothy Finin, Krishnaprasad Thirunarayan (eds.), [4] F. Bobillo Ortega, “Managing in Ontologies,” PhD “ELP: Tractable Rules for OWL 2”, The Semantic Web - ISWC Dissertation, University of Granada, Spain, 2008. 2008, 7th International Semantic Web Conference, Springer [5] F. Bobillo, M. Delgado, J. Gómez-Romero,” Optimizing the Lecture Notes in Vol. 5318, 2008, pp. 649- Crisp Representation of the Fuzzy Description Logic SROIQ, 664. Reasoning for the Semantic Web I, Lecture Notes [12] Boris Motik, Ulrike Sattler, Rudi Studer, “Query Answering in Computer Science 5327, pp. 189-206, 2008. for OWL-DL with rules,” Journal of Web Semantics, pp 41-6O, [6] F. Bobillo and Umberto Straccia, “Towards a Crisp Represen- 2005. tation of Fuzzy Description Logics under Lukasiewicz seman- [13] Boris Motik, Riccardo Rosati, “Reconciling description logics tics,” Porc. of the 17th International Symposium on Methodolo- and rules,” Journal of the ACM, Vol. 57, Num. 5, 2010. gies for Intelligent Systems (ISMIS-08), Lecture Notes in Com- [14] U. Straccia, “Reasoning with fuzzy description logics,” Jour- puter Science, Toronto, Canada. nal of Artificial Intelligence, vol. 14, pp. 137–166, 2001. [7] F. Bobillo, U. Straccia, “fuzzyDL: An Expressive Fuzzy De- [15] T. Venetis, G. Stoilos, G. Stamou, and S. Kollias, “f-DLPs: Ex- scription Logic Reasoner,” Proc. of the 17th IEEE International tending Description Logic Programs with Fuzzy Sets and Fuzzy Conference on Fuzzy Systems (FUZZ-IEEE 2008), pp. 923-930, Logic,” IEEE International Conference on Fuzzy Systems, July, Hong Kong (China), June 2008. 23-26, 2007, London, UK. [8] Andrea Cali, Georg Gottlob, and Thomas Lukasiewicz, “A General Datalog-Based Framework for Tractable Query An-