• Aucun résultat trouvé

Materialization Calculus for Contexts in the Semantic Web

N/A
N/A
Protected

Academic year: 2022

Partager "Materialization Calculus for Contexts in the Semantic Web"

Copied!
21
0
0

Texte intégral

(1)

Materialization Calculus for Contexts in the Semantic Web

Loris Bozzato and Luciano Serafini

Fondazione Bruno Kessler, Via Sommarive 18, 38123 Trento, Italy {bozzato,serafini}@fbk.eu

Abstract. Representation of context dependent knowledge in the Semantic Web is becoming a recognized issue and a number of DL-based formalisms have been proposed in this regard: among them, in our previous works we introduced the Contextualized Knowledge Repository (CKR) framework. In CKR, contexts are organized hierarchically according to a broader-narrower relation and knowledge propagation across contexts is limited among contexts hierarchically related. In several applications, however, this structure is too restrictive, as they demand for a more flexible and scalable framework for representing and reasoning about contextual knowledge.

In this work we present an evolution of the original CKR (based on OWL RL), where contexts can be organized in any graph based structure (declared as a meta- knowledge base) and knowledge propagation is allowed among any pair of con- texts via a new ”evaluate-in-context” operator. In particular, we detail a mate- rialization calculus for reasoning over the revised CKR framework and prove its soundness and completeness. Moreover, we outline the current implementation of the calculus on top of SPRINGLES, an extension of standard RDF triple stores for representing and rule-based inferencing over multiple RDF named graphs.

1 Introduction

Representation of context dependent knowledge in the Semantic Web is becoming a recognized issue and a number of DL-based formalisms have been proposed in this re- gard: among them, in our previous works we introduced the Contextualized Knowledge Repository (CKR) framework [13, 4, 2]. In a CKR, each context is associated with a set of formulae that hold under the same circumstances, which are specified by a set of dimensional attributes associated to the context (e.g.time,space,topic,authoror access-permissions). In CKR, as proposed in [13], the values of contextual attributes were organized hierarchically according to a broader-narrower relation. For instance the geographical value “Italy” is narrower than “Europe”, the time attribute “2010” is narrower than “21st century”, and the topic attribute “football” is narrower than “sport”.

This structure induces a hierarchical (coverage) relation between contexts. For exam- ple, the context associated to Italian football during 2010 is covered by the context for European sports in the 21st century. Coverage relation regulates the propagation of knowledge across contexts, which is limited among contexts hierarchically related.

Practical applications, however, show that this structure might be too restrictive and demand for a more flexible and scalable representation of contextual knowledge. For

(2)

example, it is often necessary to: associate a type (e.g.Event) to a set of contexts and characterize it by a set of axioms; use in a context the interpretation of a complex expression from a possibly unrelated class of contexts. For this reason, in this work we extend and generalize the original CKR framework by the following two aspects:

1. Generalizing contextual structure:hierarchical contextual attributes are replaced with a generic graph structure specified by a DL knowledge base, containing individual names to denote contexts (i.e. contexts IDs), identifiers for contextual attributes values, and binary relations that allow to specify the relations and contextual attributes for each context. This generalization enables also the introduction of context classes, prototypi- cal contexts that represent homogeneous classes of contexts.

2. Generalizing knowledge propagation:we introduce theevaloperator, a primitive that allows to refer to the extension of a concept (or role) in another set of contexts.

For instance the subsumptionc1 :eval(A,C)vAcan be used to state that the exten- sion of conceptAin contexts of typeCis contained in the extension ofAinc1. This subsumption enable to propagate the information ofAfrom contexts inCtoc1. Over this generalized version of CKR, we detail a materialization calculus for instance checking and prove its soundness and completeness1. Moreover, we outline its current implementation on top of SPRINGLES, an extension of standard RDF triple stores for representing and rule-based inferencing over multiple RDF named graphs.

2 Preliminaries: SROIQ-RL

In the following we assume the usual presentation of description logics [1] and defini- tions2for the logicSROIQ[6].

OWL RL [12] is basically defined on a restriction ofSROIQsyntax: in the fol- lowing we call such restricted languageSROIQ-RL. The language is obtained by lim- iting the form of General Concept Inclusion axioms (GCIs) and concept equivalence of SROIQtoC vDwhereCandD are concept expressions, calledleft-side concept andright-side conceptrespectively, and defined by the following grammar:

C:=A| {a} |C1uC2|C1tC2| ∃R.C1| ∃R.{a} | ∃R.>

D:=A| ¬C1|D1uD2| ∃R.{a} | ∀R.D1|6nR.C1|6nR.>

wheren∈ {0,1}. Finally, aboth-side conceptEis a concept expression which is both a left- and right-side concept. TBox axioms can only take the formCvDorE≡E.

RBox forSROIQ-RL can contain every role axiom ofSROIQbutRef(R). ABox concept assertions can be only stated in the formD(a), whereDis a right-side concept.

3 Contextualized Knowledge Repositories

A CKR is a two layered structure. The upper layer is composed of a knowledge baseG, which describes two types of knowledge: (i) the structure and the properties of contexts

1Complete proofs for soundness and completeness are presented in the Appendix.

2For ease of reference, the intended presentation of syntax and semantics forSROIQcon- structors and axioms is presented in Table 4 in the Appendix.

(3)

of the CKR (calledmeta-knowledge), and (ii) the knowledge that is context indepen- dent, i.e., that holds in every context (calledglobal knowledge). The lower layer, is con- stituted by a set of (local) contexts, each containing (locally valid) facts, that can also refer to what holds in other contexts. To favor knowledge reuse, the knowledge of each context is organized in multiple knowledge modules. The association between contexts and modules is represented in the meta-knowledge via a binary relation, and can be either explicitly asserted or inferred via meta-reasoning. The knowledge in a CKR can be expressed by means of any DL language: in the following we provide the parametric definition to any DL language and successively we instantiate it toSROIQ-RL.

The meta-knowledge of a CKR is expressed by a DL language defined on a meta- vocabulary, containing the elements that define the contextual structure3.

Definition 1 (Meta-vocabulary).Ameta-vocabularyis a DL vocabularyΓ composed of a set of atomic conceptsNCΓ, a set atomic rolesNRΓ and a set of individual con- stantsNIΓ that are mutually disjoint and contain the following sets of symbols

1. N⊆NIΓ ofcontext names.

2. M⊆NIΓ of module names.

3. C⊆NCΓ ofcontext classes, including the classCtx4.

4. R⊆NRΓ of contextual relations.

5. A⊆NRΓ ofcontextual attributes.

6. For every attributeA∈A, a set DA⊆NIΓ ofattribute valuesofA.

The meta-language of a CKR, denoted byLΓ, is a DL language built starting from the meta-vocabularyΓ with the following syntactic conditions on the application of role restrictions: for every• ∈ {∀,∃,6n,>n}, (i) if the concept•A.Boccurs in a concept expression, thenB={a}witha∈DA; (ii) if the concept•mod.Boccurs in a concept expression, thenB={m}withm∈M.

The context (in)dependent knowledge of a CKR is expressed via a DL language calledobject-language, based on an object-vocabularyΣ= NCΣ]NRΣ]NIΣ. The object-languageLΣ is the DL language defined starting from theΣ. The expressions of the object language will be evaluated locally to each context: namely each context can interpret each symbol independently. However, there are cases in which one want to constrain the meaning of a symbol in a context with the meaning of a symbol in some other context. For instance if John likes all Indian restaurants in Trento, then the extension of the conceptGoodRestaurantin the context of John preferences, contains the extension of IndianRestaurant in the context of tourism in Trento. To repre- sent such external references, we extend the object languageLΣ with the so called evalexpressions. Given a concept or role expressionX of LΣ, and a context expres- sion Cof LΓ, an eval expression is an expression of the formeval(X,C). The DL languageLeΣ extends LΣ with the set of eval-expressions inLΣ. Intuitively, the ex- pressioneval(C,{c})represents the extension of the conceptCin the contextc. Gen- eralizing,eval(C,C)withCa context class represent the union of the extensions of Cin each context of typeC. Similar intuition can be given foreval(R,C). The above example can be formalized by adding the following axiom to the context of John’s pref- erences:eval(IndianRestaurant,{trento tourism}) v GoodRestaurant. Finally,

3To support readability we use sans-serif typeface to denote elements of the meta-vocabulary.

4Intuitively,Ctxwill be used to denote the class of all contexts.

(4)

notice that we do not allow nestedevalexpressions: every expression occurring inside anevalshould be an expression inLΣ.

Definition 2 (Contextualized Knowledge Repository, CKR).Given a meta-vocabulary Γ and an object vocabularyΣ, aContextualized Knowledge Repository (CKR)over hΓ, Σiis a structureK=hG,{Km}m∈Miwhere:

– Gis a DL knowledge base overLΓ ∪ LΣ

– for every module namem∈M,Kmis a DL knowledge base overLeΣ.

Definition 3 (SROIQ-RL CKR).A CKR is aSROIQ-RL CKR, ifGis a knowledge base inSROIQ-RL, and for each m ∈ M,Km is aSROIQ-RL knowledge base, where eval-expressions only occur in left-concepts and contain left-concepts or roles.

Example 1. We introduce an example in the tourism recommendation domain5. In this scenario we use CKR to implement a knowledge base, calledKtour, that is populated with touristic events, locations, organizations and tourists’ preferences and profiles, and that is capable to identify events that are interesting for a tourist (or tourists class) starting from his/her preferences. A simplified version of the structure and the con-

Event

CulturalEvent SportsEvent

VolleyMatch VolleyA1 Competition Concert

A1_2012-13 trento_cuneo

volley_fan_01

trento_latina modena_trento

G

m_sport_ev m_event

m_v_match

m_match1 m_match2 m_match3

m_tourist m_sp_tourist

m_tourist01

hasParentEvent

Kmatch1 Winner(bre_banca_cuneo_volley), Loser(itas_trentino_volley), ...

Kmatch2 Winner(casa_modena_volley), Loser(itas_trentino_volley), ...

Kmatch3 Winner(itas_trentino_volley), Loser(andreoli_latina_volley), ...

Kv_matchHomeTeam ⊑Team, HostTeam ⊑Team, Winner⊑Team, Loser⊑Team, ...

Ksport_eveval(Winner, TopMatch)TopTeam

Ksp_touristeval(TopTeam, SportsEvent) ⊑ PreferredTeam

Tourist

SportiveTourist CulturalTourist

Fig. 1.Example CKR knowledge baseKtour

texts ofKtour is shown in Figure 1. In this example we focus on sportive events and in particular on volley matches. Intuitively, in the global contextG, every sport event and tourist is modelled with a context: in the figure, these are depicted as black di- amonds and we show some of the official volley matches and a tourist. Contexts are

5This example is a simplified version of a real case scenario in which we apply CKR to a tourist event recommendation system in Trentino (seehttp://www.investintrentino.it/

News/Trentour-Trentino-platform-for-smart-tourism).

(5)

grouped by types and organized in hierarchies by means of context classes: in the figure (depicted as boxes) we show a distinct context class hierarchy for event types (e.g. SportiveEvent,VolleyMatch) and for tourists types (e.g. SportiveTourist). The metaknowledge in G associates to contexts and context classes a set of knowledge modules, by axioms of the kindEvent v ∃mod.{m event} or {modena trento} v

∃mod.{m match2}: in the figure these associations are represented by dotted lines to the gray empty diamonds depicting module name individuals. Knowledge bases asso- ciated to modules are depicted as the corresponding gray boxes in the lower part of Figure 1: for example, inKv matchwe have general axioms about the structure of volley matches, while in modules for specific matches asKmatch1we store assertions about the actual results of the match. Intuitively, the semantics will enforce a form of inheritance of modules via context class hierarchy. Contextual relations across events and tourists are depicted as bold arrows in the figure: the only relationhasParentEvent connects matches with the competition in which they occour. Note that in some of the knowledge modules, we useevalexpressions to define references across contexts. For example, in Ksport evwe can state6that “Winners of major volley matches are top teams” with:

eval(W inner,VolleyMatchu ∃hasParentEvent.VolleyA1Competition)vT opT eam Similarly, in Ksp tourist we say that for each sportive tourist “top teams are preferred teams” witheval(T opT eam,SportsEvent)vP ref erredT eam. 3 Definition 4 (CKR interpretation). ACKR interpretationfor hΓ, Σi, is a structure I=hM,Iis.t.Mis a DL interpretation ofΓ ∪Σand, for everyx∈CtxM,I(x)is a DL interpretation overΣ.

According to the previous definition, a CKR interpretation is composed by an inter- pretation for the “upper-layer” (which includes the global knowledge and the meta- knowledge) and an interpretation of the object language for each instance of type con- text (i.e., for allx∈CtxM), providing a semantics of the object-vocabulary inx.

Definition 5 (CKR Model).A CKR interpretationIis aCKR modelofK(in symbols, I|=K) iff the following conditions hold:

1. Global interpretation:(i)NM⊆CtxMand, for everyC∈C,CM⊆CtxM; (ii)M |=G.

2. Local interpretations:ifhx, yi ∈modMandy=mM, thenI(x)|= Km.

3. Knowledge propagation:for everyx∈CtxM: (i) fora∈NIΣand anyy ∈CtxM, aI(x)=aI(y)=aM; (ii) forα∈Gwithα∈ LΣ,I(x)|=α.

4. Interpretation ofevalexpressions:givenx∈CtxM, eval(X,C)I(x)= [

e∈CM

XI(e)

Note that the interpretation of anevalexpression is independent from the context in which it is evaluated.

We adapt to CKR models the definition of the classic reasoning problem of entail- ment: intuitively, the problem is specialized by indicating the context of reference.

6For space reasons, in Figure 1 and in following examples, we writeTopMatchas a shortcut for the corresponding context expression.

(6)

Definition 6 (c-entailment).Given a CKRKoverhΓ, Σiwithc ∈ Nand an axiom α ∈ LeΣ, we say thatαisc-entailed byK(denoted byK |=c : α) if, for every CKR modelI=hM,IiofK, we haveI(cM)|=α.

We extend this definition to CKR knowledge bases as follows.

Definition 7 (Global entailment).Given a CKRKoverhΓ, Σiand an axiomα, we say thatαis (globally) entailed byK(denoted byK|=α) if:

– α∈ LeΣ and, for everyc∈Nand modelI=hM,IiofK, we haveI(cM)|=α;

– α∈ LΓ and, for every modelI=hM,IiofK, we haveM |=α.

Example 2. We can now consider again theKtour CKR of Example 1 and provide a formal interpretation for it. LetI=hM,Iibe the model ofKtourdirectly induced by its assertions. By the definition of the model, we can now find the knowledge base as- sociated to each context: for example, for the context of the matchmodena trento, we have thatI(modena trentoM)|= Kevent∪Ksport ev∪Kv match∪Kmatch2and similarly for the other matches. In particular, we have that the local interpretation satisfies the axiomeval(W inner,TopMatch)vT opT eam ∈Ksport ev. We can now give the for- mal reading of such axiom: we have thateval(W inner,TopMatch)I(modena trentoM)= S

e∈TopMatchMW innerI(e). From the assertions in the ABox ofG, this corresponds to S

e∈{match 2,match 3}W innerI(e). Now, by assertions onW inner insideKmatch2 and Kmatch3, we obtain{itas trentino, casa modena} ⊆T opT eamI(modena trentoM).

We can do a similar reasoning for the context describing the touristvolley fan 01.

We have thatI(volley fan 01M) |= Ktourist∪Ksp tourist∪Ktourist01. Thus, the inter- pretation satisfieseval(T opT eam,SportsEvent)vP ref erredT eamfromKsp tourist. As in the case above, eval(T opT eam,SportsEvent)I(volley fan 01M) is interpreted as S

e∈SportsEventMT opT eamI(e). From the assertions inG, we obtain that this is equal to S

e∈{match 1,match 2,match 3}T opT eamI(e). Finally, from the reference axiom above, we obtain{itas trentino, casa modena} ⊆P ref erredT eamI(volley fan 01M). 3

4 Materialization Calculus K

ic

In this section we extend the materialization calculusKinstfor instance checking on SROEL(u,×)(OWL-EL) proposed by [10] in order to reason over the two layered structure of a CKR inSROIQ-RL. As we will discuss in the following, this calculus basically formalizes the operation of forward closure we realized in the implementation.

To simplify the presentation of the calculus rules, we introduce a normal form for the considered axioms. We say that a CKRK=hG,{Km}m∈Miis innormal formif:

– Gcontains axioms inLΓ of the form of Table 1 or in the formC v ∃mod.{m}, Cv ∃A.{dA}forA, B, C∈C,R, S, T ∈R,a, b∈N,m∈M,A∈AanddA∈DA. – Gand everyKmcontain axioms inLΣ of the form of Table 1 and everyKmcontain axioms inLeΣ of the formeval(A,C) v B,eval(R,C) v T for A, B, C ∈ NC, a, b∈NI,R, S, T ∈NRandC∈C.

(7)

A(a) R(a, b) ¬R(a, b) a=b a6=b AvB {a} vB Av ¬B AuBvC

∃R.AvB Av ∃R.{a} Av ∀R.B Av61R.B RvT R◦SvT Dis(R, S) Inv(R, S) Irr(R)

Table 1.Normal form axioms

We can give a set of rules7 that can be used to transform anySROIQ-RL CKR in an “equivalent” CKR in normal form. As in [10], we assume that rule chain axioms in input are already decomposed in binary role chains. The correctness of this translation can be shown by the following lemma.

Lemma 1. For every CKRK=hG,{Km}m∈MioverhΓ, Σi, a CKRK0 over extended vocabularieshΓ0, Σ0ican be computed in linear time s.t. all axioms inK0are in normal form and, for all axiomsαonly using symbols fromhΓ, Σi,K|=αiffK0|=α. ut Let us introduce the basic concepts of the proposed calculus. We follow the same pre- sentation given in [10], and we will thus express our rules in the language ofdatalog.

Asignature is a tuplehC,Pi, withC a finite set ofconstants andPa finite set of predicates. We assume a setVofvariablesand we calltermsthe elements ofC∪V.

AnatomoverhC,Piis in the formp(t1, . . . , tn)withp∈Pand everyti ∈C∪V fori∈ {1, . . . , n}. Aruleis an expression in the formB1, . . . , Bm→HwhereHand B1, . . . , Bmare datalog atoms (theheadandbodyof the rule). AfactH is a ground rule with empty body. AprogramPis a finite set of datalog rules. Aground substitution σforhC,Piis a functionσ: V→C. We define as usual substitutions on atoms and ground instancesof atoms. Aproof treeforPis a structurehN, E, λiwherehN, Eiis a finite directed tree andλis a labelling function assigning a ground atom to each node, where: for eachv∈N, there exists a ruleB1, . . . , Bm→H inPand a ground substi- tutionσs.t. (i)λ(v) =σ(H)and (ii)vhasmchild nodeswiinE, withλ(wi) =σ(Bi) fori∈ {1, . . . , m}. A ground atomHis aconsequenceofP(denotedP |=H) if there exists a proof tree forP with root noderand withλ(r) =H.

We can now present the definition of our materialization calculus: we instantiate and adapt the general definition given by [10] in order to meet the structure of CKR.

Definition 8 (Materialization calculusKic).The materialization calculusKicis com- posed by theinput translationsIglob,Iloc,Irl, thededuction rulesPloc,Prl, andoutput translationO, such that:

– every input translationIand output translationOare partial functions (defined over axioms in normal form) while deduction rulesPare sets of datalog rules;

– given an axiom or signature symbolα(andc∈N), eachI(α)(orI(α,c)) is either undefined or a set of datalog facts;

– given an axiomαandc∈N,O(α,c)is either undefined or a single datalog fact;

– the set of predicates used by eachI, P, Ois fixed and finite;

– all constant symbols in input or output translations forαare signature symbols ap- pearing in (or equal to)α.

7Presented in Table 5 in the Appendix.

(8)

Global input rulesIglob(G)

(igl-subctx1) CC7→ {subClass(C,Ctx,gm)}

(igl-subctx2) cN7→ {inst(c,Ctx,gm)}

Local input rulesIloc(Km,c)

(ilc-subevalat) eval(A,C)vB7→ {subEval(A,C, B,c)}

(ilc-subevalr) eval(R,C)vT7→ {subEvalR(R,C, T,c)}

Local deduction rulesPloc

(plc-subevalat) subEval(a, c1, b, c),inst(c0, c1,gm),inst(x, a, c0)inst(x, b, c)

(plc-subevalr) subEvalR(r, c1, t, c),inst(c0, c1,gm),triple(x, r, y, c0)triple(x, t, y, c) (plc-eq) nom(x, c),eq(x, y, c0)eq(x, y, c)

Output translationO(α,c) (o-concept) A(a)7→ {inst(a, A,c)}

(o-role) R(a, b)7→ {triple(a, R, b,c)}

Table 2.Kictranslation and deduction rules

We extend the definition of input translations to knowledge bases (set of axioms)Swith their signatureΣ, withI(S) =S

α∈SI(α)∪S

s∈Σ,I(s)definedI(s)(similarlyI(S,c) = S

α∈SI(α,c)∪S

s∈Σ,I(s)definedI(s,c)). The sets of rules defining input translationIglob

for global context, input translationIlocand deduction rulesPlocfor local contexts and output rulesOare presented in Table 2. Finally,SROIQ-RL inputIrland deduction Prlrules are presented in Table 3.

In order to introduce the notion of entailment, we define in the following the “trans- lation process” to produce a program that represents the knowledge of the complete input CKR. LetK=hG,{Km}m∈Mibe an input CKR in normal form. Then, let:

P G(G) =Iglob(G)∪Prl∪Irl(GΓ,gm)∪Irl(GΣ,gk)

withgm,gknew,GΓ ={α∈G|α∈ LΓ}andGΣ ={α∈G|α∈ LΣ}. We define the set of contextsNG ={c∈C |P G(G)|=inst(c,Ctx,gm)}. For everyc∈NG, we define its associated knowledge base as:

Kc=[

{Km∈K|P G(G)|=triple(c,mod,m,gm)}

We define the program forcas:

P C(c) =Ploc∪Iloc(Kc,c)∪Irl(Kc,c)∪Irl(GΣ,c) Finally, the program forKcan be encoded asP K(K) =P G(G)∪S

c∈NGP C(c).

We say thatGentailsan axiomα∈ LΓ (denotedG`α) ifP G(G)andO(α,gm) are defined andP G(G)|=O(α,gm). The same can be stated ifα∈ LΣ, substituting gm withgk. We say thatK entailsan axiomα ∈ LeΣ in a contextc ∈ N (denoted K`c:α) if the elements ofP K(K)andO(α,c)are defined andP K(K)|=O(α,c).

The presented rules and translation provide a sound and complete materialization calculus for instance checking (with respect toc-entailment) inSROIQ-RL CKRs in normal form. The result can be verified by extending the proofs in [10] toSROIQ-RL and to the CKR structure. Soundness w.r.t. the global knowledge is established as:

Lemma 2. GivenK=hG,{Km}m∈Mia CKR in normal form, andα∈ LΓ orα∈ LΣ

withαan atomic concept or role assertion, thenG`αimpliesG|=α. ut

(9)

RL input translationIrl(S, c) (irl-nom) aNI7→ {nom(a, c)}

(irl-cls) ANC7→ {cls(A, c)}

(irl-rol) RNR7→ {rol(R, c)}

(irl-inst1) A(a)7→ {inst(a, A, c)}

(irl-triple) R(a, b)7→ {triple(a, R, b, c)}

(irl-ntriple)¬R(a, b)7→ {negtriple(a, R, b, c)}

(irl-eq) a=b7→ {eq(a, b, c)}

(irl-neq) a6=b7→ {neq(a, b, c)}

(irl-inst2) {a} vB7→ {inst(a, B, c)}

(irl-subc) AvB7→ {subClass(A, B, c)}

(irl-top) >(a)7→ {inst(a,top, c)}

(irl-bot) ⊥(a)7→ {inst(a,bot, c)}

(irl-not) Av ¬B7→ {supNot(A, B, c)}

(irl-subcnj) A1uA2vB7→ {subConj(A1, A2, B, c)}

(irl-subex) ∃R.AvB7→ {subEx(R, A, B, c)}

(irl-supex) Av ∃R.{a} 7→ {supEx(A, R, a, c)}

(irl-forall) Av ∀R.B7→ {supForall(A, R, B, c)}

(irl-leqone) Av61R.B7→ {supLeqOne(A, R, B, c)}

(irl-subr) RvS7→ {subRole(R, S, c)}

(irl-subrc) R◦SvT7→ {subRChain(R, S, T, c)}

(irl-dis) Dis(R, S)7→ {dis(R, S, c)}

(irl-inv) Inv(R, S)7→ {inv(R, S, c)}

(irl-irr) Irr(R)7→ {irr(R, c)}

RL deduction rulesPrl

(prl-ntriple) negtriple(x, v, y, c),triple(x, v, y, c)inst(x,bot, c)

(prl-eq1) nom(x, c)eq(x, x, c)

(prl-eq2) eq(x, y, c)eq(y, x, c)

(prl-eq3) eq(x, y, c),inst(x, z, c)inst(y, z, c)

(prl-eq4) eq(x, y, c),triple(x, u, z, c)triple(y, u, z, c)

(prl-eq5) eq(x, y, c),triple(z, u, x, c)triple(z, u, y, c)

(prl-eq6) eq(x, y, c),eq(y, z, c)eq(x, z, c)

(prl-neq) eq(x, y, c),neq(x, y, c)inst(x,bot, c)

(prl-top) inst(x, z, c)inst(x,top, c)

(prl-subc) subClass(y, z, c),inst(x, y, c)inst(x, z, c)

(prl-not) supNot(y, z, c),inst(x, y, c),inst(x, z, c)inst(x,bot, c) (prl-subcnj) subConj(y1, y2, z, c),inst(x, y1, c),inst(x, y2, c)inst(x, z, c) (prl-subex) subEx(v, y, z, c),triple(x, v, x0, c),inst(x0, y, c)inst(x, z, c) (prl-supex) supEx(y, r, x0, c),inst(x, y, c)triple(x, r, x0, c) (prl-supforall) supForall(z, r, z0, c),inst(x, z, c),triple(x, r, y, c)inst(y, z0, c) (prl-leqone) supLeqOne(z, r, z0, c),inst(x, z, c),triple(x, r, x1, c),

inst(x1, z0, c),triple(x, r, x2, c),inst(x2, z0, c)eq(x1, x2, c) (prl-subr) subRole(v, w, c),triple(x, v, x0, c)triple(x, w, x0, c) (prl-subrc) subRChain(u, v, w, c),triple(x, u, y, c),triple(y, v, z, c)triple(x, w, z, c) (prl-dis) dis(u, v, c),triple(x, u, y, c),triple(x, v, y, c)inst(x,bot, c)

(prl-inv1) inv(u, v, c),triple(x, u, y, c)triple(y, v, x, c)

(prl-inv2) inv(u, v, c),triple(x, v, y, c)triple(y, u, x, c)

(prl-irr) irr(u, c),triple(x, u, x, c)inst(x,bot, c)

Table 3.RL input and deduction rules

Soundness for global entailment is proved by extending the result to local knowledge.

Theorem 1 (Soundness).GivenK=hG,{Km}m∈Mia CKR in normal form,α∈ LΣ

an atomic concept or role assertion andc∈N, thenK`c:αimpliesK|=c:α. ut Completeness can be verified in a similar way. We say that a CKRKisconsistentif there does not existc∈N∪ {gm,gk}anda∈NIΣ∪NIΓ s.t.P K(K)|=inst(a,bot,c).

Lemma 3. GivenK=hG,{Km}m∈Mia consistent CKR in normal form, andα∈ LΓ orα∈ LΣwithαan atomic concept or role assertion, thenG|=αimpliesG`α. ut Theorem 2 (Completeness).GivenK=hG,{Km}m∈Mia consistent CKR in normal form,α∈ LΣ an atomic concept or role assertion andc∈N, thenK|=c:αimplies

K`c:α. ut

(10)

5 Concrete Syntax for RDF with Named Graphs

The forward reasoning over CKR expressed by the materialization calculus has been implemented in a prototype. Basically, the prototype accepts RDF input data express- ing OWL-RL axioms and assertions for global and local knowledge modules: these dif- ferent pieces of knowledge are represented as distinct named graphs, while contextual primitives (e.g. contexts and theevaloperator) have been encoded in a RDF vocabu- lary. The prototype is based on an extension of the Sesame 2.6 framework: the main component, calledCKR coremodule exposes the CKR primitives and a SPARQL 1.1 endpoint for query and update operations on the contextualized knowledge. The mod- ule offers the ability to compute and materialize the inference closure of the input CKR, add and remove knowledge and execute queries over the complete CKR structure.

The distribution of knowledge in different named graphs asks for a module to com- pute inference over multiple graphs in a RDF store. This component has been realized as a general software layer calledSPRINGLES8. Intuitively, the layer provides methods to demand a closure materialization on the RDF store data: rules are encoded as SPARQL queries and it is possible to customize both the input ruleset and the evaluation strategy.

In our case, the ruleset basically encodes the rules of the presented materialization calculus. As an example, we present the rule dealing with atomic concept inclusions:

:prl-subc a spr:Rule ;

spr:head """ GRAPH ?mx { ?x rdf:type ?z } """ ; spr:body """ GRAPH ?m1 { ?y rdfs:subClassOf ?z }

GRAPH ?m2 { ?x rdf:type ?y }

GRAPH sys:dep { ?mx sys:derivedFrom ?m1,?m2 } FILTER NOT EXISTS

{ GRAPH ?m0 { ?x rdf:type ?z }

GRAPH sys:dep { ?mx sys:derivedFrom ?m0 } } """ . This code corresponds to the local rule (prl-subc) ofPrl, thus has the scope of a single context. When the condition in the body part of the rule is verified in graphs?m1and

?m2, the head part is materialized in the inference graph?mx. In the rule we work at level of knowledge modules (i.e. named graphs): the first three lines directly correspond to the rule inPrl; in the fourth line we require that module?mx, containing the infer- ences in the given context, depends on the modules of the assumptions. In other words, we require that both rule preconditions and results belong to the KB associated to the same context9. The filter expression checks that the results have not been derived yet.

The rules are evaluated with a strategy that basically follows the same steps of the translation process defined for the calculus. Intuitively, the plan goes as follows:

(i) we compute the closure on the graph for global contextG, by a fixpoint on rules corresponding toPrl; (ii) we derive associations between contexts and their modules, by adding dependencies for every assertion of the kindmod(c,m)in the global closure;

(iii) we compute the closure the contexts, by applying rules encoded fromPrlandPloc

and resolvingevalexpressions by the metaknowledge information in the global closure.

8SParql-based Rule Inference over Named Graphs Layer Extending Sesame.

9Statements?mx sys:derivedFrom ?myare generated from the closure of the global context. For every context, an additional module for its inferences is created and associated to it viasys:derivedFromrelation.

(11)

A demo of the prototype, containing RDF data that encodes the example CKR Ktour, can be found athttps://dkm.fbk.eu/index.php/CKR-TourismDemo.

6 Related Works

The interest in representation of contexts in the Semantic Web favored the proposal of several DL-based formalisms. One relevant example is the Two-dimensional descrip- tion logics of context [8, 9]. It is based on a multimodal extension of one DL with another: the composition of an object languageLOwith a contextual languageLCre- sults in a combined languageCLLC

O. This allows a clear separation of the metaknowledge and a complex definition of the contextual structure. Contextual modal operators intro- duced by this logic allow to define references to other contexts, similarly to theeval operator. On the other hand, we note that most of the approaches (including [13]) only consider fixed structures for the representation of metaknowledge, possibly for dealing with the complexity of the combination of languages [7, 14–16]. A comparison of the approaches with respect to the needs for context in Semantic Web can be found in [3].

The presented materialization calculus extends the calculus for instance checking presented in [10] forSROEL(u,×)to the language of OWL RL: in our extension, we also referred to the subsequent work [11] presenting a rule-based calculus for classifi- cation in OWL RL.

7 Conclusions

In this paper we presented a revised and extended version of the CKR framework, gen- eralizing the previous formalization in aspects of contextual structure and knowledge propagation. We then proposed a sound and complete materialization calculus for rea- soning over the new CKR definition and outlined its implementation based on SPARQL and a concrete syntax in RDF with named graphs.

We remark that the newly proposed version addresses several limitations of CKR in [13]: the global context Gextends the metaknowledge component of CKR with global object knowledge and, most of all, metaknowledge is not limited by a fixed structure but can be defined as a full DL knowledge base; contextual structure is now independent from the definition of context dimensions and the coverage relation, while general context relations can be explicitly asserted across contexts; theevaloperator generalizes the notion of qualified symbols to generic object expressions and contexts classes; finally, we allow multiple modules to be associated to contexts. On the other hand we have still to verify how this increase in representation potential affects the complexity of reasoning in the new representation.

We are currently realizing a different implementation of the calculus based on DL rewritings to Datalog programs [5]. Moreover we plan to study the complexity proper- ties of the new version of the CKR with respect to the previous formalization. Finally, we want to evaluate the different realizations of CKR with respect to reasoning perfor- mances and ease of modelling over the same set of contextualized data, as in [2].

(12)

References

1. Baader, F., Calvanese, D., McGuinness, D., Nardi, D., Patel-Schneider, P. (eds.): The De- scription Logic Handbook. Cambridge University Press (2003)

2. Bozzato, L., Ghidini, C., Serafini, L.: Comparing contextual and flat representations of knowledge – a concrete case about football data. In: K-Cap 2013 (2013)

3. Bozzato, L., Homola, M., Serafini, L.: Context on the semantic web: Why and how. In:

ARCOE-12 (2012)

4. Bozzato, L., Homola, M., Serafini, L.: Towards More Effective Tableaux Reasoning for CKR.

In: DL2012. CEUR-WP, vol. 824, pp. 114–124. CEUR-WS.org (2012)

5. Heymans, S., Eiter, T., Xiao, G.: Tractable reasoning with dl-programs over datalog- rewritable description logics. In: ECAI 2010. Frontiers in Artificial Intelligence and Ap- plications, vol. 215, pp. 35–40. IOS Press (2010)

6. Horrocks, I., Kutz, O., Sattler, U.: The even more irresistibleSROIQ. In: KR 2006. pp.

57–67. AAAI Press (2006)

7. Khriyenko, O., Terziyan, V.: A framework for context sensitive metadata description. IJSMO 1(2), 154–164 (2006)

8. Klarman, S.: Reasoning with Contexts in Description Logics. Ph.D. thesis, Free University of Amsterdam (2013)

9. Klarman, S., Guti´errez-Basulto, V.: Two-dimensional description logics of context. In:

DL2011. CEUR-WP, vol. 745, pp. 235–245. CEUR-WS.org (2011)

10. Kr¨otzsch, M.: Efficient inferencing for owl el. In: JELIA 2010. Lecture Notes in Computer Science, vol. 6341, pp. 234–246. Springer (2010)

11. Kr¨otzsch, M.: The not-so-easy task of computing class subsumptions in OWL RL. In: ISWC 2012. Lecture Notes in Computer Science, vol. 7649, pp. 279–294. Springer (2012) 12. Motik, B., Fokoue, A., Horrocks, I., Wu, Z., Lutz, C., Grau, B.C.: OWL 2 Web Ontology Lan-

guage Profiles. W3C recommendation, W3C (Oct 2009), http://www.w3.org/TR/2009/REC- owl2-profiles-20091027/

13. Serafini, L., Homola, M.: Contextualized knowledge repositories for the semantic web. J. of Web Semantics 12, 64–87 (2012)

14. Straccia, U., Lopes, N., Luk´acsy, G., Polleres, A.: A general framework for representing and reasoning with annotated semantic web data. In: AAAI 2010, Special Track on Artificial Intelligence and the Web. AAAI Press (July 2010)

15. Tanca, L.: Context-Based Data Tailoring for Mobile Users. In: BTW 2007 Workshops. pp.

282–295 (2007)

16. Udrea, O., Recupero, D., Subrahmanian, V.S.: Annotated RDF. ACM Trans. Comput. Log.

11(2), 1–41 (2010)

(13)

A Appendix: Result Proofs

A.1 Soundness

Lemma 1. GivenK=hG,{Km}m∈Mia CKR in normal form, andα∈ LΓ orα∈ LΣ

withαan atomic concept or role assertion, thenG`αimpliesG|=α.

Proof. We can basically follow the same proof schema used for proving soundness in [10], by adapting it to the rules of our calculus. By definition, we have thatP G(G) = Iglob(G)∪Prl∪Irl(GΓ,gm)∪Irl(GΣ,gk). We can assign an interpretation to the ground atoms derived fromP G(G)as follows, whereg=gmorg=gk:

– inst(a, A,g)witha∈NIΓ ∪NIΣ, A∈NCΓ∪NCΣ, thenG|=A(a);

– inst(a,top,g)witha∈NIΓ ∪NIΣ, thenG|=>(a);

– inst(a,bot,g)witha∈NIΓ ∪NIΣ, thenG|=⊥(a);

– triple(a, R, b,g)witha, b∈NIΓ ∪NIΣ, R∈NRΓ ∪NRΣ, thenG|=R(a, b);

– eq(a, b,g)witha, b∈NIΓ∪NIΣ, thenG|=a=b;

– neq(a, b,g)witha, b∈NIΓ ∪NIΣ, thenG|=a6=b;

We claim that, for any ground atomH of the above form with the corresponding se- mantic conditionC(H),P G(G)|=H impliesG|=C(H). We can prove the claim by induction on the possible proof tree of the above atomsH.

– (prl-ntriple): thenH = inst(a,bot,g) andP G(G) |= negtriple(a, R, b,g), P G(G)|=triple(a, R, b,g). We have that¬R(a, b)∈Gand, by the above inter- pretation of atoms, we obtain thatG|=R(a, b). This is an absurd, thus there cannot be an interpretation satisfyingG, which justifies the consequenceG|=⊥(a).

– (prl-eq1):thenH=eq(a, a,g)and, byIrlrules,a∈NIΓ∪NIΣ. For any modelM ofG, for anya∈NIΓ∪NIΣit holds thataM=aM, thus this verifiesG|= (a=a).

– (prl-eq2):thenH =eq(b, a,g)andP G(G)|=eq(a, b,g). By the above interpreta- tion of atoms,G|= (a=b): by symmetricity of equality relation this directly implies thatG|= (b=a).

– (prl-eq3):thenH =inst(b, B,g)andP G(G)|=eq(a, b,g),P G(G)|=inst(a, B,g).

By the above interpretation of atoms,G |= (a =b)andG |= B(a). This directly implies thatG|=B(b), thus proving the assertion.

– (prl-eq4): then H = triple(a, R, b,g) and P G(G) |= eq(c, a,g), P G(G) |= triple(c, R, b,g). By the above interpretation of atoms,G |= (c = a)andG |= R(c, b). This directly implies thatG|=R(a, b). The case for(prl-eq5)can be verified similarly.

– (prl-eq6):thenH = eq(a, b,g)andP G(G)|=eq(a, c,g),P G(G)|=eq(c, b,g).

By the above interpretation of atoms,G|= (a=c)andG|= (c=b): by transitivity of equality relation this directly implies thatG|= (a=b).

– (prl-neq): then H = inst(a,bot,g) and P G(G) |= neq(a, b,g), P G(G) |= eq(a, b,g). By induction hypothesis and the above semantic conditions, we obtain G|= (a=b)andG|= (a6=b). This is an absurd, thus there cannot be an interpre- tation satisfyingG: this justifies the consequenceG|=⊥(a).

– (prl-top):thenH = inst(a,top,g)andP G(G) |= inst(a, B,g). By induction hypothesis,G|=B(a): for every modelMofG, it holds thataM ∈∆M =>M, thus it is verified thatG|=>(a).

(14)

Concept constructors Syntax Semantics

atomic concept A AI

complement ¬C ∆I\CI

intersection CuD CI∩DI

union CtD CI∪DI

existential restriction ∃R.C

 x∈∆I

˛

˛

˛

˛

∃y.hx, yi ∈RI

∧y∈CI ff

self restriction ∃R.Self ˘

x∈∆I ˛

˛hx, xi ∈RI¯ universal restriction ∀R.C

 x∈∆I

˛

˛

˛

˛

∀y.hx, yi ∈RI

→y∈CI ff

min. card. restriction >nR.C

 x∈∆I

˛

˛

˛

˛

]{y| hx, yi ∈RI

∧y∈CI} ≥n ff

max. card. restriction 6nR.C

 x∈∆I

˛

˛

˛

˛

]{y| hx, yi ∈RI

∧y∈CI} ≤n ff

cardinality restriction =nR.C

 x∈∆I

˛

˛

˛

˛

]{y| hx, yi ∈RI

∧y∈CI}=n ff

nominal {a} ˘

aI¯ Role constructors Syntax Semantics

atomic role R RI

inverse role R ˘

hy, xi˛

˛hx, yi ∈RI¯

role composition S◦Q ˘

hx, zi˛

˛hx, yi ∈SI,hy, zi ∈QI¯

Axioms Syntax Semantics

concept inclusion (GCI) CvD CI ⊆DI concept definition C≡D CI =DI role inclusion (RIA) SvR SI⊆RI role disjointness Dis(P, R) PI∩RI=∅

reflexivity assertion Ref(R) {hx, xi |x∈∆I} ⊆RI irreflexivity assertion Irr(R) RI∩ {hx, xi |x∈∆I}=∅ symmetry assertion Sym(R) hx, yi ∈RI⇒ hy, xi ∈RI asymmetry assertion Asym(R) hx, yi ∈RI⇒ hy, xi∈/RI

transitivity assertion Tra(R) {hx, yi,hy, zi} ⊆RI⇒ hx, zi ∈RI concept assertion C(a) aI∈CI

role assertion R(a, b) ˙

aI, bI¸

∈RI negated role assertion ¬R(a, b) ˙

aI, bI¸

∈/RI equality assertion a=b aI=bI inequality assertion a6=b aI6=bI

Table 4.Syntax and Semantics ofSROIQ

(15)

C(a)7→ {X(a), XvC}

CvD7→ {CvX, XvD}

Av > 7→ ∅

⊥ vA7→ ∅

Av ¬C7→ {Av ¬X, CvX} CuAvB7→ {CvX, XuAvB}

AvCuD7→ {AvC, AvD}

CtDvB7→ {CvB, DvB}

∃R.CvA7→ {CvX,∃R.XvA}

Av ∃R.C7→ {Av ∃R.X, CvX} Av ∀R.D7→ {Av ∀R.X, XvD}

Av60R.D7→ {Av ∀R.¬D}

Av61R.D7→ {Av61R.X, DvX}

Sym(P)7→ {PvW,Inv(P, W)}

Trans(P)7→ {P◦PvP}

Asym(P)7→ {Dis(P, W),Inv(P, W)}

eval(D,C)vB∈Km7→ {eval(X, Y)vB∈Km, DvX∈Kmx,CvY∈G, Y v ∃mod.{mx} ∈G}

eval(R,C)vT ∈Km7→ {eval(R, Y)vT ∈Km, CvY ∈G}

∃eval(R,C).AvB∈Km7→ {∃W.AvB∈Km, eval(R,C)vW ∈Km} eval(R,C)◦SvT ∈Km7→ {eval(R,C)vW ∈Km,

W◦SvT ∈Km} Dis(eval(R,C), S)∈Km7→ {eval(R,C)vW ∈Km,

Dis(W, S)∈Km}

WithA, B ∈ NC,R, S, T ∈ NR,X, Y ∈ NCfresh concept names,W ∈ NRa fresh role name, mx a fresh module name and Kmx its associated knowledge base, C, D,C concept expressions withC, D,C∈/NC.

Table 5.Normal form transformation

– (prl-subc):thenH =inst(a, B,g),AvB∈GandP G(G)|=inst(a, A,g). By the above semantic conditions,G|=A(a): this directly implies thatG|=B(a).

– (prl-not):thenH =inst(a,bot,g),Av ¬B ∈GandP G(G)|=inst(a, A,g), P G(G)|=inst(a, B,g). By induction hypothesis,G|=A(a)andG|=B(a): this is an absurd, since the first consequence would imply thatG|= (¬B)(a). Thus there can not be an interpretation satisfyingG, which justifies the consequenceG|=⊥(a).

– (prl-subcnj):thenH =inst(a, B,g),AuCvB∈GandP G(G)|=inst(a, A,g), P G(G) |=inst(a, C,g). By the above semantic conditions,G |= A(a)andG |= C(a): this directly implies thatG|= (AuC)(a), and thusG|=B(a).

– (prl-subex):thenH =inst(a, B,g),∃R.AvB∈GandP G(G)|=triple(a, R, b,g), P G(G) |= inst(b, A,g). By induction hypothesis, this implies thatG |= R(a, b) andG |= A(b): by definition of the semantics, this proves thatG |= (∃R.A)(a) which impliesG|=B(a).

– (prl-supex): then H = triple(a, R, b,g), A v ∃R.{b} ∈ G andP G(G) |= inst(a, A,g). By induction hypothesis, G |= A(a): this implies that, for every model M of G,aM ∈ (∃R.{b})M, that is

aM, bM

∈ RM. This proves that G|=R(a, b).

– (prl-supforall):thenH =inst(b, B,g),Av ∀R.B∈GandP G(G)|=inst(a, A,g), P G(G) |= triple(a, R, b,g). By induction hypothesis, G |= A(a) and G |= R(a, b): this implies that, for every model M of G,aM ∈ (∀R.B)M, and thus bM∈BM. This proves thatG|=B(b).

– (prl-leqone): then H = eq(b, c,g), A v6 1R.B ∈ G. Moreover, P G(G) |= inst(a, A,g), P G(G) |= triple(a, R, b,g)withP G(G) |= inst(b, B,g)and P G(G) |= triple(a, R, c,g) withP G(G) |= inst(c, B,g). By induction hy- pothesis,G |= A(a)and thus G |= (6 1R.B)(a). Moreover,G |= R(a, b)and

(16)

G |= R(a, c)withG |= B(b)andG |= B(c). By definition of the semantics, for every modelMofG, it holds thatbM=cM, which impliesG|= (b=c).

– (prl-subr):thenH=triple(a, S, b,g),RvS∈GandP G(G)|=triple(a, R, b,g).

By the above semantic constraints,G|=R(a, b)which directly impliesG|=S(a, b).

– (prl-subrc): then H = triple(a, T, b,g), R ◦ S v T ∈ G and P G(G) |= triple(a, R, c,g),P G(G)|=triple(c, S, b,g). By the above semantic constraints, G |= R(a, c) andG |= S(c, b): by definition of the semantics, this implies that G|=T(a, b).

– (prl-dis):thenH =inst(a,bot,g),Dis(R, S)∈GandP G(G)|=triple(a, R, b,g), P G(G)|=triple(a, S, b,g). By the above semantic constraints,G|=R(a, b)and G|=S(a, b): this is an absurd, thus there cannot be an interpretation satisfyingG, which justifies the consequenceG|=⊥(a).

– (prl-inv1):thenH =triple(a, S, b,g),Inv(R, S)∈GandP G(G)|=triple(b, R, a,g).

By the above semantic constraints, G |= R(b, a): this directly implies that G |= S(a, b). The case for(prl-inv2)can be proved similarly.

– (prl-irr):thenH =inst(a,bot,g),Irr(R)∈GandP G(G)|=triple(a, R, a,g).

By induction hypothesis this would imply thatG |= R(a, a), which is an absurd:

thus there cannot be an interpretation satisfyingG, which justifies the consequence G|=⊥(a).

u t Theorem 1 (Soundness).GivenK=hG,{Km}m∈Mia CKR in normal form,α∈ LΣ

an atomic concept or role assertion andc∈N, thenK`c:αimpliesK|=c:α.

Proof. To prove the assertion, we extend the construction of the previous Lemma 1 to the local interpretations for contexts and the definition of the program representing the whole input CKR.

By definition,P K(K) = P G(G)∪S

c∈NGP C(c) where, for every c ∈ NG, P C(c) =Ploc∪Iloc(Kc,c)∪Irl(Kc,c)∪Irl(GΣ,c).

For Lemma 1, we can also easily derive that, for every interpretationMsuch that M |= G: ifc ∈ NG (that is, if P G(G) |= inst(c,Ctx,gm)) thencM ∈ CtxM; if Km∈Kc(that is, ifP G(G)|=triple(c,mod,m,gm)) then

cM,mM

∈modM. As in previous lemma, we can assign a semantic constraint to the ground atoms derived fromP K(K)as follows, wherec∈NG:

– inst(a, A,c)witha∈NIΣ, A∈NCΣ, thenK|=c:A(a);

– inst(a,top,c)witha∈NIΣ, thenK|=c:>(a);

– inst(a,bot,c)witha∈NIΣ, thenK|=c:⊥(a);

– triple(a, R, b,c)witha, b∈NIΣ, R∈NRΣ, thenK|=c:R(a, b);

– eq(a, b,c)witha, b∈NIΣ, thenK|=c:a=b;

– neq(a, b,c)witha, b∈NIΣ, thenK|=c:a6=b;

We claim that, for any ground atomH of the above form with the corresponding se- mantic conditionC(H),P K(K)|=HimpliesK|=c:C(H). We show the claim by induction on the possible proof tree of the above atomsH: the cases for the rules in Prlare analogous to what has been shown in the previous lemma, thus we only have to prove the assertion for the rules inPloc.

(17)

– (plc-subeval):thenH =inst(a, B,c)andP K(K)|=subEval(A,C, B,c),P K(K)|= inst(c0,C, B,gm) and P K(K) |= inst(a, A,c0). By induction hypothesis and Lemma 1,G |= C(c0),K |=c0 : A(a)andK |=c : eval(A,C) v B. Hence, for every modelI = hM,IiofK,S

e∈CMAI(e) ⊆BI(cM)thenAI(c0M) ⊆BI(cM) and thusI(cM)|=B(a)which meansK|=c:B(a).

– (plc-subevalr):thenH =triple(a, S, b,c)andP K(K)|=subEvalR(R,C, S,c), P K(K)|=inst(c0,C, B,gm)andP K(K)|=triple(a, R, b,c0). By induction hy- pothesis and Lemma 1,G|=C(c0),K|=c0 :R(a, b). andK|=c:eval(R,C)vS.

Hence, for every modelI=hM,IiofK,S

e∈CMRI(e)⊆SI(cM)thenRI(c0M)⊆ SI(cM)and thusI(cM)|=S(a, b)which meansK|=c:S(a, b).

– (plc-eq):thenH =eq(a, b,c),P K(K)|=nom(a,c)andP K(K)|=eq(a, b,c0). By induction hypothesis, by rules inIrlwe havea∈NIΣandK|=c0 : (a=b). Then, for every modelI=hM,IiofK, we have thataI(c0M)=bI(c0M). By the condition on local interpretation of individuals in the definition of CKR model, we have that aI(cM)=aI(c0M)=bI(c0M)=bI(cM). Thus it holds thatI(cM)|= (a=b)which

meansK|=c: (a=b). ut

A.2 Completeness

Lemma 2. LetK = hG,{Km}m∈Mi be a CKR in normal form andP K(K) its as- sociated program. We define the equivalence relation≈on the Herbrand universe of P K(K)as the reflexive, symmetric and transitive closure of

{ha, bi |P K(K)|=eq(a, b, c), fora, b, c∈NIΓ ∪NIΣ} Givena, b, c, d∈NIΓ ∪NIΣwitha≈b, it holds that:

(i) ifP K(K)|=inst(a, A, c), thenP K(K)|=inst(b, A, c);

(ii) ifP K(K)|=triple(a, R, d, c), thenP K(K)|=triple(b, R, d, c);

(iii) ifP K(K)|=triple(d, R, a, c), thenP K(K)|=triple(d, R, b, c);

(iv) ifP K(K)|=inst(d, A, a), thenP K(K)|=inst(d, A, b);

(v) ifP K(K)|=triple(c, R, d, a), thenP K(K)|=triple(c, R, d, b);

Proof. By rules (prl-eq2) and (prl-eq3), it follows immediately that ifP K(K)|=eq(a, b, c) then P K(K) |= inst(a, A, c)iff P K(K) |= inst(b, A, c). This also proves point (i)of the assertion. By rule (prl-eq2) and (prl-eq4), we can derive that ifP K(K) |= eq(a, b, c), thenP K(K)|=triple(a, R, d, c)iffP K(K)|=triple(b, R, d, c), prov- ing point(ii). Point(iii)can be proved similarly by rules (prl-eq2) and (prl-eq5).

For point(iv), let us assume that P K(K) |= inst(d, A, a) witha 6= c (other- wise the assertion is immediate). Then, by the definition of the program, it must be thatP G(G)|=eq(a, b,gm). By rules (prl-eq2)-(prl-eq5), in praticular this implies that P G(G) |= triple(a,mod,m,gm)iffP G(G) |= triple(b,mod,m,gm), meaning that, by definition of the translation, they have analogous local programsP C(a)and P C(b)(in which only the “context argument” in the atoms translated byIrlandIloc changes). Thus, we obtain thatP K(K)|=inst(d, A, b). The proof for point(v)fol-

lows from similar reasoning. ut

(18)

Lemma 3. GivenK=hG,{Km}m∈Mia consistent CKR in normal form, andα∈ LΓ

orα∈ LΣ withαan atomic concept or role assertion, thenG|=αimpliesG`α.

Proof. We show by contrapositive that:G6`αimpliesG6|=α. Assuming thatG6`α, then we have by definition thatP G(G)6|=O(α,gm)ifα∈ LΓ orP G(G)6|=O(α,gk) ifα∈ LΣ. Let us assume thatα∈ LΓ (the other case can be proved similarly). Then there exists an Herbrand modelHofP G(G)such thatH 6|=O(α,gm). We show that from this model forP G(G)we can build a model Mfor G(meeting the definition of the CKR model for the global interpretation) such thatM 6|=α, which allow us to derive thatG6|=α.

Let us consider the equivalence relation≈as defined in Lemma 2. We define the equivalence classes[c] = {d | d ≈ c}, that will be used to define the domain of the built interpretation.

ThenM=h∆MMiis defined as follows:

– ∆M={[c]|c∈NIΓ ∪NIΣ};

– For eache∈∆M, we define the projection functionι(e)such that, ife= [c], then ι(e) =bwith a fixedb∈[c];

– cM= [c], for everyc∈NIΓ ∪NIΣ;

– AM = {d ∈ ∆M | H |= inst(ι(d), A,g)}, for everyA ∈ NCΓ ∪NCΣ, with g=gmorg=gk;

– RMis the smallest set such thathd, d0i ∈ RMif one of the following conditions hold:

– H |=triple(ι(d), R, ι(d0),g)withg=gmorg=gk;

– SvR∈Gandhd, d0i ∈SM;

– S◦T vR∈Gandhd, ei ∈SM,he, d0i ∈TMfore∈∆M; – Inv(R, S)∈Gor Inv(S, R)∈Gandhd0, di ∈SM;

Note that by Lemma 2, the definition ofMdoes not depend on the choice of theι([c])∈ [c]. It is easy to see that, givenα∈ LΓwithH 6|=O(α,gm), thenM 6|=α. For example, ifα=C(a), thenH 6|=inst(a,C,gm)which implies by definition thatM 6|=C(a).

In order to show thatMis a model forG, we have to prove thatMsatisfies the definition of global model from the definition of CKR model, and in particular that M |=G. We easily prove thatNM ⊆ CtxM: by the definition of rule (igl-subctx2), for everyc ∈ Nwe have H |= inst(c,Ctx,gm), which impliescM ∈ CtxM. The condition CM ⊆ CtxM for everyC ∈ C can be shown similarly by the rule (igl- subctx1). To prove thatM |=G, we proceed by cases and consider the form of all of the axiomsβ∈ LΓ orβ ∈ LΣ that can appear inG.

– Letβ = A(a) ∈ G, thenH |= inst(a, A,g)10. This directly implies thataM = [a]∈AM.

– Letβ=R(a, b)∈G, thenH |=triple(a, R, b,g). By definition, we directly have thath[a],[b]i ∈RM.

– Letβ =¬R(a, b)∈G, thenH |=negtriple(a, R, b,g). Suppose thath[a],[b]i ∈ RM, thenH |=triple(ι([a]), R, ι([b]),g). By rule (prl-ntriple) and Lemma 2, this would imply that H |= inst(ι([a]),bot,g)contradicting our assumptions on the consistency ofK. Thush[a],[b]i∈/RMas required.

10In the proof of these cases, for simplicity of notation, we assumeg=gmorg=gk.

(19)

– Letβ = (a =b)∈ G, thenH |=eq(a, b,g). By the definition of≈, it holds that a≈b, thus{a, b} ⊆[a]andaM=bM= [a].

– Let β = (a 6= b) ∈ G, thenH |= neq(a, b,g). Suppose that aM = bM, then H |=eq(ι([a]), ι([b]),g). By rule (prl-neq) and Lemma 2, we would obtain thatH |= inst(ι([a]),bot,g). Again, this contradicts our assumptions on the consistency of K. ThusaM6=bMas required.

– Letβ ={a} vB∈G, thenH |=inst(a, B,g). This case can be proved similarly to the caseβ=A(a).

– Letβ=AvB∈G, thenH |=subClass(A, B,g). Ifd∈AM, then by definition H |=inst(ι(d), A,g): by rule (prl-subc) we obtain thatH |=inst(ι(d), B,g)and thusd∈BM.

– Letβ = >(a) ∈ G, thenH |= inst(a,top,g). As in the case forβ = A(a)(in which this case is subsumed), we directly obtain thataM= [a]∈ >M.

– Letβ =⊥(a)∈G. Assuming thatKin input is consistent, this case can not subsist as we would directly derive thatH |=inst(a,bot,g), showing the inconsistency of K.

– Let β = A v ¬B ∈ G, then H |= supNot(A, B,g). Suppose that d ∈ AM, then H |= inst(ι(d), A,g). Moreover, suppose thatd ∈ BM: this implies that H |=inst(ι(d), B,g). By rule (prl-not) and Lemma 2, we would obtain thatH |= inst(ι(d),bot,g). This contradicts our assumptions on the consistency ofK, thus d /∈BMas required.

– Letβ =A1uA2 v B ∈ G, thenH |= subConj(A1, A2, B,g). Ifd ∈ AM1 and d∈AM2 , then by definitionH |=inst(ι(d), A1,g)andH |=inst(ι(d), A2,g). By rule (prl-subconj), we directly obtain thatH |=inst(ι(d), B,g): thusd∈ BMas required.

– Letβ = ∃R.A vB ∈ G, thenH |= subEx(R, A, B,g). Letd ∈ (∃R.A)M: by definition of the semantics this means that there existsd0 ∈AMsuch thathd, d0i ∈ RM. Thus, H |= inst(ι(d0), A,g)and H |= triple(ι(d), R, ι(d0),g). By rule (prl-subex), we obtain thatH |=inst(ι(d), B,g): thusd∈BMas required.

– Letβ =Av ∃R.{a} ∈ G, thenH |=supEx(A, R, a,g). Letd∈AM, thenH |= inst(ι(d), A,g). By rule (prl-subex), this implies thatH |=triple(ι(d), R, a,g):

this proves d, aM

∈RMas required.

– Letβ =A v ∀R.B ∈ G, thenH |=supForall(A, R, B,g). Letd ∈ AM, then H |=inst(ι(d), A,g). Supposing that there existsd0 ∈∆Msuch thathd, d0i ∈RM, we have thatH |=triple(ι(d), R, ι(d0),g). By rule (prl-supforall) this implies that H |=inst(ι(d0), B,g), thus provingd0 ∈BMas required.

– Letβ =Av61R.B ∈G, thenH |=supLeqOne(A, R, B,g). Letd∈AM, then H |= inst(ι(d), A,g). Suppose that there existd1, d2 ∈ ∆M such thathd, d1i ∈ RMandhd, d2i ∈RM, and{d1, d2} ⊆BM. ThusH |={triple(ι(d), R, ι(d1),g), triple(ι(d), R, ι(d2),g),inst(ι(d1), B,g),inst(ι(d2), B,g)}. By (prl-leqone) rule we obtain thatH |=eq(ι(d1), ι(d2),g). This implies thatι(d1)≈ι(d2)and thus they are interpreted as the same domain elementd1=d2inM.

– The cases for β = R v S, R◦S v T and Inv(R, S)follow directly from the interpretation of roles inM.

– Letβ = Dis(R, S)∈G, thenH |=dis(R, S,g). Suppose thathd, d0i ∈ RMand hd, d0i ∈SM. ThenH |=triple(ι(d), R, ι(d0)g)andH |=triple(ι(d), S, ι(d0)g).

Références

Documents relatifs

In our work, we use Semantic Web technology through an ontology to define a hierarchical context model for a user and a requester an rules are defined using the Semantic Web

The Knowledge representation component of ARMISCOM is composed by distributed chronicles, an ontology to correlate faults and repair methods, and a metadata for storing

A CKR knowledge base has a two layered structure, modelled by a global context and a set of local contexts: the global context not only contains the metaknowl- edge defining

The algorithm extends the well known ALC tableaux algorithm [6, 12] and it is based on a combination of local reasoning inside each context with a set of novel rules that

Risk measures like value at risk (VaR) or expected shortfall (ES)[15] are an important instrument to quantify risks, which are in general based on a so called loss distribution,

We have argued so far in this paper that a simple model of provenance, based around the central three provenance operators and the storage of provenance traces, can be used on

Our proposal which is based on DL f- SHIN , consists of the RDF triples syn- tax accommodating the fuzzy element, the fuzzy reasoning engine FiRE and its integration with RDF

newly integrated entities should be edited (using the features of the ontology editor) to fit the requirements of the ontology engineer and the Watson plugin be used to find