24

Click here to load reader

Contextualized knowledge repositories for the Semantic Web

Embed Size (px)

Citation preview

Page 1: Contextualized knowledge repositories for the Semantic Web

Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

Contents lists available at SciVerse ScienceDirect

Web Semantics: Science, Services and Agentson the World Wide Web

journal homepage: ht tp : / /www.elsevier .com/ locate/websem

Contextualized knowledge repositories for the Semantic Web

Luciano Serafini a, Martin Homola a,b,⇑a Fondazione Bruno Kessler, Via Sommarive 18, 38123 Trento, Italyb Comenius University, Faculty of Mathematics, Physics and Informatics, Mlynská dolina, 84248 Bratislava, Slovakia

a r t i c l e i n f o a b s t r a c t

Article history:Available online 17 December 2011

Keywords:Semantic WebKnowledge representationDescription logicsContext

1570-8268/$ - see front matter � 2011 Elsevier B.V. Adoi:10.1016/j.websem.2011.12.003

⇑ Corresponding author at: Comenius University, Faand Informatics, Mlynská dolina, 84248 Bratislava, Sl

E-mail addresses: [email protected] (L. Serafi(M. Homola).

We propose Contextualized Knowledge Repository (CKR): an adaptation of the well studied theories of con-text for the Semantic Web. A CKR is composed of a set of OWL 2 knowledge bases, which are embedded ina context by a set of qualifying attributes (time, space, topic, etc.) specifying the boundaries within whichthe knowledge base is assumed to be true. Contexts of a CKR are organized by a hierarchical coverage rela-tion, which enables an effective representation of knowledge and a flexible method for its reuse betweenthe contexts. The paper defines the syntax and the semantics of CKR; shows that concept satisfiability andsubsumption are decidable with the complexity upper bound of 2NEXPTIME, and it also provides a soundand complete natural deduction calculus that serves to characterize the propagation of knowledgebetween contexts.

� 2011 Elsevier B.V. All rights reserved.

1. Introduction

More and more ontologies and data-sets are being publishedusing the Semantic Web languages such as RDF and OWL. Espe-cially under the recent Linked Open Data initiative, large knowl-edge sources such as DBpedia and Freebase, but also manyothers were conceived and populated. It is also becoming increas-ingly apparent that large portions of the knowledge availablevia these sources are not absolute, but instead they are assumedto hold under certain circumstances. Knowledge may be relativeto certain time period, a geo-political or geo-cultural region,or certain specific topics, etc. Despite these facts, there is a lackof a widely accepted mechanism to qualify knowledge with thecontext in which it is supposed to hold. Instead, contextual infor-mation is often crafted in the ontology identifier or in attributeslike rdfs :comment; owl :AnnotationProperty which do not affectreasoning.

Extensions of the Semantic Web languages with specific mech-anisms that allow to qualify knowledge, e.g., w.r.t. its provenance[1] or w.r.t. time and events [2], were proposed. Among otherworks that offer possible solutions [3–5], the most interesting areALCALC [6] and Metaview [7], however, a widely accepted ap-proach has not yet been reached.

On the other hand, theories of context have been investigatedfor years in the fields of artificial intelligence and knowledge rep-resentation. In his seminal paper [8] McCarthy suggested to for-

ll rights reserved.

culty of Mathematics, Physicsovakia.ni), [email protected]

malize context in terms of first-class objects and utilize it inreasoning. Further research lead to introduction of the context asa box metaphor [9,10] for suitable representations of contexts. Inthis approach, each context is a set of formulae which hold underthe same circumstances and whose boundaries are delimited bya set of dimensional attributes. The two kinds of knowledge in-volved here are separated, the knowledge itself is inside the‘‘box’’ and the contextual meta knowledge is outside. In addition,Lenat [11] proposed to organize the contexts into a hierarchicalstructure called contextual space based on the values of theirdimensions.

To clarify the representational requirements for a contextualrepresentation framework for the Semantic Web let us considerthe following scenario. Suppose we want to represent knowledgeabout Football (FB), FIFA world cups (FWC), national football lea-gues (NFL), world news (WN), and national news (NN). Supposealso that all the information about FWC and NFL should be in-cluded in FB, and that for each nation, all the facts about its NFLshould be included in its NN, and also all the information aboutFWC should be included in WN. On the other hand, only a part ofinformation about NFL should be included in WN (only that ofworldwide interest). A well designed contextual representationformalism should support the following requirements:

Knowledge about context: Knowledge about contexts such ascontextual dimensions and relations between contexts as forinstance that one context is more specific than some other,should be explicitly represented and reasoned about. For exam-ple, we should be able to assert that the context of FWC in 2010is more specific than the contexts of FB and WN in the sameyear.

Page 2: Contextualized knowledge repositories for the Semantic Web

Table 1Syntax and semantics of SROIQ.

Concept constructors Syntax Semantics

Atomic concept A AI

Complement :C DI n CI

Intersection C u D CI \ DI

Existential restriction 9R:Cx 2 DI 9yhx; yi 2 RI

^ y 2 CI

����� �

Self restriction 9R:Self x 2 DI hx; xi 2 RI��� �

Min. card. restriction P nR:Cx 2 DI #fyjhx; yi 2 RI

^ y 2 CI gP n

����� �

Nominal {a} faI g

Role constructors Syntax Semantics

Atomic role R RI

Inverse role R� fhy; xi j hx; yi 2 RI gRole composition S � Q SI � QI

Axioms Syntax Semantics

Concept inclusion (GCI) C v D CI # DI

Role inclusion (RIA) S v R SI # RI

Reflexivity assertion RefðRÞ RI is reflexiveRole disjointness DisðP;RÞ PI \ RI ¼ ;Concept assertion CðaÞ aI 2 CI

Role assertion Rða; bÞ haI ; bI i 2 RI

Negated role assertion :Rða; bÞ haI ; bI i R RI

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 65

Contextually bounded facts: In each context we should be ableto state facts with local effect that do not necessarily propagateeverywhere. For example, an axiom like ‘‘a player is a memberof only one team’’ should be true in some contexts (e.g., FWC,NFL, for each year) but not in more general contexts like FB.Reuse/lifting of facts: To be able to seamlessly reuse the infor-mation contained in more specific contexts. For example, thefacts in FWC should be lifted up into WN and FB. This liftingshould be done without spoiling locality of knowledge.Overlapping and varying domains: Objects can be present inmultiple contexts, but not necessarily in all contexts, e.g., aplayer can exist in both the FWC context and in the NFL con-texts, but many players present in NFL will not be present inFWC.Inconsistency tolerance: Two contexts may possibly containcontradicting facts. For instance NN of Italy could assert that‘‘Cassano is the best player of the world’’, while at the sametime the world news report that ‘‘Rooney is the best player ofthe world’’, without making the whole system inconsistent.Complexity invariance: The qualification of knowledge by con-text should not increase the complexity.

Based on these requirements, we propose a framework calledContextualized Knowledge Repository (CKR), build on top of theexpressive description logic SROIQ [12] that is behind OWL 2[13]. The CKR framework is tailored for the Semantic Web, but itis rooted in the foundations of contextual knowledge representa-tion laid down by previous research in artificial intelligence.Adopting the context as a box paradigm, a CKR knowledge baseis composed of units, called contexts, each qualified by a set ofdimensional attributes that specify its contextual boundaries. Con-texts are organized by a hierarchical coverage relation that regu-lates the propagation of knowledge between them.

After brief preliminaries (Section 2) the paper defines the syn-tax and semantics of CKR (Section 3); then it provides a soundand complete natural deduction calculus that serves to character-ize the propagation of knowledge between contexts (Section 4);and finally it shows that concept satisfiability and subsumptionare decidable with the complexity upper bound of 2NEXPTIME, i.e.,same as for SROIQ (Section 5); related work is then discussedand concluding remarks added in Sections 6 and 7. Detailed proofsof all statements are attached in Appendix.

1 The identity role I is not originally part of SROIQ [12], however it can be easilyintroduced as syntactic sugar by adding the axioms > v 9I: Self and > v :P 2I:>.

2 C t D reduces into :ð:C u :DÞ; 8R:C reduces into :9R::C; 6 nR:C reduces into:P nþ 1R:C; ¼ nR:C reduces into P nR:C u :P nþ 1R:C; SymðRÞ reduces intoR� v R; TraðRÞ reduces into R � R v R; IrrðRÞ reduces into 9R:Self v ?.

2. Preliminaries

The CKR framework is built on top of the SROIQ DL [12] whichis used as the local language of contexts. This language constitutesthe logical foundation of OWL 2 [13] and it is currently the mostexpressive language relevant to the Semantic Web. In this section,we briefly introduce the necessary DL preliminaries. For more de-tails the reader is referred to the works of Horrocks et al. [12] andBaader et al. [14]. Although semantically CKR is able to handle thefull SROIQ DL, in order to achieve decidability of reasoning wewill slightly limit its expressive power as we shall see below.

A DL vocabulary R ¼ NC ] NR ] NI is a set of symbols composedof three mutually disjoint countably infinite subsets: the set NC ofatomic concepts including the top concept > and the bottom con-cept ?, the set NR of atomic roles including the universal role U andthe identity role I, and the set NI of individuals.

Complex concepts (complex roles) are recursively defined as thesmallest set containing all concepts (roles) that can be inductivelyconstructed using the concept (role) constructors in Table 1, whereA is any atomic concept, C and D are any concepts, P and R are anyatomic roles, S and Q are any (possibly complex) roles, a and b areany individuals, and n stands for any positive integer.

A SROIQ knowledge base K ¼ T ;R;Ah i consists of a TBox Twhich contains GCI axioms; an RBoxRwhich contains RIA axioms,reflexivity and role disjointness axioms; and an ABox Awhich con-tains assertions. The syntax of all axioms is shown at the bottom ofTable 1. The closure v�R of the RBox R is defined as follows: ifR v Q 2 R and Q 1 � Q � Q2 v S 2 R then Q1 � R � Q 2 vR S; andv�R is the transitive and reflexive closure on vR.

A DL interpretation is a pair I ¼ DI ; �I� �

where DI is a set calledinterpretation domain and �I is the interpretation function whichprovides denotations for individuals, concepts and roles. InSROIQ, as much as in any classical DL, DI is required to be non-empty. We will see later on that in CKR we will relax from thisrequirement. The interpretation function �I assigns an element aI

of DI to each individual a, a subset CI of DI to each concept C, anda subset RI of the product DI � DI to each role R. In addition forany complex concept and role the respective semantic constraintlisted in Table 1 must be satisfied by �I , plus >I ¼ DI ;?I ¼ ;; UI ¼ DI � DI , and II ¼ f x; xh ijx 2 DIg.1 An axiom / is satis-fied by an interpretation I (denoted I �DL /) if I satisfies the respec-tive semantic constraint listed in Table 1. An interpretation I is amodel of K (denoted I �DL K) if it satisfies all axioms of K.

Only simple roles are allowed in the min cardinality restriction,in the self restriction constructors, as well as in the reflexivity andthe disjointness axioms. Simple roles are defined recursively as fol-lows: (a) atomic role is simple if it does not occur on the right-handside of a RIA inR; (b) an inverse role R� is simple if R is simple; and(c) if R occurs on the right-hand side of a RIA in R and each suchRIA is of the from S v R where S is a simple role, than R is also sim-ple. Also the universal role U is not allowed on the left-hand side ofRIA axioms.

There are additional SROIQ constructors and axioms [12]. Spe-cifically, concept constructors C t D; 8R:C; 6 nR:C and ¼ nR:C, andRBox axioms SymðRÞ; TraðRÞ; IrrðRÞ. Although we occasionally usesome of them to simplify the notation, they are all fully reducible2

Page 3: Contextualized knowledge repositories for the Semantic Web

Fig. 1. Italian national football league under the context as a box metaphor.

66 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

into the core constructs listed in Table 1 which allows us to leavethem out when laying out the theoretical foundation of CKR. Notethat also RefðRÞ is reducible, but only in cases when R is simple(i.e., by replacing it with > v 9R:Self).

Two basic reasoning tasks for SROIQ and for any DL are con-cept satisfiability, the task to decide for a given (possibly complex)concept C whether there is a model I of K such that CI is non-empty; and entailment, the task to decide for some axiom /whether I �DL / for all models I of K (which is then denoted byK �DL /). These two tasks are known to be inter-reducible[12,14]. A tableaux algorithm that decides these two tasks forSROIQ was given by Horrocks et al. [12]. The algorithm, however,requires further syntactic restrictions on the language, as discussedbelow.

It is required that the RBox is regular, which is defined as fol-lows [12]. A regular order on roles � is a strict partial order (i.e.,a transitive and irreflexive binary relation) on roles such thatS � R iff S� � R for any roles S;R. Given a regular order on roles�, a RIA is �-regular if it has one of the following forms: (a)R � R v R; (b) R� v R; (c) S1 � . . . � Sn v R and Si � R for1 6 i 6 n; (d) R � S1 � . . . � Sn v R and Si � R for 1 6 i 6 n; and(e) S1 � . . . � Sn � R v R and Si � R for 1 6 i 6 n. An RBoxR is reg-ular if there exists a regular order � on its roles such that all RIA ofR are �-regular.SROIQ is decidable for knowledge bases with regular RBox.

This is because the restriction assures the existence of a regularautomaton corresponding to the language generated by the RBox,which is then used by the tableaux algorithm [12]. More recentlyan alternative condition called RBox stratification was introducedby Kazakov [15]. Given a preorder (a transitive and reflexive binaryrelation) - on roles, let RgS if R - S and S - R, and let R � S if R - Sand not R g S. A RIA R1 � . . . � Rn v R is --admissible if Ri - R for1 6 i 6 n. Given a set of --admissible RIA R a RIA Q v S is --strat-ified in R, if for every R such that RgS and Q ¼ Q 1 � R � Q2 thereexists P such that Q1 � R v�R P and P � Q 2v�RS. Finally, R is strati-fied if there is some preorder - on R such that every RIA of R is --admissible and every RIA R v S such that R v�R S is --stratified inR.

Stratification is less restrictive then regularity, i.e., every regularRBoxR can be extended into a stratified RBoxR0 modulo-R-equiv-alent toR, but not vice versa [15]. As also showed by Kazakov [15],for deciding satisfiability and entailment with respect to a SROIQknowledge base with stratified RBox it is possible to use the sametableaux algorithm introduced by Horrocks et al. [12]. This is be-cause the existence of the regular automaton required by the algo-rithm is also assured for stratified RBoxes. In order to showdecidability of reasoning in CKR we will rely on this result. In addi-tion, we will slightly limit the expressive power of SROIQ as thelocal language: disjointness axioms DisðR; SÞ will be excluded fromCKR and role reflexivity axioms RefðRÞ will only be allowed if R issimple. Therefore the DL on which CKR is built can be describedas almost full SROIQ. We deem this to be a reasonable sacrificein the expressivity of the local language that allows us to achievethe contextualized representation of knowledge that is enabledby CKR.

3 To improve legibility we will use infix notation for the coverage relations, e.g., weill equivalently use d�Ae instead of �Aðd; eÞ.

3. Contextualized knowledge repository

A CKR is composed of a set of contexts. Following the ‘‘context asa box’’ metaphor [9], a context contains a set of logical statementsand it is qualified by a set of contextual attributes, also calleddimensions. An example of this type of representation is shown inFig. 1 where an excerpt from a context representing the Italian na-tional football league in 2010 is depicted.

It is apparent from this simple example, that there are two lay-ers in this kind of representation, the knowledge itself (we will callthis layer the object knowledge) and the data about the knowledge(which we will call meta knowledge). McCarthy [8] proposed touse an unique language for both types of knowledge, namely quan-tified modal logic. While this is very powerful from the representa-tional perspective (e.g., the structure of context may be inferredout of the object knowledge, etc.), it easily leads to undecidability.At the opposite extreme there are approaches such as multi-con-text systems [16], distributed [17] or package-based descriptionlogics [18], where the context structure is fixed and it is not possi-ble to specify knowledge about contexts, which limits their practi-cal applicability. We therefore propose an intermediate approach,by allowing to specify the context structure and properties in a(simple) logical meta language, but avoiding to mix it with the ob-ject language used within each context in order to maintain goodcomputational properties. In our approach, the meta knowledgeinfluences the object knowledge (in terms of logical consequence)but not vice versa.

3.1. Language of contextual representation

In CKR, contextual attributes are specified in the meta language,with vocabulary called the meta vocabulary. The content of eachcontext is specified in the object language, with vocabulary calledthe object vocabulary. Both of these languages will be DL. The metavocabulary contains a specific set of symbols in order to identifycontexts and to assign dimensional values to contexts. It containsa distinguished set of individuals that will be used as context iden-tifiers. Each dimension is represented by a dedicated role A thatwill be used to assign dimensional values to the contexts, a set ofadmissible dimensional values DA which are individuals, and a role�A which will be used to model the cover relation between dimen-sional values.

Definition 1 (Meta vocabulary). A meta vocabulary C is a DLvocabulary that contains:

1. a set of individuals called context identifiers;2. a finite set of roles A called dimensions;3. a set of individuals DA called dimensional values, for every

dimension A 2 A;4. a role �A, called coverage relation, for every dimension A 2 A.

The number of dimensions k ¼ jAj is assumed to be a fixed con-stant. This will be important in order not to introduce an additionalcomplexity blow up. Also, relevant research on contextual dimen-sions suggests that their number is usually very limited [11]. Themeta assertions of the form AðC; dÞ for a context identifier C andsome d 2 DA (e.g., timeðc0; 2010Þ), state that the value of the dimen-sion A of the context C is d. The meta assertions of the form d�Ae(e.g., Italy�spaceEurope)3 state that the value d of the dimension A is

w

Page 4: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 67

covered by the value e. Depending on the dimension, the coveragerelation has different intuitive meanings, e.g., if A is space then thecoverage relation is topological containment, if A is topic then it is to-pic specificity. It is of course up to the modeller to pick and representthe dimensional coverage appropriately.

The meta vocabulary allows us to construct dimensional vectorsof the form fAi1 :¼ d1; . . . ;Ain :¼ dng which are composed of attri-bute-value declarations such that each Aik is a dimension of Cand each dk is a value from DAik

. In accordance with the contextas a box paradigm, dimensional vectors will be used to identifyeach context by a specific set of dimensional values. They are eitherfull, if a value for each dimension in A is given, or partial, if somedimensions are missing. The set of all full dimensional vectors ofC forms the dimensional space in which contexts will be located.

Definition 2 (Dimensional space). Given a meta vocabulary C withn dimensions A ¼ fA1; . . . ;Ang, let us define:

1. a full dimensional vector in C is a set of attribute-value declara-tions d ¼ fA1 :¼ d1; . . . c;An :¼ dng such that dk 2 DAk

for every kwith 1 6 k 6 n;

2. a partial dimensional vector in C is a set of attribute-value dec-larations dB ¼ fAi1 :¼ d1; . . . c; Aim :¼ dmg such that0 6 m 6 n; dk 2 DAik

for every k with 1 6 k 6 m, andB ¼ fAi1 ; . . . c;Aimg A;

3. DC, the dimensional space respective to C, is the set of all fulldimensional vectors in C;

4. dB þ eC, the completion of dB w.r.t. eC, given two partial dimen-sional vectors dB and eC, is equal todB [ fðAik :¼ dkÞ 2 eCjAik R Bg.

We use bold Latin letters d; e; f, etc. to denote dimensional vec-tors. Given a dimensional vector d and A 2 A, we denote by dA thevalue assigned to A in d (i.e., such that ðA :¼ dAÞ 2 d). If d is partialand it does not contain a value for A, then dA is undefined. Analo-gously for vectors denoted by e; f, etc. Observe that in fact forany full dimensional vector d, and any subset of dimensionsB # A, a partial dimensional vector dB is obtained by projection ofd with respect to the dimensions in B (i.e., dB ¼ fB :¼ dBjB 2 Bg).By definition dA ¼ d. Note that the empty dimensional vector fg isalso a partial dimensional vector in C.

One may object that for encoding a set of attributes with struc-tured value-sets in the meta knowledge, such a powerful formal-ism as DL may be unnecessary. Several examples using simplyordered sets are found in the literature [5,19,20]. We have howeverintentionally chosen DL, as this brings the option to employ rea-soning also at the meta level. As the dimensional values are normalDL individuals, one may assign them into classes and expressconstraints on them. Consider for instance the location dimensioncorresponding to geographical regions. One may sort the valuesinto classes such as Country; City; CapitalCity, etc., and requiree.g. Country v 9��location:CapitalCity, that is that every country has acapital city as its subregion. One may further notice that for thosecontexts which have an instance of City assigned as the value of thelocation dimension, there may possibly be a large part of sharedknowledge, especially axioms at the TBox level. In such a case itmight be useful to group all these axioms into some kind of a con-text class (we have investigated this in our previous work [21] andimplemented context classes in our prototype implementation).This line of research is beyond the scope of this paper, but it justi-fies DL as our choice of meta language. In addition, in Section 5 weshow that the complexity of reasoning with CKR is in the sameclass as for the object language (i.e., 2NEXPTIME in case of SROIQ).

Inside the contexts, knowledge is encoded using the objectvocabulary. This is again a DL-vocabulary. While the object vocab-ulary is shared between all contexts in a CKR knowledge base, the

symbols may have different interpretation in different contexts.This is very natural when modeling contextualized information.For instance, in the context of FIFA WC 2010 the concept Finalist

represents the finalist teams of the FIFA WC 2010, while in the con-text of FIFA WC 2006, the same concept represents the finalists ofthe 2006 edition of FIFA WC. Locality, however, does not implyopacity. When information propagates across contexts, we need away to refer to the specific interpretation of a symbol in a remotecontext. To be able to do this, we introduce so called qualified sym-bols into the object vocabulary. These are symbols with a dimen-sional vector in subscript which indicates with respect to whichcontext the symbol should be interpreted.

Definition 3 (Object vocabulary). Let C be a meta vocabulary.Given any DL-vocabulary RB, an object vocabulary R is anextension of RB such that for every concept/role symbol X in RB

(including >; U; I, but excluding ?), and for every dimensionalvector d (full or partial), R contains the concept/role symbol Xd.

An object vocabulary R is possibly constructed on top of any DL-vocabulary RB. In such a case, RB is called the base-vocabulary of R.Any symbol from R n RB is called qualified symbol. Concepts androles of RB are non-qualified, but they can also be perceived asqualified with respect to the empty dimensional vector fg. If noambiguity arises, we skip the brackets and the attribute names,so instead of e.g. Xflocation:¼Italy;time:¼2010g we will write XItaly;2010, etc.Qualified symbols will be given a special interpretation by theCKR semantics, but they are used just like any other concept/rolesymbols. For instance, in the context of football 2005–2010 onewould like to define the concept TopTeam as the set of teams thatreached the final phase in at least one edition of the FIFA WC in thelast 5 years (note that FIFA WC is run every 4 years). Given thedimensional value FWC for the topic FIFA World Cup and2006; 2010, etc. for years, the concept TopTeam can be defined withthe following axiom:

TopTeam FinalistFWC;2010 t FinalistFWC;2006

Such an approach is reminiscent of the knowledge qualificationand unqualification operations (also context push and pop) asknown from the literature [9]. These operations allow for a state-ment to be popped out of the context, preserving its meaning, bymodifying it to make the contextual parameters explicit. Or inthe opposite direction, a qualified statement can be pushed insidea context and some of its qualifying parameters stripped. Later onwe will formalize these operations in the CKR framework using aspecial operator called the @ operator.

3.2. Syntax of CKR

A context is a unit of knowledge, from which a CKR knowledgebase is composed. Each context has an identifier, a set of dimen-sional attributes, one for each dimension, which are respective tosome meta vocabulary C, and it features a DL knowledge base oversome object vocabulary R.

Definition 4 (Context). Given a meta vocabulary C and an objectvocabulary R, a context on hC;Ri is a triple hC;dimðCÞ;KðCÞi where:

1. C is a context identifier of C;2. dimðCÞ is a full dimensional vector of DC;3. KðCÞ is a SROIQ knowledge base over R.

Note that while symbols appearing inside contexts can possiblybe qualified with partial dimensional vectors, dimðCÞ, the dimen-

Page 5: Contextualized knowledge repositories for the Semantic Web

68 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

sional vector on which the context C resides, is always a full dimen-sional vector in DC. We use the notation Cd to denote a contextwith dimðCÞ ¼ d.

Finally, a CKR knowledge base is composed of a collection ofcontexts and an additional DL knowledge base over the metavocabulary which will be called meta knowledge. The meta knowl-edge assigns dimensional values to each context and it also assertsa hierarchical organization of contexts, which will be called con-text coverage. This hierarchy is recorded by asserting a strict par-tial order on the dimensional values of each dimensionalattribute A 2 A using the role �A.

Definition 5 (Contextualized Knowledge Repository). Let C be ameta vocabulary and let R be an object vocabulary. A Contextu-alized Knowledge Repository (CKR) on hC;Ri is a pair K ¼ hM;Cisuch that:

1. C is a set of contexts on hC;Ri;2. M, called meta knowledge, is a DL knowledge base on C such

that:(a) every A 2 A is declared a functional role;(b) for every C 2 C with dimðCÞ ¼ d and for every A 2 A we have

M � AðC; dAÞ;(c) for every A 2 A, the relation fd�Ad0jM � �Aðd; d0Þg is a strict

partial order on DA.

Fig. 2. Coverage relation between contexts.

To indicate that a formula / belongs to a context Cd of a CKR K

we will often write d : / instead of just /. Similarly, by the notationd : / 2 K we mean that / 2 Cd, where Cd is a context of K; and byK [ fd : /g (K n fd : /gÞ we denote a new CKR constructed by add-ing / to Cd (respectively subtracting it).

Note that functional roles required by the definition above arequite common in DL (SHIF and all more expressive logics).Although this is not so common, in SROIQ (and therefore inOWL 2) it is possible to implement also strict partial order of thedimensional coverage (particularly, by asserting Trað�AÞ andIrrð�AÞ). On the other hand, in simpler logics it is possible to assureappropriate structure of the dimensions simply by enumeratingthe coverage in the ABox. The order is required to ensure areasonable hierarchical organization of the contexts in a CKRknowledge base. In expressive logics we are able to verifythe order automatically. If the logic is not expressive enough, wecan still organize the knowledge base and verify the order extra-logically (e.g., we can use some other programmatic means forthat). Therefore CKR may indeed be built with simpler, moretractable logics: an RDFS-based version has already been devel-oped [22].

The coverage relation between the dimensional values of eachdimension encoded in the meta knowledge provides the base forthe coverage between dimensional vectors and contexts. Onedimensional vector covers another, if its dimensional values cov-er the values of the other, one by one. That is, the coverage be-tween dimensional vectors (�) is a product of the dimensionalorder relations �A. One context covers another if the same holdsfor their associated dimensional vectors. We will also introducea handy notation for coverage with respect to a subset of dimen-sions only (�B).

Definition 6 (Coverage). Given a CKR K on C;Rh i with dimensionsA, given any dimension A 2 A and any two dimensional valuesd; d0 2 DA, given any two dimensional vectors d and e (full orpartial), any subset B # A, and given any two contexts C and C0 wesay that:

1. d covers d0 w.r.t. A (denoted d�Ad0) if M � �Aðd; d0Þ; we denoteby d�Ad0 if d � Ad0 or M � d ¼ d0;

2. e covers d w.r.t. B (denoted d�Be) if dB�BeB for all B 2 B anddB�BeB at least for one B 2 B; we denote by d�B e if d�Be orM � dB ¼ eB for all B 2 B;

3. e covers d (denoted d � e) if d�Ae; we denote by d � e if d�Ae;4. C0 covers C (denoted C � C0) if dimðCÞ � dimðC0Þ; we denote by

C � C0 if dimðCÞ � dimðC0Þ:

Note that d � e implies that d and e are defined on the same setof dimensions. If d�Be, then d and e may be defined on a differentset of dimensions but both must be defined on all dimensions ofB # A.

Intuitively, if one context covers another, its perspective isbroader. For instance, the context concerned with football in gen-eral would cover the contexts of FIFA World Cup and contexts con-cerned with national football leagues. To give an example, let usnow formally model the coverage relation for the contexts de-scribed in the introduction. We will have the topic dimension withthe following values in Dtopic: FB (football), FWC (FIFA World Cup),NFL (National football league), WN (world news), NN (nationalnews). The space dimension will have the values world; africa anditaly in Dspace. The time dimension will have only one value 2010.The following coverage between the dimensional values will be as-serted in the ABox of M:

FWC�topicWN NFL�topicFB africa�spaceworld

FWC�topicFB NFL�topicNN italy�spaceworld:

The fact that the FWC is covered by WN in this example is due toworld news report on the World Cup together with other topics,therefore this context is broader. Similarly for NFL and NN. The con-text coverage relation generated from this coverage betweendimensional values is shown in Fig. 2.

3.3. Semantics of CKR

The semantics of CKR relies on the DL semantics inside eachcontext (local semantics), while the relations between the contextsare handled by some additional semantic conditions. Local inter-pretation and local models are like standard DL-interpretationsand models with two notable exceptions: empty domains are al-lowed; and, while all contexts in a CKR share a common objectvocabulary R, not every symbol of R needs to be interpreted byeach local interpretation. This will be especially true in case of indi-viduals which may but also may not be meaningful in a givencontext.

Definition 7 (Local Interpretation). Given a CKR K over hC;Ri withR ¼ NC ] NR ] NI, and a context Cd of K, a pair Id ¼ hDd; �Id i is alocal interpretation of Cd if:

1. either Dd ¼ ;;2. or there exists N0I # NI s.t. Id is a DL-interpretation over

R0 ¼ NC ] NR ] N0I.

Note that for any complex concept or role X;XId is defined onlyif it is defined also for every individual occurring in X. In the follow-ing, whenever we write XId then we also mean that Id is definedfor X. Observe in the definition below, that in a local model Id of

Page 6: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 69

Cd; Id is necessarily defined on every individual actually occurringin Cd. It may be defined on some individuals in addition due to thesemantic relations between contexts.

Definition 8 (Local Model). Given a CKR K, a context Cd of K, a localinterpretation Id is a local model of Cd (denoted Id �DL Cd) ifId �DL / for every axiom / 2 KðCdÞ.

Note that the local interpretation with empty domain triviallysatisfies any TBox or RBox axiom (e.g., C v D is satisfied becauseboth CId ¼ ; and DId ¼ ; if Dd ¼ ;). Therefore such an interpreta-tion is always a model of any context that does not explicitly con-tain individuals. On the other hand, if at least one individual iscontained inside a context then such an interpretation is no longera model.

A model of a CKR knowledge base is a collection of local models,one for each context, which are bound together by further seman-tic conditions in order to take into account relations between con-texts. In a CKR model, local domains may possibly overlap,reflecting the fact that the contexts may possibly describe samethings from a different perspective. Local domains will be orga-nized in accordance with the coverage hierarchy. In addition spe-cial attention is given to individuals, which are interpretedequally if they occur in two contexts that share a common super-context, and the meaning for the qualified concepts and roles isprovided.

Definition 9 (CKR Model). A model of a CKR K is a collectionI ¼ fIdgd2DC

of local models such that for all d; e, and f, for everyatomic concept A, atomic role R, atomic concept/role X andindividual a:

1. ð>dÞI f # ð>eÞI f if d � e,2. ðAfÞId # ð>fÞId ,3. ðRfÞId # ð>fÞId � ð>fÞId ,4. aIe ¼ aId ; given d � e; either if aId is defined; or aIe is

defined and aIe 2 Dd,5. ðXdB Þ

Ie ¼ ðXdBþeÞIe ,6. ðXdÞIe ¼ ðXdÞId if d � e,7. ðAfÞId ¼ ðAfÞIe \ Dd if d � e,8. ðRfÞId ¼ ðRfÞIe \ ðDd � DdÞ if d � e,9. Id �DL Cd.

Let us now explain the semantic constraints imposed in CKRmodels passing through the conditions of the definition one byone.

Condition 1. Given Cd � Ce, the perspective of Cd is narrowerthan of Ce and vice versa the perspective of Ce is broader thanof Cd. Condition 1 implements this in the semantics. It hastwo practical consequences: Firstly, together with Conditions5 and 6 it implies that Dd is required to be a subset of De inany CKR model if d � e. This follows as indicated above the ¼and # relations:

Dd ¼ >Id ¼ð5Þ >Idd ¼ð6Þ >Ie

d #ð1Þ>Ie

e ¼ð5Þ >Ie ¼ De: ð1Þ

This is a basic premise in order to make the knowledge of Cd

accessible to Ce by the latter constraints.The second consequence of Condition 1 is that if Cd � Ce, thenany other context Cf is aware of this in the sense that>I f

d #>I fe . This allows for some basic desirable properties of rea-

soning about the knowledge of other contexts. For instance, inany context it is entailed that >FWC;2010;Africa v >FB;2010;World (giventhat FWC � FB and Africa �World). Hence if an individual isknown to belong to the context of FIFA WC 2010, we always

know that it also belongs to the context of football of the sameyear.Conditions 2 and 3 take care that in every context Cd the inter-pretations of symbols qualified with some f are roofed underthe concept >f which thus represents the domain of Cf asviewed inside Cd and in a CKR model >Id

f represents the imagethat Id keeps of Df . That is for instance TeamFWC;2010;Africa

v >FWC;2010;Africa holds in any context. Or if a qualified role suchas hasPlayerFWC;2010;Africa occurs in some context, it is assured bythe semantics that all its possible values are always instancesof >FWC;2010;Africa, i.e., individuals that are known to occur inCFWC;2010;Africa.As implied by further conditions the image of Df in Cd (i.e., theset>Id

f ) may be but as well may not be entirely precise, depend-ing on how Cd and Cf are related by the coverage. As we learnedfrom Eq. (1), this image is necessarily precise in cases whend � f. In the opposite case, the image of the domain of asuper-context is a narrowing of the original domain (i.e.,>Id

f # Df if d � f). If neither d � f nor f � d then the image iseven less precise and there can be elements in >Id

f which donot belong to Df at all.Condition 4 is responsible for the semantic treatment of indi-viduals in CKR. If a narrower context Cd is covered by abroader context Ce, and an individual a is defined in both ofthese contexts, then the interpretation of a must be equal inboth of these contexts. This is assured by propagating thesemantics of a from Cd into Ce, but not necessarily the otherway around: if aId is defined then aIe must be defined andmust be equal to Ie; on the other hand, if aIe is defined thenaId must be defined to the same value only if aIe is part of theCe’s image of >d.One practical consequence of this treatment is that if the sameindividual a occurs in two context which share at least onecommon super-context, it has the same interpretation.Another consequence is that it allows to predicate about(non)existence of objects in a context from a broader context.For instance if >FWC;2010;AfricaðEnglandÞ and :>FWC;2010;AfricaðEgyptÞare stated in a context broader than CFWC;2010;Africa (e.g., inCFB;2010;World), as a consequence it is implied that England partic-ipates in the last FIFA WC while Egypt does not. That is, on thesemantic level the individual England is always defined in thiscontext while the individual Egypt is always undefined in it.Condition 5 provides meaning for partially qualified symbols. Itassures that the values for attributes which are not specified arealways taken from the current context in which the expressionappears. Therefore in the end all symbols even those partiallyqualified are treated as fully qualified by the semantics. It isimportant to understand that also symbols with no qualifyingvectors are viewed as qualified symbols, they are qualified withthe empty dimensional vector fg. Their qualification is takenfrom the context in which they appear and they are thenceforthtreated as fully qualified by the semantics.Due to this kind of treatment, partially qualified symbols are infact some syntactic sugar added to the framework, for instance,instead of CoachFB;World we can equivalently use CoachFB;2010;World

inside CFWC;2010;Africa and instead of playsFor we can equivalentlyuse playsForFWC;2010;Africa in the very same context. On the otherhand, we consider partially qualified symbols necessary inorder to achieve practical usability of the framework.Condition 6, 7, and 8 provide semantics for qualified symbols.It is ensured that the meaning of a symbol Xd is based on itsinterpretation in Cd as much as the partially overlappingdomains allow. Therefore the propagation of knowledge isrespective to the hierarchy of contexts as follows.Condition 6 states that the interpretation of Xd is strictly boundto XId in all contexts that cover Cd. This is indeed possible due to

Page 7: Contextualized knowledge repositories for the Semantic Web

70 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

the fact that Dd is totally contained the interpretation domainsof all such contexts, which is assured by Condition 1. For exam-ple, the interpretation of TeamFWC;2010;Africa in ChFB;2010;Worldi is thesame as the interpretation of Team in the context ChFWC;2010;Africai.Conditions 7 and 8 assure that given Cd � Ce and a symbol Xf ,where f is not necessarily related to d or e, the two interpreta-tions of Xf in Id and Ie are equal modulo the interpretationdomain of the narrower context Dd. This especially implies thatif a particular individual (or pair of individuals if X is a role)occurs in both contexts Cd and Ce, then it ether belongs to bothXId

f and XIef or it belongs to none of them. Consider our example

CKR from Fig. 2. In this CKR the contexts Cwn (the context ofworld news 2010) and Cf (the context of football in 2010) areunrelated. Therefore if a qualified concept Playerf occurs insideCwn we cannot be sure that all its instances belong to thedomain of Cf . Due to Condition 7 however, the interpretationsassigned to Playerf by Cwn and Cwc must agree as much as thepartially overlapping domains permit (because wc � wn).Similarly, as wc � f, the interpretations assigned to Playerf byCwc and Cf must agree as much as the domains permit. Henceif one of the instances of Playerf in Cwn is a constant Rooney,which also appears in Cwc, then due to Condition 7 we have thatRooneyIe 2 Dwc and we already showed that Dwc # Df in Eq. (1).For further details see Examples 1–3 where we study somebasic properties of such a semantics.Condition 9 states that in a CKR model, the local interpretationId of each context Cd is also a model of Cd according to the localsemantics, i.e., that of DL.

The two classic reasoning tasks for DL are satisfiability of con-cepts and entailment (especially of subsumption formulae) withrespect to a knowledge base. In a CKR model, a formula may be sat-isfied in one context but in another it may be unsatisfied. In addi-tion, for some contexts in a knowledge base, all admissible CKRmodels may have a local model with empty domain whereas forother contexts there may be CKR models with non-empty local do-main. Therefore given a CKR K one has to specify with respect towhich context the reasoning task in question is to be evaluated.Such reasoning tasks will be called d-satisfiability of conceptsand d-entailment.

Definition 10 (d-satisfiability of concepts). Given a CKR knowledgebase K over C;Rh i with d 2 DC and a concept C over R, we say thatC is d-satisfiable w.r.t. K if there exists a CKR model I ¼ fIege2DC

of K such that CId – ;.

Definition 11 (d-entailment). Given a CKR knowledge base K overC;Rh i with d 2 DC and any formula / over R with syntax listed in

Table 1 under Axioms, we say that / is d-entailed by K (denoted byK � d : /) if for every CKR model I ¼ fIege2DC

of K we haveId �DL /.

In addition, we consider satisfiability of a CKR knowledge baseas a decision task. In this case it makes sense to define d-satisfia-bility as well as global satisfiability.

Definition 12 (d-satisfiability). A CKR knowledge base K overC;Rh i with d 2 DC is said to be d-satisfiable if there exists a CKR

model I ¼ fIege2DCof K such that Dd – ;.

4 Decidability is guaranteed under the assumption that the knowledge base isratified (see [15] for more details), and we have to impose this condition also for

CKR. This point is discussed later.

Definition 13 (Global satisfiability). A CKR knowledge base K

over C;Rh i is said to globally satisfiable if there exists a CKRmodel I ¼ fIdgd2DC

of K such that for every d 2 DC we haveDd – ;.

As usual with DL, the d-entailment (of concept subsumption)and d-(un)satisfiability are inter-reducible: K � d : C v D iffC u :D is not d-satisfiable w.r.t. K; on the other hand, C is d-satisfi-able w.r.t. K iff K 2 d : C v ?. In addition, C is d-satisfiable w.r.t. K

iff K [ fd : CðaÞg is d-satisfiable where a is a new constant pre-viously unused in K. This follows from the fact that local modelsare all valid SROIQ models and from the fact that the reductionholds in SROIQ. For details on these reductions see for instancethe DL Handbook by Baader et al. [14].

4. Reasoning in CKR

In this section we provide a characterization of entailment inCKR in terms of a natural deduction (ND) calculus [23]. CKR entail-ment is the product of two orthogonal semantic entailments: localentailment and cross-context entailment, The former is induced bythe local semantics and coincides with entailment in SROIQ;the latter is induced by the constraints that Definition 9 imposeson each pair of contexts related via coverage. SROIQ entailment,i.e., /1; . . . ;/n �DL /, is known to be decidable.4 We therefore as-sume a black box decision procedure that checks if /1; . . . ;/n �DL /.

Reasoning rules in the ND calculus allow to deduce conclusionsin one of the contexts based on evidence from other contexts, theyare therefore a kind of bridge rules [16]. As an example consider thefollowing simple bridge rule:

d : A v B d � ee : Ad v Bd

: ð2Þ

The rule implies that whenever A v B is true in a context Cd

such that d � e, then Ad v Bd should be true in Ce. This is indeedsound thanks to Conditions 5 and 6 of Definition 9 which to-gether impose that in any CKR model I the interpretation of Aand B in Id coincide respectively with the interpretations of Ad

and Bd in Ie.The rationale of rule (2) is that a statement in a narrower con-

text, namely Cd, can be embedded into a larger context, namely Ce,by applying a transformation that preserves semantics. We gener-alize this idea by introducing the notion of embedding between DLknowledge bases and by showing that in CKR such embedding pre-serves the meaning of SROIQ expressions.

4.1. Embedding of DL knowledge bases

A DL embedding is a mapping that embeds a DL knowledge basewith a narrower perspective into another one with a broader per-spective. The vocabulary of the context being embedded splits intwo parts: Rc that contains symbols which are completely specifiedwith respect to the embedded context, and Re that contains theremaining symbols which are called external. For instance, the sym-bol Playersports is external in the context CFB;2010;World, This is becauseFB � sports. If we state the axiom Playersports v 9:playsFor:Team here,it is only valid in this context where all the players are football play-ers and football is a team sport. In other sports such as tennis playersneed not have to play for a team. Therefore, when embedding the ax-iom into the broader context of sports we need to take care to embedthe proper meaning of the axiom it has in FB and so we need to payattention to external symbols.

Definition 14 (DL embedding). Let R and R0 be two DL alphabets,and let R be partitioned into two disjoint sets Rc and Re with> 2 Rc . A DL embedding is a total function f : R! R0 that maps

st

Page 8: Contextualized knowledge repositories for the Semantic Web

Table 2DL-embedding on complex expressions and axioms.

f �ðAÞ ¼ f ðAÞ if A 2 Rc

f ð>Þ u f ðAÞ if A 2 Re

f �ðRÞ ¼ f ðRÞ if R 2 Rc

f ðIÞ � f ðRÞ � f ðIÞ if R 2 Re

�f �ð:CÞ ¼ f ð>Þ u :f �ðCÞf �ð?Þ ¼?f �ðR�Þ ¼ ðf ðRÞÞ�f �ðR � SÞ ¼ f �ðRÞ � f �ðSÞ

f �ðC u DÞ ¼ f �ðCÞ u f �ðDÞf �ð9R:CÞ ¼ 9f ðRÞ:f �ðCÞ if R 2 Rc

f ð>Þ u 9f ðRÞ:f �ðCÞ if R 2 Re

f �ð9R:SelfÞ ¼ 9f ðRÞ:Self if R 2 Rc

f ð>Þ u 9f ðRÞ:Self if R 2 Re

f �ðPnR:CÞ ¼ Pnf ðRÞ:f �ðCÞ if R 2 Rc

f ð>ÞuPnf ðRÞ:f �ðCÞ if R 2 Re

�f �ðfagÞ ¼ ff ðaÞg

f �ðCðaÞÞ ¼ f �ðCÞðf ðaÞÞf �ðRða; bÞÞ ¼ f ðRÞðf ðaÞ; f ðbÞÞf �ð:Rða; bÞÞ ¼ :f ðRÞðf ðaÞ; f ðbÞÞf �ðC v DÞ ¼ f �ðCÞ v f �ðDÞf �ðR v SÞ ¼ f �ðRÞ v f ðSÞf �ða ¼ bÞ ¼ f ðaÞ ¼ f ðbÞf �ða – bÞ ¼ f ðaÞ – f ðbÞ

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 71

individuals, atomic concepts, and atomic roles of R to individuals,atomic concepts, and atomic roles of R0 respectively. The extensionf � of f that maps complex expressions and axioms over R intocomplex expressions and axioms over R0 is defined as given inTable 2.

The DL embedding is done on the syntactic level. On the seman-tic level, if one knowledge base is embedded into another, weshould be able to embed models of the former knowledge baseto the models of the latter. A pair of such models is said to be com-plying with the embedding.

Definition 15 (Embedding-complying interpretations). Two DL-interpretations I and I0 of R and R0 respectively comply with theDL embedding f if:

1. aI ¼ f ðaÞI0, for each individual a of R such that aI is defined;

2. XI ¼ f ðXÞI0, for each concept/role X 2 Rc;

3. AI ¼ f ðAÞI0\ f ð>ÞI

0, for each concept A 2 Re;

4. RI ¼ f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0, for each role R 2 Re.

If two interpretations I and I0 comply with the embedding fthen I0 is apparently an extension of I . It contains the domain Dof I as D ¼ f ð>ÞI

0# D0 and the f-images of all internal symbols of

Rc are interpreted inside f ð>ÞI0. The images of external symbols

of Re can possibly exceed f ð>ÞI0

when interpreted in I0 but wecan always obtain the corresponding interpretations oftheir pre-images by restriction to f ð>ÞI

0. This corresponds to

the fact that the symbols external to R are not completely spec-ified in I .

An important point is that the meaning of any symbol, internalor external, with respect to I can always be retained from I0. Thefollowing lemma shows that this is also true for complex descrip-tions composed of a mixture of internal and external symbols andas a consequence also the meaning of axioms is preserved.

Lemma 1. If two DL-interpretations I and I0 comply with theembedding f : R! R0, then, for every concept C; CI ¼ ðf �ðCÞÞI

0, for

every role R; RI ¼ ðf �ðRÞÞI0, and for every axiom /; I � / iff

I0 � f �ð/Þ.

Proof (Sketch). Full proof is listed in A.1. The first claim of thelemma, concerned with concepts and roles, is proved by struc-tural induction. The base case (i.e., for atomic concepts androles) follows from the fact that the interpretations I and I0comply with the embedding f (Definition 15). For every type ofcomplex concept and role we then have to argue the claim fromthe induction hypothesis, from the construction of f � (Table 2),and from basic properties of DL-interpretations. The secondclaim of the lemma that is concerned with axioms is thenproved for each type of axioms, mostly as a consequence ofthe first claim. h

Armed with this result we will now show that given any CKRK and any two contexts Cd and Ce such that d � e it is possibleto construct a DL-embedding between Cd and Ce. For conve-

nience we will call this embedding the @d operator. For any con-struct / the embedded value will be /@d. The operator willallow us to characterize the knowledge propagation in CKR alongthe two basic axes, from narrower to broader context and viceversa. Later on in Section 5 we will find another use for embed-dings, when showing how CKR can be reduced into a regular DLknowledge base.

Definition 16 (@d operator). For every full dimensional vector d,the operator ð�Þ@d is defined as f �d ð�Þ, where fd is an embeddingfrom R into itself defined as follows:

� fdðaÞ ¼ a for every individual a;� fd X 0dB

¼ Xd0Bþd for every concept/role X;

� Rc ¼ X0dB2 Rjd0B � dB

n o; Re ¼ R n Rc .

For instance if the concept Team occurs in Cd withd ¼ fFWC; 2010;Africag, it belongs to Rc as d0B � dB for B ¼ ;. HenceTeam@d ¼ TeamFWC;2010;Africa. This is natural, as in a context widerthan Cd the concept TeamFWC;2010;Africa is fully defined by Team inCd. But NationalTeamFB R Rc as FB � FWC. Hence we haveNationalTeamFB@d ¼ NationalTeamFB;2010;Africa u >FWC;2010;Africa. Intui-tively, in order to embed NationalTeamFB from Cd into a broadercontext one must restrict it to >FWC;2010;Africa because its interpreta-tion in the broader context may be broader.

Lemma 2. Given a CKR K with two contexts Cd and Ce such thatd � e, and given any model I of K, the pair of local interpretations Id

and Ie complies with the embedding fd respective to the operator @d.

Proof. Let K be a CKR over hC;Ri. Let Cd; Ce be two contexts of K

such that d � e. Let the @d operator be defined on the embeddingfd : R! R as given in Definition 16, that is, we haveRc ¼ fXd0B

2 Rjd0B � dBg and Re ¼ R n Rc . We need to show that allfour conditions of Definition 15 are satisfied:

1. aId ¼ fdðaÞIe , for each individual a of R such that aId is defined:this follows from the Condition 4 of Definition 9;

2. XId ¼ fdðXÞIe , for each concept/role X 2 Rc. In this case X ¼ Yd0Bfor some d0B � dB. If d0B ¼ dB then Yd0Bþd ¼ Yd and the proposition

follows either trivially if d ¼ e or directly from Condition 6 ifd � e. Now assume that d0B � dB. From Definition 9 we have

XId ¼ YIdd0B¼ YId

d0Bþd (Condition 5), and YIdd0Bþd ¼ YIe

d0Bþd because

d0B þ d � d � e (Condition 6). Finally, from the construction of

fd; YIed0Bþd ¼ fd Yd0B

Ie

¼ fdðXÞIe ;

3. AId ¼ fdðAÞIe \ fdð>ÞIe , for each concept A 2 Re; In this caseA ¼ Bd0B

with d0B � dB. From Definition 9 we have

AId ¼ BIdd0B¼ BId

d0Bþd (Condition 5), and BIdd0Bþd ¼ BIe

d0Bþd \ Dd (Condi-

tion 7). As Dd ¼ >Id ¼ >Idd ¼ >

Ied (Condition 5, then Condition

6), we finally get BIed0Bþd \ Dd ¼ BIe

d0Bþd \ >Ied ¼ fdðBdB Þ

Ie\

fdð>ÞIe ¼ fdðAÞIe \ fdð>ÞIe from the construction of fd;

Page 9: Contextualized knowledge repositories for the Semantic Web

Table 3CKR Inference rules.

d : /1 . . . d : /n f/1 . . . /ng � /d : /

LReasd :? ðaÞ

e : > v ?Botd � e

f : Ad v >e

�f : 9Rd> v >d

�f : > v 8Rd>d

Tope : /@d e : >dða1Þ � � � e : >dðanÞ d � e

d : /Push

d : / d � ee : /@d

Pop

d : A t BðxÞ ½d : AðxÞ ½d : BðxÞ e : / e : /

e : /t E

d : 9R:AðxÞ ½d : Rðx; yÞ; d : AðyÞ e : /e : /

9E

½d : >ðaÞ d : > v ?d : > v ? aE

d :P nR:AðxÞ ½d : yi – yj; d : Rðx; yiÞ; d : AðyiÞ 16i – j6ne : /

e : /ðP nÞE

Restrictions: (1) LReas can be applied if every individual occurring in / occurs in a /i for some 1 6 i 6 n; (2) in the Push rule a1; . . . ; an are assumed to be all individualsoccurring in /; (3) the individuals a; y, and yi; 1 6 i 6 n, occurring in aE; 9E, and ðP nÞE are new, not occurring elsewhere in K and the proof apart from the assumptionsdischarded by these rules.

72 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

4. RId ¼ fdðRÞIe \ fdð>ÞIe � fdð>ÞIe , for each role R 2 Re: this case isexactly analogous to the previous one, only we need to use Con-dition 8 instead of Condition 7 of Definition 9 which is con-cerned with roles. h

4.2. ND calculus for CKR

We now briefly introduce natural deduction (ND), for more de-tails see the work of Prawitz [23]. An ND calculus is a set of infer-ence rules of the form:

½Bnþ1 ½Bnþm a1 . . . an anþ1 . . . anþm

aq

ð3Þ

with n;m P 0, where for all i; ai and a are formulae, Bi are setsof formulae. The formulae ai are the premises of q;a is the con-clusion, and Bi are the assumptions discharged by q. A deductionof a depending on a set of formulae U is a tree rooted in a induc-tively constructed starting from a set of assumptions included inU by applying the inference rules. Formally deduction is definedby induction:

1. a formula a is a deduction of a depending on fag;2. if for each 1 6 i 6 nþm; Pi is a deduction of ai depending on

Ui and the calculus contains the rule (3), then

P1 . . . Pnþm

aq

is a deduction of a depending onSn

i¼1Ui� �

[Snþm

i¼nþ1 Ui n Bið Þ� �

.

A formula a is derivable from U if there is a deduction of adepending on a subset of U. a is provable if it is derivable formthe empty set.

A ND system for a CKR K ¼ hM;Ci over hC;Ri is shown in Table3. The premises of the ND rules of our calculus are either object for-mulae of the form d : / where d 2 DC and / is a DL formula over R,or meta formulae l over C. Conclusions and discharged assump-tions are always object formulae.

Definition 17 (Derivability in CKR). Given a CKR K ¼ hM;Ci overhC;Ri and a set of object formulae U, an object formula d : / isderivable from K and U (denoted by K;U ‘ d : /) if it is derivable inthe calculus given in Table 3 from the set W which contains thefollowing formulae:

1. e : v, for every v 2 Ce and for every e 2 DC;2. l, for every meta formula such that M �DL l;3. w, for all w 2 U.

Instead of K; ; ‘ d : / we simply write K ‘ d : /. Even if ND der-ivations are formally defined as trees, we will often present them

as a sequence of derivation steps. This can be naturally achieved,we only have to track the set of premises from which the resultingformula in each step is derived. Hereafter ‘ always denotes thiscalculus as formally defined by Definition 17, and whenever wesay proof calculus or just calculus, we refer exactly to this calculus.The proof calculus allows us to define the syntactic notion of d-consistence of a CKR knowledge base.

Definition 18 (d-consistence). A CKR K is d-consistent if it is notpossible to prove d : > v ? by the calculus, i.e., if K 0 d : > v ?.Otherwise K is d-inconsistent.

The first main result of this work is presented in Theorem 1where the calculus is showed to be a sound and complete charac-terization of logical consequence in CKR. In other words, the calcu-lus rules show us how logical consequence is propagated betweencontexts in a CKR knowledge base.

Theorem 1 (Soundness and Completeness). For every CKR K overC;Rh i, for every d 2 DC, and for every formula / over R; K ‘ d : / if

and only if K � d : /.

Proof (Sketch). The full proof is attached in A.2. The soundness isproved by showing for each rule that it is sound, i.e., that startingfrom valid premises it only derives valid conclusions.

In order to prove the completeness we make use of thereductions between reasoning tasks. For any formula d : /, a CKRK0 can be constructed such that K � d : / if and only if K0 is d-unsatisfiable. We therefore prove, that if K0 is d-unsatisfiablethen a proof exists in the CKR calculus that K0 is d-inconsistent.This guarantees, that whenever K � d : / then there exists acalculus proof that supports this. The implication – if K0 is d-unsatisfiable then the calculus proves that K0 is d-inconsistent –is proven by contraposition, i.e., we prove that if there is nocalculus proof concluding that K0 is d-inconsistent then it is d-satisfiable. This is proved by a variant of the Henkin constructionof a model based on constants (see e.g. [24]). For details seeAppendix. h

Let us show some examples of deductions in CKR. Consider theCKR with structure depicted in Fig. 2. Example 1 shows howknowledge is propagated from Cwc into Ci via the common super-context Cf , and Example 2 shows how knowledge is propagatedfrom Cwn into Cf via the common sub-context Cwc. Finally Example3 shows how contradicting knowledge can coexist in different sep-arated context.

Example 1. The following deduction shows how the subsumptionwc : WChamp v Player propagates from the FIFA WC context Cwc tothe Italian National League context Ci. Notice that the result of thisdeduction, i.e., i : WChampwc v Playerwc, in the context Ci is weakerthan the premise as it holds only on the set of players of the Italian

Page 10: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 73

National League. In other words, the knowledge shifting from Cwc toCi is limited by the domain of interpretation of Ci.

(1)

wc : WChamp v Player

(a)

Fig. 3. Basic knowledge propagation

premise

(2) f : ðWChamp v PlayerÞ@wc Pop, wc � f (3) f : WChampwc v Playerwc by @

(4)

f : WChampwc u >i v Playerwc u >i LReas

(5)

f : ðWChampwc v PlayerwcÞ@i by @

(6)

i : WChampwc v Playerwc Push, i � f

Example 2. The following deduction shows how wn : Playerf v Pro

(i.e., every football player mentioned in the world news is aprofessional) propagates from Cwn to Cf , trough the common sub-context Cwc.

(1)

wn : Playerf v Pro premise (2) wn : ðPlayerf v ProÞ@wn Pop, wn � wn (3) wn : Playerf v Prown by @

(4)

wn : Playerf u >wc v Prown u >wc by LReas

(5)

wc : Playerf v Prown Push, wc � wn (6) f : Playerf u >wc v Prown u >wc Pop; wc � f (7) f : Playerf u >wc v Prown LReas

Notice that we did not infer f : Playerf v Prown, i.e., that everysingle player of football is understood as a professional player inthe world news, but the fact that this subsumption holds only forthe players of the FIFA world cup domain.

Example 3. Suppose that the Italian News context Cin contains thefacts that Rooney does not take part to the Italian league in 2010,i.e.,:>iðRooneyÞ, and that he is not considered a good football player,i.e., :GoodPlayerfðRooneyÞ. Suppose also that the world news contextCwn contains the opposite evaluation, i.e., GoodPlayerfðRooneyÞ. In theCKR of Fig. 2, these two contradicting statements do not necessarilylead to inconsistency. Indeed, to derive inconsistency one has to finda context where to combine the two contradicting facts. However, totransfer the facts wn : GoodPlayerfðRooneyÞ and in : :GoodPlayerf

ðRooneyÞ into a common context, one has to pass through Ci. Butthe fact that Rooney is not an individual of Ci disables any inferenceabout Rooney in Ci. Model-theoretically we admit CKR models whereRooneyIwn – RooneyI in .

4.3. Properties of reasoning

With help of the ND calculus we will be able to formulateand prove some interesting properties of reasoning with CKRknowledge bases. We will first examine the propagation of knowl-edge in CKR that is enabled by the qualified symbols. We will showthat it occurs only in contexts that are connected by the coveragehierarchy. We will start by considering the basic cases of con-nected contexts.

Let us generalize the situation discussed in Example 1. Con-sider the CKR K represented in Fig. 3(a), composed of three con-texts Cd; Ce and Cf such that d � f and e � f. We will call Cf a

: (a) common super-co

common super-context of Cd and Ce. It shows that the mere exis-tence of a common super-context enables communication fromCd to Ce.

Property 1 (Communication via a common super-context). Inevery CKR K with two contexts Cd; Ce that share a common super-context Cf , we have:

K ‘ d : A v B) K ‘ e : Ad v Bd:

Proof. Proof in the ND calculus:

nt

(1)

ext sche

d : A v B

(b)

me; and (b) common sub-context scheme.

Premise

(2) f : Ad v Bd ð¼ ðA v BÞ@dÞ Pop; d � f (3) f : Ad u >e v Bd u >e ð¼ ðAd v BdÞ@eÞ LReas

(4)

e : Ad v Bd Push; e � f h

Notice that in order to enable the communication between Cd

and Ce, the mere presence of a common super-context is required.This will work even if, as in Fig. 3(a), the super-context is empty.One may ask whether the common super-context Cf is a ‘‘symmet-ric channel’’ which induces also the inverse communication, i.e.,does the subsumption Ad v Bd if entailed in Ce propagate back toCd in the form A v B. This is not the case, it is proven by the countermodel I, in which: Dd \ De ¼ ;, Df ¼ Dd [ De; AId ¼ Dd and BId ¼ ;.By the conditions of Definition 9 we have that AIe

d ¼ BIed ¼ ;. Hence

we have found a model that satisfies e : Ad v Bd but not d : A v B.

If in a CKR K; Cf � Cd and Cf � Ce then we call Cf a commonsub-context of Cd and Ce. This situation is dual to the previous case.We have already outlined this situation in Example 2, and ingeneral it is depicted in Fig. 3(b). We will see that to some extentcommunication between two contexts is also induced by acommon sub-context. In this case, however, the domain of thecommon sub-context comes into play and effectively restricts theamount of information that can be communicated.

Property 2 (Communication via a common sub-context). In everyCKR K with two contexts Cd; Ce that share a common sub-context Cf ,we have:

K ‘ d : A v B) K ‘ e : Ad u >f v Bd u >f :

Proof. Again we prove the claim by the ND calculus:

(1)

d : A v B Premise (2) d : Ad v Bd ð¼ ðC v DÞ@dÞ Pop; d � d (3) d : Ad u >f v Bd u >f ð¼ ðAd v BdÞ@fÞ LReas

(4)

f : Ad v Bd Push; f � d (5) e : Ad u >f v Bd u >f ð¼ ðAd v BdÞ@fÞ Pop; f � e h

Therefore we see that the amount of communication is effec-tively constrained by the domain of the common sub-context Cf .We now show that the full amount of communication, as muchas in the case of common super-context, is not possible, i.e., the fact

Page 11: Contextualized knowledge repositories for the Semantic Web

74 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

that A v B is entailed in Cd does not imply Ad v Bd in Ce. Of coursethis is under the assumption that there is no common super-context shared by Cd and Ce. The claim is proved by a counterexam-ple given by the following interpretation I of the CKR K:

� Dd ¼ fx; yg,IdðAÞ ¼ IdðAdÞ ¼ fxg;IdðBÞ ¼ IdðBdÞ ¼ fx; yg,Idð>fÞ ¼ fxg; Idð>eÞ ¼ fx; yg;� Df ¼ fxg,I fðAdÞ ¼ I fðBdÞ ¼ fxg,I fð>dÞ ¼ I fð>eÞ ¼ fxg;� De ¼ fx; zg,IeðAdÞ ¼ fx; zg; IeðBdÞ ¼ fxg,Ieð>fÞ ¼ fxg; Ieð>dÞ ¼ fx; zg.

Clearly, I satisfies Definition 9 and hence it is a model of K. But onthe other hand, AIe

d � BIed , that is to say, K 2 e : Ad v Bd.

Analogously to the previous case, Cf can be seen as a communi-cation channel, in this case however Cf constitutes the ‘‘intersec-tion’’ of Cd and Ce and allows to pass only knowledge within itsdomain, which is contained in both domains of Cd and Ce.

We now proceed by showing how the two propagation patternsdescribed above, can be composed to define a general propagationpattern between any pair of contexts in a CKR knowledge base thatare connected. Two context with dimensions d and e are connectedin K, if there is a sequence d ¼ d1; . . . ;dn ¼ e, with n P 1, and forall 1 6 i < n either di � diþ1 or di � diþ1. The sequence d1; . . . ;dn

is called a path connecting Cd and Ce. For any 1 6 i 6 n; di is a min-imum of d1; . . . ;dn if one of the following conditions holds:

1. i ¼ 1, and d1 � d2,2. i ¼ n, and dn�1 � dn,3. 1 < i < n and di�1 � di � diþ1.

If for two contexts Cd and Ce of K there exists no path that con-nects them, they are called isolated contexts.

The following property shows that if two contexts Cd and Ce arenot directly covered one by another but instead connected by apath of multiple contexts, then still subsumptions entailed in Cd

at least partially propagate into Ce (and vice versa). The amountof information that is propagated is effectively constrained bythe domains of those contexts which are minima on the path thatconnects Cd and Ce.

Property 3. Given a CKR K with di1 ; . . . ;dik being all the minima ofthe path d1; . . . ;dn connecting Cd with Ce. Then

d : A v B ‘ e : Ad uw16j6k>dijv Bd uw

16j6k>dij

Proof (Sketch). The proof can be obtained by an iterative applica-tion of the two Properties 1 and 2. h

For instance, consider our example CKR depicted in Fig. 2. If inthe context of Italian news Cin it is asserted that all players of InterMilan are considered good players, e.g., by the axiom9playsForf :fInter Milang v GoodPlayer, this subsumption propagatesinto Cwn as ð9playsForf :fInter MilangÞ u >i u >wc v GoodPlayerin

u>i u >wc, as the contexts Ci (Italian league) and Cwc (FIFA WC)are the two minima on the path connecting Cwn to C2. As a conse-quence this subsumption will certainly apply in Cwn on all playersthat participate to both FIFA WC and the Italian league.

On the other hand, if two contexts are not connected by anypath, they are totally independent. This is a simple consequenceof the following property.

Property 4. Let K ¼ hM;Ci be a CKR over hC;Ri that is d-satisfiableand for the context Cd 2 C there is no other Ce 2 C with d � e ore � d. Let us construct K0 ¼ hM;C n fCdgi. Then for anyf 2 DC; f – d, and for any DL formula / over R we have:

K � f : /() K0 � f : /:

Proof (Sketch). The property is proven by establishing a one-to-onecorrespondence between the models of K and K0 (disregarding Cd):

� given a model I of K, a model I0 of K0 is constructed simply bytaking I and deleting Id from it;� given a model I0 of K0, a model I of K is constructed by taking I0

and extending it with Id ¼ ;; ;h i (i.e., the interpretation withempty domain), and by setting XIe

d ¼ ; for every concept/roleX and for every e 2 DC.

Therefore if I f � / in every model of K, also I0f � / in everymodel of K0 and vice versa. h

We can find another justification of Property 4 by inspecting thecalculus rules in Table 3. Apart from the Bot rule, no other rule en-ables transfer of consequence between context which are not di-rectly related in terms of coverage. The Bot rule is onlyapplicable if one context is inconsistent, therefore in fact no trans-fer of knowledge may possibly occur between two unconnectedcontexts that are consistent.

As an important consequence of Condition 4 of Definition 9 wewill show that equality among individuals propagates across con-texts if at least one of the individuals involved is defined in a com-mon sub-context.

Property 5 (Propagation of equality). Given a CKR K over hC;Riwith two contexts Cd, Ce sharing a common sub-context Cf , and giventwo individuals a; b 2 R, the following holds:

K ‘ d : a ¼ b ^ K ‘ f : >ðaÞ ) K ‘ e : a ¼ b:

Proof. The proof again in the ND calculus

(1)

d : a ¼ b Premise (2) f : >ðaÞ Premise (3) d : >fðaÞ Pop; f � d (4) d : >ðaÞ LReas

(5)

d : >dðaÞ Pop; d � d (6) d : >dðbÞ From (1) and (5) by LReas

(7)

f : a ¼ b From (1), (5), (6) and f � d by Push

(8)

e : a ¼ b Pop; f � e h

One of our desiderata in contextualized knowledge representa-tion is certain inconsistency tolerance by the system. Inconsistencyshould not necessarily pollute whole CKR if it occurs in one of thecontexts. Let us analyze the propagation of inconsistency in CKR.As a direct consequence of Property 4, we have that inconsistencydoes not propagate to contexts which are not connected with theinconsistent part of the system.

Property 6. Let Cd and Ce be any two isolated context of a CKR K suchthat K is e-consistent, and for no context Cf and for no individuala 2 R we have K ‘ f : ? ðaÞ. Then:

K;d : > v ? 0 e : > v ?

Also, inconsistency does not necessarily propagate from a nar-rower context into a broader one, at least not until individualscome into play.

Page 12: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 75

Property 7. Let K be CKR such that for no context Cf we haveK ‘ f :? ðaÞ for any individual a 2 R. Then for any two contexts Cd andCe of K such that d � e we have:

K;d : > v ? 0 e : > v ? :

Proof. Consider a CKR K with two contexts Cd; Ce;d � e, with theonly axiom > v ? in Cd, and with Ce empty. The model I in whichId ¼ h;; ;i and Ie ¼ hfxg; f># fxg;? # ;;>d # ;gi is indeed amodel of K in which e : > v ? is not entailed. The property isnow a direct consequence of the soundness of the calculus. h

Thus we see that allowing local models with empty domains isan important preposition in order to minimize inconsistency prop-agation. On the other hand, if the inconsistency appears in a broad-er context Ce, it is pushed also into all contexts covered by Ce. Thisis due to the fact that the empty domain of Ie makes all domainsunder Ce necessarily empty. We can also directly prove this bythe CKR calculus.

Property 8. Given a CKR K with two contexts Cd and Ce such thatd � e, we have:

K; e : > v ?‘ d : > v ? :

Proof. First, we have K; e : > v ?‘ e : >d v ? by LReas, and con-secutively K; e : > v ?‘ d : > v ? by Push. h

The inconsistency tolerance of a CKR knowledge base reachesits limit as soon as individuals appear in one of the inconsistentcontexts. In such a case whole CKR becomes inconsistent.

Property 9. Let Cd and Ce be any contexts in a CKR K, we have that:

K;d : >ðaÞ;d : > v ?‘ e : > v ? :

Proof. By LReas we obtain K;d : >ðaÞ;d : > v ?‘ d : ? ðaÞ. Conse-quently we have K;d : >ðaÞ;d : > v ?‘ e : > v ? by the Bot

rule. h

Model-theoretically speaking, if an individual occurs in aninconsistent context, not even the local interpretation with emptydomain qualifies for a local model. Hence there is no model for theCKR, because it requires a local model for every context. In the cal-culus this situation is handled by the Bot rule, which is the onlyrule applicable if there is an inconsistent context with an individ-ual present, and also it is the only rule which propagates its conclu-sion arbitrarily, even to isolated contexts.

Finally, an inconsistent context with empty domain blocks thecommunication. If Cd and Ce are connected through a path thatcontains an inconsistent context Cf , then such a path does not con-tribute to the transfer of knowledge between Cd and Ce.

Property 10. Given a CKR K with two contexts Cd and Ce such that foreach path d1; . . . ;dn connecting Cd and Ce there is 1 < k < n such thatK ‘ dk : > v ?, then for any two formulae /;w over R such thatK [ fd : /g is d-satisfiable, we have:

K;d : / ‘ e : w() K ‘ e : w

Proof (Sketch). Let P be a proof of e : / from K [ fd : /g. Letp ¼ d1 : /; . . . ;dn : w, where d1 ¼ d; dn ¼ e be the path in P thatstarts in the assumption node d : /, it follows the conclusions con-secutively derived from d : /, and finally reaches e : w.

Observe first that the Bot rule was not applied anywhere on thepath p, because this would allow us to derive inconsistency in dbut we assumed that the contrary, i.e., that K [ fd : /g is d-satisfiable.

From the fact that the path p was constructed by ruleapplications, and all calculus rules apart from Bot only allow toderive a consequence in a context directly related by the coverage,it follows that d1; . . . ;dn is a path in the CKR K. From theassumptions, at least for one 1 < k < n such that K ‘ dk : > v ?.Therefore the subtree of P rooted in d1 : / can be replaced bydk : /k since K ‘ dk : /k by LReas. h

5. Decidability and complexity

Decidability of CKR entailment is proved indirectly by embed-ding CKR into a single DL knowledge base. To do this we reusethe notion of embedding between DL knowledge bases as previ-ously defined in Section 4.1. First we need a vocabulary that is ro-bust enough to keep track of all semantic relations inside a CKRknowledge base. Since each qualified symbol Xd may have differentmeanings in different contexts, we need to introduce one versionXe

d of the symbol per each context Ce. We know from the semanticsthat non-qualified concept and role symbols have the same mean-ing as if qualified with respect to the context where they appear. Inaddition, also constants may possibly have different meaning indifferent contexts, therefore for each constant a we introduce aversion ae for each context Ce.

Definition 19 (Transformed vocabulary #ðC;RÞ). Given a pair ofmeta/object vocabularies hC;Ri, let RB ¼ NB

C ] NBR ] NB

I be the base-vocabulary of R. Let us define a DL-vocabulary #ðC;RÞ ¼ #NC]#NR ]#NI such that:

1. #NC ¼ fAedjA 2 NB

C ^ d; e 2 DCg;2. #NR ¼ fRe

djR 2 NBR ^ d; e 2 DCg [ fSd;e;f

R jR 2 NBR ^ d; e; f 2 DCg,

where S is some new symbol not appearing in R;3. #NI ¼ faeja 2 NB

I ^ e 2 DCg [ fundefg, where undef is a newsymbol not appearing in R.

The role symbols of the form Sd;e;fR which we also added to #NR

are auxiliary and will be later used to maintain decidability of thetransformed knowledge base. In addition we have introduced anew constant undef. This constant is needed because some of theconstants in CKR need not to be necessarily defined in all contexts.This will be simulated by allowing some of the constants in #NI tobe equal to undef.

For each full dimensional vector d 2 DC, we now define an oper-ator ð�Þ#d which will be based on an embedding gd of R into#ðC;RÞ.

Definition 20 (#d operator). Given a pair of meta/object vocabu-laries hC;Ri, for every full dimensional vector d 2 DC; ð�Þ#d isdefined as g�dð�Þ, where gd is an embedding from R to #ðC;RÞdefined as follows:

� gdðaÞ ¼ ad for every individual a;� gdðXfB Þ ¼ Xd

fBþd for every concept/role XfB ;� Rc ¼ R; Re ¼ ;.

Observe that in this case the split of R into the internal part Rc

and the external part Re is different: Rc ¼ R and Re ¼ ;. This is inline with the fact that the single DL knowledge base which is theresult of the transformation has complete information about allsymbols in every context. That is, in terms of CKR we could seethe transformed knowledge base as if placed on top of all contexts

Page 13: Contextualized knowledge repositories for the Semantic Web

76 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

with respect to the coverage �. Using the ð�Þ#d operator we nowtransform a CKR knowledge base K into a DL theory #ðKÞ over#ðC;RÞ.

Definition 21 (Transformed CKR #ðKÞ). For every CKR K overhC;Ri, let #ðKÞ be a DL knowledge base over #ðC;RÞ such that forevery individual a, concept A, role R, concept/role X (all atomic),and for any full dimensional vectors d; e; f it contains the followingaxioms:

1. >fd v >f

e for d � e;2. Ad

e v >de ;

3. 9Rde :> v >d

e and > v 8Rde :>d

e ;4. add the following three axioms5 (if the indicated condition is

true):(a) >d

d u faeg v fadg if d � e;b) fadg v fae; undefg if d � e;c) :>d

dðundefÞ;5. Xd

d Xed if d � e;

6. Adf Ae

f u >dd if d � e;

7. if d � e, add the following four axioms:(a) Id

d � Ref � Id

d v Rdf and Rd

f v Ref ,

(b) Idd � Re

f v Sd;e;fR and Sd;e;f

R � Idd v Rd

f ;8. /#d for all / 2 KðCÞ and d ¼ dimðCÞ.

The axioms added to #ðKÞ in the previous definition corre-spond step-by-step to the conditions of Definition 9; in each stepwe add axioms to deal with the respective condition. Step 5 ismissing, as we do not deal with incomplete symbols directly;as we previously explained incomplete symbols are a kind ofsyntactic sugar, and therefore all symbols XdB occurring in Ce

are represented by XedBþe in this construction as they have the

same meaning. In Step 4, the first two axioms (a) and (b) di-rectly correspond to Condition 4 of Definition 9, axiom (c) isneeded to assure that the newly added constant undef will notbe identified with any individual of the original CKR. In Step 8,the pair of axioms (a) actually serves to maintain Condition 8of Definition 9; the second pair (b) added in this step has noinfluence on the semantics of #ðKÞ, but it serves to maintain#ðKÞ decidable, as further discussed below.

Thanks to the transformation we are now able to check d-satis-fiability of a CKR knowledge base K by checking for satisfiability/entailment in #ðKÞ. This is formally established by the followingtwo lemmata.

Lemma 3. If K is d-satisfiable then #ðKÞ is satisfiable.

Proof (Sketch). As K is d-satisfiable, there exists a model I of K

with Dd – ;. Let us construct a DL interpretation I ¼ hD; �I i over#ðC;RÞ as follows:

1. D ¼S

d2DCDd [ fxundefg where xundef is a new element not occur-

ring in Dd for all d 2 DC;2. ðadÞI ¼ aId if aId is defined otherwise ðadÞI ¼ xundef for every

individual a and for every d 2 DC;undefI ¼ xundef;

3. ðAde ÞI ¼ CId

e for every atomic concept C of R and for everyd; e 2 DC;

5 Please note that in our previous report [25] we mistakenly introduced a simplerversion of this step that, most notably, did not involve nominals. This simplerconstruction is not correct.

4. Rde

I¼ RId

e for every atomic role R of R and for every d; e 2 DC;

Sd;e;fR

I¼ Id

d

I� ðRe

f ÞI for every role R and for all d; e; f 2 DC;

Clearly D – ;. It remains to prove that all the axioms of #ðKÞ aresatisfied by I . Depending on the type of axiom, this largely aconsequence of Definition 9 or Lemma 1. Full proof is listed inAppendix. h

Lemma 4. If there is d such that #ðKÞ 2 >dd v ?, then K is d-

satisfiable.

Proof (Sketch). Given a CKR K let I be a model of #ðKÞ such thatð>d

dÞI is not empty. This model exists since by hypothesis

#ðKÞ 2 >dd v ?. Let us construct the CKR model I ¼ fIdgd2DC

,where for every d 2 DC, Id ¼ hDd; Idi is defined as follows:

1. Dd ¼ ð>ddÞI ;

2. aId ¼ ðadÞI if ðadÞI – undefI otherwise aId is undefined for everyindividual a;

3. ðXfB ÞId ¼ Xd

fBþd

Ifor every atomic concept/role XfB .

It remains to prove that the conditions of Definition 9 aresatisfied. This follows from the construction of #ðKÞ, for the fullproof see Appendix. h

For any given CKR K; #ðKÞ is a SROIQ knowledge base. As dis-cussed in Section 2, reasoning in SROIQ is known to be decidableonly under certain restrictions. Since the RIA introduced in Step 21of the construction #ðKÞ spoil the regularity of the role hierarchy of#ðKÞ, we rely on RBox stratification. Particularly, in Step 21, in or-der to maintain the stratification of the RBox after the pair of axi-oms (a) is introduced, we add also the pair (b) that is based on therequirements for stratified RBoxes [15]. Thus the stratification of#ðKÞ is not broken in Step 21. Since a new role Sd;e f

R is used in eachiteration of this step, this has no influence on the semantics ofother symbols. This is an important step in order to avoid introduc-tion of undecidability solely by the reduction of K into #ðKÞ. Asundecidability may still be caused by complex dependencies inthe role hierarchy of K, therefore we will use stratification of#ðKÞ as a sufficient condition to distinguish cases when this isnot true. We summarize the findings of this section in the follow-ing theorem.

Theorem 2. If #ðKÞ is stratified, then checking if K � d : / isdecidable with the complexity upper-bound of 2NEXPTIME.

Proof (Sketch). The decidability follows directly from Lemma 3, 4and from the fact that #ðKÞ is stratified. The complexity upper-bound follows from the fact that the reduction is polynomial, moreprecisely, cubic. Given a CKR K of size m it produces a SROIQknowledge base #ðKÞ of size Oðm3Þ. An important fact to establishthis result is that the number of dimensions in K is assumed to be afixed constant. This is justified by relevant research on propertiesof context space (e.g., [11] suggests that twelve dimensions shouldbe enough). Also that the number of contexts n is always smallerthan the size of the knowledge base m, as when a new context isintroduced, axioms are added to M which is part of K. Full proofis listed in Appendix. h

6. Related work

The theoretical foundations of contextualized knowledge repre-sentation were laid down by McCarthy [8]. It is based on the idea to

Page 14: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 77

represent logically and reason also about the meta knowledge thatconstraints the validity of the knowledge represented in the firstplace (object knowledge). McCarthy proposed a unique languagefor both kinds of knowledge, namely quantified modal logic. Thisapproach allows for great representation power, but easily leadsto undecidability. Therefore in CKR we avoid mixing the metaknowledge and the object knowledge arbitrarily; the meta knowl-edge semantically influences the object knowledge, but not theother way around.

Among the most influential works in contextualized knowl-edge representation is undoubtedly the one of Lenat [11], whoproposed a structured knowledge base organized in units calledmicro theories, which in our framework correspond to contexts.Lenat also proposed dimensional parameters to be attached tothe micro theories, and investigated on the types of dimensionsand the structure of the dimensional space. The paper describesthe basic set of twelve dimensions that should be satisfactoryfor most applications. This theoretical framework was imple-mented in the CYC system [26] which is a successful commercialproduct. The CKR framework shares notable similarities with thisapproach, in that the knowledge is organized in contexts, whichare arranged in a dimensional space. However, the propagationof knowledge between contexts is implemented on a differentbasis in CKR, there are no qualified symbols in the Lenat’sapproach [11]. In addition, CKR is fully compatible withSROIQ (and therefore OWL 2), so that knowledge available viathe Semantic Web can be directly stored and retrieved in a con-textualized way.

Perceiving the need for some means of representing context inthe Semantic Web, Both aRDF [19] and Context DescriptionFramework [5] extend RDF triples with an n-tuple of qualificationattributes with partially ordered domains. Apart from CKR beingon top of OWL 2, it differs from these approaches by qualifyingwhole theories and not each formula separately. This approach ismore compact as usually the context is shared a by group offormulae.

Straccia et al. [20] enable RDFS graphs to be annotated with val-ues from a lattice. The semantics of the framework is based on aninterpretation structure that is common in multi-valued logics.This effectively restricts the dimensional structure to a completelattice, as for every two contexts there must be a meet (^) and ajoin (_) and also global bottom (?) and top (>) must exist. Con-trary to this, the CKR semantics permits any directed acyclic graph,even an unconnected one. This is intentional, as we want to permitcertain dimensions to be modeled based on exiting ontologies. Thelocation dimension may for instance be based on the Geonames6

ontology. Also, if for instance a believer dimension is added, aseparated dimensional space may be necessary as no knowledgepropagation between believers is desired. Also the top class(rdfs : Resource) has the same semantics in all contexts, and all con-stants are equally defined in all contexts – in CKR this is controlledby the context hierarchy – and no equivalent of qualified symbolsis available in this framework.

Another extension of RDFS to cope with context was proposedby Guha et al. [3] and further developed in Bao et al. [27]. A newpredicate isinðc;/Þ is used to assert that the triple / occurs in thecontext c. A set of operators to combine contexts (c1 ^ c1;

c1 _ c2; :c) and to relate contexts (c ) c2; c! c2) is defined, mak-ing the approach particularly suited for manipulating contexts.Unfortunately, no sound and complete axiomatization or decisionprocedure was provided so far.

The contextual DL ALCALC [6] is a multi-modal extension of theALC DL with the contextual modal operator ½C rA representing ‘‘all

6 http://www.geonames.org/.

objects of type A in all contexts of type C reachable from thecurrent context via relation r.’’ In both ALCALC and CKR contextualstructure is formalized in a meta language separated from theobject language used to describe the domain. The main differencebetween CKR and ALCALC is that CKR is more expressive in theobject language (SROIQ vs. ALC) but less expressive in the con-textual assertions, allowing qualification of knowledge only w.r.t.individual contexts rather than context classes as in ALCALC . Theeffect of this choice is that in CKR the complexity of reasoning isthe same as in the object language (i.e., 2NEXPTIME) while inALCALC the complexity jumps to 2EXPTIME compared to EXPTIME forALC. On the other hand, this comparison is only preliminary, andit will be more accurate to compare the two frameworks w.r.t.the same local language. We plan to investigate an ALC-basedCKR as future work.

The Metaview approach [7] enriches OWL ontologies with logi-cally treated annotations and it can be used to model contextualmeta data similarly to CKR albeit on per-axiom basis. The main dif-ference is that in the Metaview approach the contextual level has nodirect implications on ontology reasoning, but it makes possible toreason about the ontology or even data. Also a contextually sensitivequery language MQL is provided. The examples presented in this pa-per concentrate especially on modeling provenance of data andassociated confidence, and the framework seems well suited for thispurpose. Our research is concerned with other aspects of context,e.g., to break down the data-set into smaller well manageable units,knowledge reuse, etc. A context-aware query language was also de-signed and implemented for CKR [21]. It would be interesting to fur-ther compare the frameworks. And also, from the point of view ofCKR, to cope with the goals suggested by the Metaview approach,for instance we can try modeling different confidence-levels of databy means of a new dimension.

Related to our approach is also the data tailoring technique thatwas described by Tanca [28]. Here, the contextual structure is cap-tured by a ‘‘context dimension tree’’, which is in fact a refinementof dimensional vectors into a tree form. Top level dimensions arethus specialized into sub-dimensions, and only leaf configurationsrepresent possible contexts associated with different views of thedata. This serves to provide the user with an appropriate view, basedon her context. Multiple dimensions relevant for this application aresuggested, such as time, topic of interest, but also interface (e.g. hu-man or machine). The dimension tree is combined with a set of con-straints to limit the valid combinations which serves to filter outsome of the irrelevant configurations. The notable parallel of this ap-proach to ours is that a structured dimensional space is used to breakdown the data set into relevant portions.

On the semantic level, CKR is also related to approaches such asmulti-context systems [16], distributed description logics [17],E-connections [29], but especially approaches concerned withsemantic importing such as package-based description logics(P-DL) [18] and semantic imports [30]. In P-DL imports of symbolsare implemented by relating the elements of interpretation do-mains with one-to-one mappings. The work of Pan et al. [30] goeseven closer to our approach by assuming that the interpretationdomains of distinct ontologies may overlap. In both cases addi-tional semantic constraints are introduced to support variousdesired properties of the importing paradigm.

In our current work, we use similar techniques, however we usethem to meet different goals. Borrowing the viewpoint of thesemantic imports paradigm, we may observe that imports areimplemented between the contexts of CKR, however, to various ex-tents depending on the relation of the two contexts in question. Ifthe contexts are directly related by the coverage, all informationfrom the narrower context is accessible in the broader contextusing a technique similar to importing. On the other hand, the nar-rower of the two contexts may only access part of the other con-

Page 15: Contextualized knowledge repositories for the Semantic Web

78 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

text’s information. If two contexts are related indirectly, then theimporting is even more limited. Thus we can see that similar tech-niques are being used in order to characterize a complex scenarioof information reuse in accordance with the underlaying ideas ofthe AI theories of context which is carefully crafted in the semanticconditions asserted in CKR models.

In addition we would like to mention also the work done onontology versioning and semantic difference in description logics[31,32]. While there are certain obvious similarities betweenontology versioning and contextual representation, most notablyin both cases there are multiple knowledge bases that one hasto handle and reason with, the motivation and also the problemsone faces in these two approaches are different. In ontology ver-sioning we face the problem of knowledge evolution, there aremultiple versions of the ontology and we are interested incharacterization of the changes (the notion of semantic differ-ence), which would allow to store and reason with the differentversions efficiently. That is, at any time one wants to draw con-clusions from a particular revision of interest. In contextual repre-sentation on the other hand, we are dealing with knowledgechunks which are not evolving versions of one another, but ratherone is complementary to each other. When we draw conclusionsfrom one of them, they are possibly influenced by the otherchunks, but not in the sense of outdated/updated information.Although implemented differently in each of the approaches,the most interesting similarity is probably the need to breakdown the information into multiple units and to be able to com-bine it efficiently when it is relevant.

7. Conclusion

With increasing numbers of ontologies and data-sets being pub-lished on the Web under the initiatives such as Semantic Web andLinked Open Data, the need of having a way to consider, process,and take advantage also of the context associated with knowledgebecomes more and more apparent. Multiple approaches to deal withcontext have been proposed; we have reviewed a number of them inthe previous section. It is not yet the case that a commonly acknowl-edged representation framework and methodology to deal withcontext on the Semantic Web has been found.

Building on the foundations of contextual knowledge represen-tation [8,16,10,11] we have proposed Contextualized KnowledgeRepository (CKR) – a context-aware representation frameworkspecifically tailored for the Semantic Web. CKR offers several dis-tinctive features. The knowledge base is structured into unitscalled contexts with contextual attributes explicitly assigned; thisallows to group axioms and data that are assumed to hold undersimilar circumstances, and improves topical organization andmaintenance of the knowledge base. Such approach is also wellin line with the context as a box paradigm which opens the possi-bility to exploit the existing body of research on contextual repre-sentation [9,10] in applications of the framework.

Contextual attributes have structured value-sets which resultsinto a hierarchical organization of contexts in a dimensional space.This makes the relations between contexts explicit and allows to main-tain contexts with different levels of generality. Part of the knowledgeexpressed in a context has local validity, but part may as well influencerelated contexts. CKR allows knowledge to be lifted between contextswith so called qualified concepts and roles. This provides a significantlevel of control to the knowledge engineer who may exactly specifywhich symbols have only local meaning and which are reused betweencontexts. The complexity of the lifting mechanism is hidden from theuser as it is automatically implemented by the semantics; there isno need to express lifting axioms directly.

The knowledge inside each context is fully expressed using thestandard Semantic Web languages. The CKR framework in thispaper uses the SROIQ DL which corresponds to OWL 2, but anRDFS-based version has been developed as well [22]. The metaknowledge is gathered in a separate knowledge base which isexpressed in the same language as well. Therefore adopting theframework by a user familiar with the standard Semantic Weblanguages should not be difficult.

In this paper we have described syntax and semantics of CKRbuilt on top of the SROIQ DL. We have provided a sound andcomplete ND calculus that characterizes logical consequence inCKR, particularly focusing on cross-context entailment (i.e., thetransfer of knowledge between contexts). We have also studiedbasic properties of cross-context entailment in CKR. Finally, wehave showed that reasoning with CKR is decidable with computa-tional complexity same as for SROIQ (i.e., within the class2NEXPTIME).

In the future, we plan to investigate the formal properties ofCKR based on more tractable fragments of OWL 2, e.g., OWL-Horst[33]. We have already developed a prototype on top of the Sesame2 triple store which uses RDFS as local language [22]. In the proto-type, contexts have been naturally implemented with namedgraphs [34]. We also plan to study tableaux based reasoning tech-niques for CKR which would allow to develop a reasoner for theDL-based CKR, and also to investigate on additional meta level con-structs (such as for instance context classes) and novel applicationsof meta level reasoning.

In order to evaluate the practical applicability of CKR we are cur-rently undergoing an experimental study in which we model and pop-ulate a CKR knowledge base of non trivial size. We have chosen thedomain of football tournaments and more specifically the different edi-tions of FIFA WC. This domain was broken down into a number of con-texts, some of them more general such as the generic contexts sportsand football, some more specific such as the particular editions of FIFAWC (e.g., CFIFA WC;2010;South Africa), but also as specific as the stages ofeach tournament, and further down to single matches (e.g.,CFIFA WC Match 42;2010;South Africa). In every context we put axioms thatare relevant to this context. For instance the axiomsGoalKeeper v Player; Midfielder v Player and Player v Sportsmansports

belong to the generic context of football as they serve to modelvarious player positions in the game and the fact that all footballplayers are sportsmen. On the other hand the axiomsTeamA v :TeamB and TeamA t TeamB v TeamFIFA WC belong to thecontext of a particular match of the FIFA WC, and serve to assure thatthere are two teams involved in this match, that these two teams aredistinct and are both part of the respective edition of FIFA WC.The knowledge base was populated with data available from Free-base, DBPedia, and other sources on the Web, and then stored inour prototype implementation of CKR. In this study, we aim to eval-uate the representational aspects, that is, how easy is to model withthe CKR framework, whether the resulting modeling is efficient andpractical, etc., but also on the computational aspects such as the effi-ciency of query answering. We plan to publish our results in nearfuture.

Acknowledgements

The authors would like to thank to Andrei Tamilin, MathewJoseph, Loris Bozzato and Francesco Corcoglioniti who providedvaluable discussion and feedback for this research. Support fromthe Live Memories project is gratefully acknowledged. MartinHomola is also supported from Slovak national Projects VEGA no.1/0688/10 and 1/1333/12.

Page 16: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 79

Appendix A. Proofs

A.1. Proof of Lemma 1

Lemma 1. If I and I0 comply with f : R! R0, then, for every con-cept C;CI ¼ f �ðCÞI

0, for every role R;RI ¼ f �ðRÞI

0, and for every

axiom /; I � / iff I0 � f �ð/Þ.

Let us have two DL-alphabets R and R0, a DL-embeddingf : R! R0 and two respective DL-interpretations I and I0 comply-ing with f. From Definition 15 this implies the following four factswhich we denote by (y):

1. aI ¼ f ðaÞI0, for all individuals a of R such that aI is defined;

2. XI ¼ f ðXÞI0, for all symbols X 2 Rc;

3. AI ¼ f ðAÞI0\ f ð>ÞI

0, for all concepts A 2 Re;

4. RI ¼ f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0, for all roles R 2 Re.

Let us first realize how the domain DI of I is embedded into thedomain DI

0of R0. Later in the proof we will denote this observation

by (z):

DI ¼ >I ¼ f ð>ÞI0# DI

0:

The second equation is due to > 2 Rc and from the fact that I and I0comply with the embedding f. The other two equations trivially fol-low from I and I0 being DL-interpretations.

We will now prove that for every concept or role X it holds thatXI ¼ f �ðXÞI

0. The proof is by structural induction on X:

if X¼A2Rc; then f �ðAÞI0¼ f ðAÞI

0by definition of f � ¼AI from ðy;2Þ

if X ¼ A 2 Re; then f �ðAÞI0¼ f ðAÞ u f ð>ÞI

0by the definition of f �

¼ f ðAÞI0\ f ð>ÞI

0by the interpretation of u ¼ ðAÞI from ðy;3Þ

if X ¼ :C; then f �ð:CÞI0¼ f ð>Þ u :f �ðCÞI

0by definition of f �

¼ f ð>ÞI0\ :f �ðCÞI

0by interpretation of u

¼ f ð>ÞI0\ ðDI0 n f �ðCÞI

0Þ by interpretation of :

¼ f ð>ÞI0n f �ðCÞI

0due to f ð>ÞI

0# DI

0

¼ DI n f �ðCÞI0

from ðzÞ ¼ DI n CI by induction

¼ :CI by interpretation of :

if X ¼ C u D; then f �ðC u DÞI0¼ f �ðCÞ u f �ðDÞI

0by definition of f �

¼ f �ðCÞI0\ f �ðDÞI

0by interpretation of u

¼ CI \ DI by induction ¼ C u DI by interpretation of u

if X¼9R:C and R2Rc; then f �ð9R:CÞI0

¼ 9f ðRÞ:f �ðCÞI0by definition of f � and R2Rc

¼fx2DI0 j9y ðx;yÞ 2 f ðRÞI

0^y2 f �ðCÞI

0g by interpretation of 9

¼fx2DI0 j9y ðx;yÞ 2 f ðRÞI

0^y2CIg by induction

¼fx2DI0 j9y ðx;yÞ 2RI ^y2CI g from ðy;2Þ

¼ fx2DI j9y ðx;yÞ 2RI ^y2CI g by RI #DI �DI and DI #DI0

¼ 9R:CI by definition of 9

if X ¼ 9R:C and R 2 Re; then f �ð9R:CÞI0

¼ f ð>Þ u 9f ðRÞ:f �ðCÞI0

by definition of f � and R 2 Re

¼ f ð>ÞI0\ 9f ðRÞ:f �ðCÞI

0by interpretation of u

¼ DI \ 9f ðRÞ:f �ðCÞI0

from ðzÞ ¼ DI \ fx 2 DI0 j9y ðx; yÞ

2 f ðRÞI0^ y 2 f �ðCÞI

0g by interpretation of 9

¼ DI \ fx 2 DI0 j9y ðx; yÞ 2 f ðRÞI

0^ y 2 CIg by induction

¼ fx 2 DI j9y ðx; yÞ 2 f ðRÞI0\ DI � DI ^ y 2 CI g since CI # DI

¼ fx 2 DI j9y ðx; yÞ 2 f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0^ y 2 CIg from ðzÞ

¼ fx 2 DI j9y ðx; yÞ 2 RI ^ y 2 CI g from ðy;4Þ

¼ 9R:CI by interpretation of 9

if X ¼ 9R: Self and R 2 Rc; then f �ð9R:SelfÞI0

¼ 9f ðRÞ: SelfI0

by definition of f � and R 2 Rc

¼ fx 2 DI0 jðx; xÞ 2 f ðRÞI

0g by interpretation of 9R:Self

¼ fx 2 DI0 jðx; xÞ 2 RI g by ðy;2Þ

¼ fx 2 DI jðx; xÞ 2 RIg due to RI # DI � DI and DI # DI0

¼ 9R:SelfI by definition of 9R:Self

if X ¼ 9R:Self and R 2 Re; then f �ð9R:SelfÞI0

¼ f ð>Þ u 9f ðRÞ:SelfI0

by the definition of f � with R 2 Re

¼ f ð>ÞI0\ fx 2 DI

0 jðx; xÞ 2 f ðRÞI0g by interpretation of u and 9R:Self

¼ DI \ fx 2 DI0 jðx; xÞ 2 f ðRÞI

0g from ðzÞ

¼ fx 2 DI jðx; xÞ 2 f ðRÞI0g as DI # DI

0by ðzÞ

¼ fx 2 DI jðx; xÞ 2 f ðRÞI0\ DI � DI g

¼ fx 2 DI jðx; xÞ 2 f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0g from ðzÞ

¼ fx 2 DI jðx; xÞ 2 RI g from ðy;4Þ

¼ 9R:SelfI by definition of 9R:Self

if X ¼PnR:C and R 2 Rc ; then f �ðPnR:CÞI0

¼Pnf ðRÞ:f �ðCÞI0

by definition of f � and R 2 Rc

¼ fx 2 DI0 j916i6n yi ðx; yiÞ 2 f ðRÞI

0^ yi 2 f �ðCÞI

0g interpretation of Pn

¼ fx 2 DI0 j916i6n yi ðx; yiÞ 2 f ðRÞI

0^ yi 2 CI g by induction

¼ fx 2 DI0 j916i6n yi ðx; yiÞ 2 RI ^ yi 2 CI g by ðy;2Þ

¼ fx 2 DI j916i6n yi ðx; yiÞ 2 RI ^ yi 2 CI g as RI # DI � DI ; DI # DI0

¼PnR:CI by interpretation of Pn;

if X ¼PnR:C and R 2 Re; then f �ðPnR:CÞI0

¼ f ð>ÞuPnf ðRÞ:f �ðCÞI0

by definition of f � and R 2 Re

¼ f ð>ÞI0\ fx 2 DI

0 j 916i6n yi ðx; yiÞ 2 f ðRÞI0^ yi 2 f �ðCÞI

0g by u; Pn

¼ DI \ fx 2 DI0 j 916i6n yi ðx; yiÞ 2 f ðRÞI

0^ yi 2 f �ðCÞI

0g by ðzÞ

¼ fx 2 DI j 916i6n yi ðx; yiÞ 2 f ðRÞI0^ yi 2 f �ðCÞI

0g as DI # DI

0by ðzÞ

¼ fx 2 DI0 j 916i6n yi ðx; yiÞ 2 f ðRÞI

0^ yi 2 CI g by induction

¼ fx 2 DI j 916i6n yi ðx; yiÞ 2 f ðRÞI0\ DI � DI ^ yi 2 CI g as CI # DI

¼ fx 2 DI j 916i6n yi ðx; yiÞ 2 f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0^ yi 2 CI g by ðzÞ

¼ fx 2 DI j916i6n yi ðx; yiÞ 2 RI ^ yi 2 CI g by ðy;4Þ

¼PnR:CI by definition of Pn

Page 17: Contextualized knowledge repositories for the Semantic Web

80 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

if X ¼ fag; then f �ðfagÞI0¼ ff ðaÞgI

0by definition of f �

¼ ff ðaÞI0g by interpretation of nominals ¼ faI g fromðy;1Þ

¼ fagI by interpretation of nominals

if X ¼ R 2 Rc; then f �ðRÞI0¼ f ðRÞI

0by definition of f � ¼ RI byðy;2Þ

if X ¼ R 2 Re; then f �ðRÞI0¼ f ðIÞ � f ðRÞ � f ðIÞI

0by definition off �

¼ fðu;vÞj9 ðx; yÞ 2 f ðRÞI0^ ðu; xÞ; ðv; yÞ

2 f ðIÞI0g by interpretation of � ¼ fðx; yÞjðx; yÞ

2 f ðRÞI0^ ðx; xÞ; ðy; yÞ 2 f ðIÞI

0g as II

0is identity on f ð>ÞI

0

¼ fðx; yÞjðx; yÞ 2 f ðRÞI0\ f ð>ÞI

0� f ð>ÞI

0g

as II0

is identity on f ð>ÞI0

¼ fðx; yÞjðx; yÞ 2 f ðRÞIg from ðy;4Þ ¼ f ðRÞI

if X ¼ R � S; then f �ðR � SÞI0¼ f �ðRÞ � f �ðSÞI

0by definition of f �

¼ f �ðRÞI0� f �ðSÞI

0by interpretation of �

¼ RI � SI by induction ¼ R � SI by interpretation of � :

Let us now continue with the second proposition of the lemma,i.e., that for every axiom /; I � / if and only if I0 � f �ð/Þ. We mustconsider all the cases corresponding to the different forms of /:

1. / ¼ CðaÞ; f �ð/Þ ¼ f �ðCÞðf ðaÞÞ: from (y,1) we have aI ¼ f ðaÞI0

andwe have proved above that CI ¼ f �ðCÞI

0. Therefore I � CðaÞ iff

aI 2 CI iff f ðaÞI02 f �ðCÞI

0iff I0 � f �ðCÞðf ðaÞÞ;

2. / ¼ Rða; bÞ; f �ð/Þ ¼ f ðRÞðf ðaÞ; f ðbÞÞ: from (y,1) we haveaI ¼ f ðaÞI

0; bI ¼ f ðbÞI

0and from (y,4) we have RI ¼ f ðRÞI

0. The

rest of the proof is analogous to the previous case;3. / ¼ :Rða; bÞ; f �ð/Þ ¼ :f ðRÞðf ðaÞ; f ðbÞÞ: since aI ¼ f ðaÞI

0;

bI ¼ f ðbÞI0

and RI ¼ f ðRÞI0, we have I � :Rða; bÞ iff ðaI ; bI Þ R RI

iff ðf ðaÞI0; f ðbÞI

0Þ R f ðRÞI

0iff I0 � :f ðRÞðf ðaÞ; f ðbÞÞ;

4. / ¼ C v D; f �ð/Þ ¼ f �ðCÞ v f �ðDÞ: as we have already provedCI ¼ f �ðCÞI

0and DI ¼ f �ðDÞI

0. Therefore I � C v D iff CI # BI

iff f �ðCÞI0# f �ðDÞI

0iff I0 � f �ðCÞ v f �ðDÞ;

5. / ¼ R v S; f �ð/Þ ¼ f �ðRÞ v f ðSÞ: we have proved thatRI ¼ f �ðRÞI

0. If S 2 Rc , we have from (y,2) that SI ¼ f ðSÞI

0. The

proof of this case is analogous to the previous case.If S 2 Re then from (y,4) and from (z) we haveSI ¼ f ðSÞI

0\ DI � DI . For this case, let us first prove the if part:

suppose I0 � f �ðRÞ v f ðSÞ and therefore f �ðRÞI0# f ðSÞI

0. Then

RI ¼ RI \ DI � DI ¼ f �ðRÞI0\ DI � DI # f ðSÞI

0\ DI � DI ¼ SI .

Which amounts to I � R v S. The only-if part: SupposeI � R v S, that is, RI # SI . It follows that f �ðRÞI

0¼ RI # SI ¼

f ðSÞI0\ DI � DI # f ðSÞI

0.

6. / is a ¼ b, i.e., f �ð/Þ is f ðaÞ ¼ f ðbÞ: we know from (y,1) thataI ¼ f ðaÞI

0and bI ¼ f ðbÞI

0. Hence I � a ¼ b iff aI ¼ bI iff

f ðaÞI0¼ f ðbÞI

0iff I0 � f ðaÞ ¼ f ðbÞ;

7. / is a – b, i.e., f �ð/Þ is f ðaÞ – f ðbÞ: as a consequence of the pre-vious case we have I � a – b iff I 2 a ¼ b iff I0 2 f ðaÞ ¼ f ðbÞ iffI0 � f ðaÞ– f ðbÞ.

A.2. Proof of Theorem 1

Theorem 1 (Soundness and Completeness). For every CKR K

over hC;Ri, for every d 2 DC, and for every formula / over R,K ‘ d : / if and only if K � d : /.

A.2.1. SoundnessWe ought to prove that if K ‘ d : / then also K � d : /. We will

prove this by showing that all calculus rules are sound. For eachrule q, which in general is of the form:

½Bnþ1 ½Bnþm a1 . . . an anþ1 . . . anþm

aq;

we have to prove that if K;Bi ‘ ai holds for each i, n < i � nþm,then it is also true that K; fa1; . . . ;anþmg � a. More formally, wehave to prove the implication:

K;Bnþ1 ‘ anþ1 ^ � � � ^ K;Bnþm ‘ anþm ) K; fa1; . . . ;anþmg � a:

This has to be proved separately for each of the calculus rules, aslisted in Table 3. Due to the rules with discharges, the proof is doneby structural induction. The base of the induction is formed by thecases of the rules without discharges. The inductive step comprisesthe remaining cases, in which the induction hypothesis allows us toderive K; Bi � ai from K; Bi ‘ ai, for each premise ai with dis-charges Bi of the rule q in question, because the proof respectiveto this subproof is a sub-tree of the overall proof of the conclusionof q. The proof for each type of rule follows:

LReas: let I be a model of K [ fd : /1; . . . ;d : /ng. This implies thatit also satisfies Id �DL /i, for every i; 1 6 i 6 n. From theassumptions of the LReas rule, f/1; . . . c;/ng �DL / (i.e.,the conclusion is only derived by this rule when thisentailment universally holds). From monotonicity of DLthis implies Id �DL / and hence also I � d : /;

Top: this rule has three independent forms. The first formassumes d � e on the meta knowledge and concludesf : Ad v >e. Let Cd and Ce be two contexts of K such thatd � e and let I be any model of K. By Condition 2 of Def-inition 9 we have AI f

d #>I fd . By Condition 1 of the same def-

inition >I fd #>I f

e . Together this implies I f �DL Ad v >e andhence I � f : Ad v >e.The second form of the Top rule concludes f : 9Rd:> v >d

without any premises. We therefore have to show thatI � f : 9Rd:> v >d, i.e., that the domain of the binary rela-tion RI f

d is under >I fd , in every model I of every CKR K. This

is a direct consequence of Condition 3 of Definition 9. Thecase of the third form of the Top rule is exactly analogousexcept it involves the range of RI f

d ;Bot: there is no model of a CKR K in which d : ? ðaÞ the premise

of the Bot rule is true. This is due to the fact that ? ðaÞ isnot satisfied in any DL-interpretation, not even in the spe-cial one with empty domain. Therefore, trivially, it is truethat the conclusion e : > v ? is satisfied by all models ofK;

Push: let I be any model of K [ fe : /@d; e : >dða1Þ; . . . c;e : >dðanÞg where a1; . . . c; an are all constants occurringin /. This implies that Ie �DL >dðaiÞ, for every i, 1 6 i 6 n,and therefore ai 2 >Ie

d . This implies ai 2 >Idd and hence

ai 2 Dd (if d � e it follows from Definition 9, if d ¼ e it istrivial). This assures that / is defined in Id, as all constantsoccurring in it are defined. Since d � e, from Lemma 2 weknow that Id and Ie comply with the embedding respec-tive to @d, and since Ie �DL /@d, it follows from Lemma1 that Id �DL /. Hence I �: d : /;

Pop: let I be a model of K [ fd : /g. This implies I � d : /, i.e.,Id �DL /. From d � e and from Lemmata 1, 2 this impliesIe �DL /@d and hence I � e : /@d;

aE: the rule assumes that K; d : >ðaÞ ‘ d : > v ?, for any athat does not appear in K, and under this assumption wehave to prove that K � d : > v ?. Let us assume the con-trary, i.e., K 2 d : > v ?. In this case, there must be amodel I of K in which >Id �?Id . Then there is x 2 >Id

(such that x R ?Id ). Since a does not appear in K, if we con-struct I0 by extending I with the assignment aI f ¼ x for allf 2 DC such that x 2 Df (i.e., certainly for f ¼ d), then

Page 18: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 81

I0 � K as it satisfies all axioms thereof. In additionI0 � d : >ðaÞ as aId ¼ x 2 >Id ¼ >I0d . From the assumptionof the rule, and from the induction hypothesisK; d : >ðaÞ � d : > v ? and since I0 � K [ fd : >ðaÞg, itmust be the case that >Id ¼ >I0d # ?I0d ¼ ?Id which is acontradiction;

tE: the rule assumes that K; d : CðxÞ ‘ e : / andK; d : DðxÞ ‘ e : /. By structural induction we haveK; d : CðxÞ � e : / and K; d : DðxÞ � e : / (from the induc-tion hypothesis). Under these assumptions we need toprove K;d : C t DðxÞ � e : /. Let I be any model ofK [ fd : C t DðxÞg. In this model, Id �DL C t DðxÞ. By basicproperties of DL-interpretations it must either holdId �DL CðxÞ or Id �DL DðxÞ. Let us assume the first case.Since in this case I is a model of K [ fd : CðxÞg, from thefact that K; d : CðxÞ � e : / we get I � e : /. The in theother case analogously I � e : / due to K; d : DðxÞ � e : /;

9E: the rule assumes K; fd : Rðx; yÞ;d : CðyÞg ‘ e : /. By induc-tion hypothesis we have K; fd : Rðx; yÞ;d : CðyÞg � e : /.Under this assumption we ought to proveK; d : 9R:CðxÞ � e : /. Let I by any model ofK [ fd : 9R:CðxÞg. This implies that there must be an ele-ment x0 2 Dd such that xId ¼ x0 and x0 2 9R:CId . From theproperties of DL-interpretations, there must also byy0 2 Dd such that hx0; y0i 2 RId and y0 2 CId . Since the indi-vidual y does not appear anywhere in K; yId is undefined.Let us construct I0 by extending I with the assignmentyI f ¼ y0 for all f 2 DC such that y0 2 Df . Since all axiomsof K and also all conditions of Definition 9 are satisfiedby I0, and in addition also K � d : Rðx; yÞ, andK � d : CðyÞ, then in fact I0 � K [ fd : Rðx; yÞ;d : CðyÞg.From the assumptions we now know that I0 � e : /. Sincethe individual y does not occur in /, this implies thatI � e : / as well, because the only difference between I

and I0 is the interpretation of y;ðP nÞE: the case of this rule is analogous to the previous case. From

the fact that I � K [ fd :P nR:CðxÞg we are able to find ndistinct elements y01; . . . c; y0n 2 Dd with the required prop-erties. We then extend the model I by assigning these ele-ments to the individuals y1; . . . c; yn respectively, andprove that the extended model entails e : / using theinduction hypothesis. As all the constants in question arenew, this also implies I � e : /.

A.2.2. CompletenessWe now prove the completeness of the axiomatization, i.e., that

K � d : / implies K ‘ d : /. Relying on the fact, that for any DL-for-mula / over R the problem of entailment is reducible to (un)satis-fiability, it suffices to prove the statement:

If K is unsatisfiable then K ‘ d : > v ? :

This is justified as follows. If K � d : / then there exists a CKR K0

(constructed by the respective reduction). The statement aboveshows that in this case we are able to prove by the calculus thatK0 is d-inconsistent. Since this holds for any formula /, the calculusis complete. We give an indirect proof by proving the contraposi-tive of the statement:

If K 0 d : > v ? then K is d-satisfiable:

The proof is a variation of the Henkin construction of a modelbased on constants (see e.g. [24]). We will show that a model ofK can be constructed by gradually enriching K with additionalassertions that are compatible with it. Once this is exhaustinglydone, the model can be constructed from the enriched version of

K. Since a CKR need not to have a finite model (because SROIQknowledge bases need not to have finite models) we will also en-rich the object alphabet R with an infinite set of constants N so thatall elements in the interpretation domain of the model that is beingconstructed are covered by constants. Thus the model will be en-coded inside the enriched version of K.

Since in each CKR model, a local model I f is totally encoded in-side each Ie such that f � e, to construct any model, we need topay special attention the so called roof contexts of K, i.e., thosewhich have no super-context. We will denote this set of contextsby E. Finally, in the following definition we construct the CKR KE

by enriching K as discussed above. Later on we will show howmodel of K is encoded within it.

Definition 22 (KE). Given a CKR over hC;Ri, let E ¼ fe 2 DCjð8f 2 DCÞ e � fg. Let N ¼

Se2E Ne, where for each e 2 E; Ne ¼

fxei ji P 0g is a countably infinite set of new constants not

appearing in R. Let us inductively construct KE as follows:

K; ¼ K [ fd : >ðxd0Þg;

given F E and e 2 E such that e R F, if KF ‘ e : > v ? thenKF[feg ¼ KF , otherwise KF[feg in constructed in two steps:

step 1: we add witnesses for all existential statements. Let/1;/2; . . . c be an exhaustive enumeration of all assertionsof the form 9R:CðaÞ or P nR:CðaÞ in the vocabulary Rextended with Ne. Note that R is possibly an inverse roleand C is any complex concept. We inductively constructKF;m for m P 0 as follows:

KF;0 ¼ KF ;

KF;mþ1 ¼

KF;m [ e : :9R:C t 9R: xek

� �u C

� �ðaÞ

� �if /mþ1 is of the form 9R:CðaÞ;

KF;m [ e : :P nR:CtP nR: xek ; . . . ; xe

kþn�1

� �u C

� �ðaÞ

� �if /mþ1 is of the form P nR:CðaÞ;

8>>>>><>>>>>:

where xek; . . . ; xe

kþn�1 are constants of Ne not appearing inKF;m. The result of this step is KF;� ¼

SmP0K

F;m;

step 2: we saturate KF[feg with respect to all atomic assertions onthe constants of R extended with with Ne. Let /1;/2; . . . cbe a complete enumeration of assertions of the formAðaÞ; Rða; bÞ, or a ¼ b, where A and R are are atomic con-cepts and roles of R, and a and b are constants of R or Ne

such that KF;� ‘ e : >ðaÞ and KF;� ‘ e : >ðbÞ. We inductivelyconstruct KF;�

m for m P 0, as follows:

KF;�0 ¼ KF;�;

KF;�mþ1 ¼

KF;�m [ fe : /g if KF;�

m [ fe : /mþ1g is e-consistent

KF;�m [ fe : :/mþ1g otherwise

(

where by :a ¼ b we mean the non-equality assertion a – bfor any a and b. The result of this step is KF[feg ¼

SmP0 KF;�

m .

Thus at the end of the construction given in the previous defini-tion we reach the knowledge base KE. The following two lemmatashow that KE is d-consistent. This is an important step in order toguarantee that the model of K encoded in KE is valid. The first lem-ma shows that adding existential witnesses in the construction hasno influence at the ‘ consequence at all. The second lemma thenproves that starting from d-consistent knowledge base K, we end

Page 19: Contextualized knowledge repositories for the Semantic Web

82 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

up with a d-consistent knowledge base KE.

Lemma 5. For every assertion / in R that does not contain anyoccurrence of xe

i , for every F # E, and for every f 2 DC : KF ‘ f : / iffKF;� ‘ f : /.

Proof. The ‘‘only if’’ direction trivially follows due to monotonicityof the language. As KF # KF;�, everything that is proved from KF isalso proved from its superset KF;�.

The ‘‘if’’ direction. Suppose KF;� ‘ f : /. We first show, that thereis a finite subset of S of KF;� such that S ‘ f : /. This is due to thelength of the proof of f : / from KF;� is finite and in each step weuse exactly one inference rule which derives its conclusion from afinite number of premises. Let us denote the set of all premisesused by all the inference rules in the proof by P. Obviously the set Pis finite and P ‘ f : /. The formulae in P are either from KF;� or werederived as the proof goes on. Let S ¼ f/ 2 Pj/ 2 KF;�g. Since all theformulae which we discarded are consecutively derived as theproof goes on, then also S ‘ f : /, and by construction S # KF;�.

Since for every finite subset of KF;� there is a KF;m that containssuch a subset, we have that KF;m ‘ f : /, for some m; let us denotethis deduction by P. If m ¼ 0 then KF;m ¼ KF and we are done. Ifm > 0 we will show that in this case also KF;m�1 ‘ f : /. Wedistinguish two cases:

case 1: KF;m ¼ KF;m�1 [ fe : :9R:C t 9R:ð xek

� �u CÞðaÞg. Then start-

ing from P we construct a deduction of f : / from KF;m�1:

(1)

e : :9R:C t 9R:CðaÞ KF;m�1 LReas

(2)

e : :9R:CðaÞ (2) assumption (3) e : :9R:C t 9R:

ðfxekg u CÞðaÞ

(2)

from (2) by LReas

(4)

f : / (2),KF;m�1 from (3) by P

(5)

e : 9R:CðaÞ� � (5) assumption (6) e : R a; xe

k� �

(6) assumption (7) e : C xe

k

(7) assumption

(8)

e : :9R:C t 9R:ðfxe

kg u CÞðaÞ

(6),(7) from (6,7) by LReas

(9)

f : / (6),(7),KF;m�1 from (8) by P

(10)

f : / (5),KF;m�1 from (5,9) by $E

disc. (6) and (7)

(11) f : / KF;m�1 from (1,4,10) by tE

disc. (2) and (5)

case 2: KF;m ¼ KF;m�1 [ fe : :P nR:C tP nR:ðfxek; ... ; x

ekþn�1gu CÞ

ðaÞg. As before, starting from P, we construct a deduc-tion of f : / from KF;m�1:

(1)

e : :P nR:CtP nR:CðaÞ KF;m�1 LReas

(2)

e : :P nR:CðaÞ (2) assumption (3) e : :P nR:CtP nR:

xek; . . . ; xe

kþn�1

n ouC�ðaÞ

(2)

from (2) by LReas

(4)

f : / (2), KF;m�1 from (3) by P

(5)

e : P n R.C(a) (5) assumption ð6iÞ e : Rða; xe

kþiÞ

ð6iÞ assumption ð0 6 i < nÞ ð7iÞ e : C xe

kþi

ð7iÞ assumption

ð0 6 i < nÞ

ð8ijÞ e : xe

i – xej

ð8ijÞ assumption

ð0 6 i < n; i – jÞ

(9) e : :P nR:CtP nR:

xek; . . . ; xe

kþn�1

n ouC�ðaÞ

ð6iÞ; ð7iÞ;ð8iÞ06i – j<n

from (6,7) byLReas

(10)

f : / ð6iÞ; ð7iÞ; from (9) by P

ð8iÞ06i

– j<n;KF;m�1

(11)

f : / (5),KF;m�1 from (5,10) byðPnÞE disc. ð6i;7i;8ijÞ

(12)

f : / KF;m�1 from (1,4,11)by tE disc. (2) and (5)

In both cases KF;m�1 ‘ f : /. Since this holds for any m > 0 it fol-lows by induction that KF ‘ f : /. h

Lemma 6. For every F # E; KF is d-consistent.

Proof. The proof is by induction on F. In the base case, F ¼ ;.From the construction K; ¼ K [ d : >ðxd

0Þ� �

, where xd0 does not

appear in K. Suppose the contrary, i.e., K; d : > xd0

� �‘ > v ?.

As xd0 does not appear in K, by application of the aE rule

we have K ‘ > v ? which is a contradicts the assumptionthat K is d-consistent. Therefore it must be case that K; is d-consistent.

In the induction step, F # E is nonempty. Hence there is somee 2 F. Let us denote by G ¼ F n feg. From the induction hypothesisKG is d-consistent. We first prove by induction on m that KG;�

m is d-consistent. For m ¼ 0; K

G;�0 ¼ KG;� which d-consistent, as follows

from Lemma 5: KG 0 > v ?, and KG ‘ / iff KG;� ‘ /, thereforeKG;� 0 > v ?.

Now suppose that KG;�m is d-consistent, and let us show that

KG;�mþ1 is d-consistent. Suppose by contradiction that KG;�

mþ1 is not d-consistent. By definition this means that both KG;�

m [ fe : /g andKG;�

m [ fe : :/g are not d-consistent. Let P1 and P2 be twodeductions of d : > v ? from KG;�

m [ fe : /g and KG;�m [ fe : :/g

respectively. We will show that there exists also deduction ofd : > v ? from KG;�

m . We distinguish three cases:

case 1: if / is AðaÞ

(1)

e : >(a) KG;�m

by construction, for every constant xoccurring in / we haveKG;�

m ‘ e : >ðxÞ

(2) e : At:A(a) KG;�

m

from (1) by LReas

(3)

e : A(a) (3) assumption (4) d : > v ? (3),

KG;�m

From (3) by P1

(5)

e : :A(a) (5) assumption (6) d : > v ? (5),

KG;�m

From (5) by P2

(7)

d : > v ? KG;�m

From (2), (4), and (6) by tE, disc. (3)and (5)

case 2: if / is Rða; bÞ

Page 20: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 83

(1)

e : >(a) KG;�m

by construction, for eveyconstant x occurring in/; KG;�

m ‘ e : >ðxÞ

Proof. Th

1. C ¼con

(2)

e : >ðbÞ KG;�m

as for (1) 2. C ¼

(3) e : ð9R:fbg

t:9R:fbgÞðaÞ

KG;�

m

from (1) and (2) by LReas wh

(4)

e : 9R:fbgðaÞ (4) assumption 3. C ¼ (5) e : Rða; bÞ (4) from (4) by LReas KE

E

(6) d : > v ? (4), KG;�

m

From (5) by P1 K

(7)

e : :9R:fbgðaÞ (7) assumption by

(8)

e : :Rða; bÞ (7) from (7) by LReas4. C ¼

E

(9)

d : > v ? (7), KG;�m

From (7) by P2K

(10)

d : > v ? KG;�m

From (3), (6), and (9)by tE, disc. (4) and (7)

esiKE

5. C ¼

case 3: if / is a ¼ b

(1)

e : >(a) KG;�m

by construction, for all constantsx occurring in / we haveKG;�

m ‘ e : >ðxÞ

(2) e : >(b) KG;�

m

as for (1)

(3)

e : fbg t :fbgðaÞ KG;�m

from (1) and (2) by LReas

(4)

e : {b}(a) (4) assumption (5) e : a ¼ b (4) from (4) by LReas

(6)

d : > v ? (4),KG;�

m

From (5) by P1

(7)

e : :{b}(a) (7) assumption (8) e : :a¼b (7) from (7) by LReas

(9)

d : > v\ (7),KG;�

m

From (7) by P2

(10)

d : > v\ KG;�m

From (3), (6), (9) by tE, disc. (4)and (7)

We therefore conclude that if KG;�mþ1 ‘ d : > v ?, then

KG;�m ‘ d : > v ?, which is a contradiction because by the induction

hypothesis KG;�m is d-consistent. We have now showed that KG;�

m is d-consistent for all m P 0. From the construction KG;�

m # KG;�mþ1, and

therefore KF ¼S

mP0 KG;�m is d-consistent too. h

We have showed that KE is d-consistent. As the next step, inorder to prove that a model of K is encoded within it, we willshow that for any ABox assertion / of the form CðaÞ or Rða; bÞwe are able to verify by the CKR calculus if / holds or if :/holds. Recall that we have assured this by construction of KE

for all atomic assertions. For non-atomic assertions it isshown in the following lemma. Combined with the fact that KE

contains a constant for every domain element of the model,we will subsequently be able to retrieve and construct themodel.

Lemma 7. Given a CKR K over hC;Ri, and KE constructed as inDefinition 22. Let C and R be a possibly complex concept and a possiblyinverse role over R, and let a; b any individuals of R such thatKE ‘ e : >ðaÞ and KE ‘ e : >ðbÞ. Then for any e 2 DC:

1. if KE ‘ e : >ðxÞ for all individuals x in C, then either KE ‘ e : CðaÞ orKE ‘ e : :CðaÞ;

2. either KE ‘ e : Rða; bÞ or KE ‘ e : :Rða; bÞ.

e proof is by structural induction C and R:

A is atomic: then the lemma follows directly from thestruction of KE;:D: by induction either KE ‘ e : DðaÞ or KE ‘ e : :DðaÞ,

ich implies either KE ‘ e : ::DðaÞ or KE ‘ e : :DðaÞ byLReas, that is, either KE ‘ e : :CðaÞ or KE ‘ e : CðaÞ;

F u G: suppose KE 0 e : F u GðaÞ. Then KE 0 e : FðaÞ or0 e : GðaÞ due to LReas. By induction hypothesis‘ e : :FðaÞ or KE ‘ e : :GðaÞ. Finally KE ‘ e : :ðF u GÞðaÞLReas;F t G: suppose KE 0 e : F t GðaÞ. This implies that0 e : FðaÞ and KE 0 e : GðaÞ by LReas. By induction hypoth-s we have KE ‘ e : :FðaÞ and KE ‘ e : :GðaÞ which implies‘ e : :ðF t GÞðaÞ by LReas;9R:D: from the construction of KE we have

KE ‘ e : :9R:D t 9R:ðfxeg u DÞðaÞ for some xe.From the construction of KE we know that either KE ‘ e : /or KE ‘ e : :/ for any assertion /. Since Rða; xeÞ and DðxeÞare assertions, one of the three cases must occur:

� KE ‘ e : Rða; xeÞ and KE ‘ e : DðxeÞ: in this case

KE ‘ e : 9R:DðaÞ directly by LReas;� KE ‘ e : :Rða; xeÞ: in this case KE ‘ :9R:ðfxeg u DÞðaÞ and

since we have KE ‘ e : :9R:D t 9R:ðfxeg u DÞðaÞ thenKE ‘ e : :9R:D, both steps by LReas;

� KE ‘ e : :DðxeÞ: in this case again KE ‘ :9R:ðfxeg u DÞðaÞand hence KE ‘ e : :9R:D by LReas;

6. C ¼P nR:D: analogously to the previous case;7. C ¼ 8R:D: can be rewritten as :9R::D;8. C ¼6 nR:D: can be rewritten as :P nþ 1R:D;9. C ¼ 9R:Self: by construction we have that KE ‘ e : Rða; aÞ or

that KE ‘ e : :Rða; aÞ. By LReas this implies thatKE ‘ e : 9R:SelfðaÞ or KE ‘ e : :9R:SelfðaÞ;

10. C ¼ fxg is a nominal: by construction we have KE ‘ e : a ¼ xor KE ‘ e : :a ¼ x. By LReas this gives us KE ‘ e : fxgðaÞ orKE ‘ e : :fxgðaÞ;

11. R ¼ S� is an inverse role: by induction we have eitherKE ‘ e : Sðb; aÞ or KE ‘ e : :Sðb; aÞ, by LReas we get eitherKE ‘ e : Rða; bÞ or KE ‘ e : :Rða; bÞ. h

The next step of the proof is the construction of a CKR interpre-tation from KE in that will then be shown to be a model of K. Thebasic idea is to take the constants that appear in KE as the interpre-tation domain. Relying on the previous lemma, we would then con-struct the interpretation of of each concept C in Ce by querying thecalculus whether e : CðaÞ holds or not for each constant a, and anal-ogously for roles. A minor problem with this approach is that in aCKR interpretation, if two constants are equal, they are interpretedby the same element of the interpretation domain.

Therefore we have to modify the nave construction as outlinedabove, and add just one domain element for all constants that areequal. We will achieve this by introducing an equivalence relationon constants and use the equivalence classes as domain elements.

Definition 23 (�e). Let K be a CKR over hC;Ri and let E; N, and KE

be as constructed in Definition 22. For each e 2 DC, the binaryrelation �e on the set of constants of R extended with N is definedas follows:

a�eb iff KE ‘ e : a ¼ b:

The equivalence class of �e respective to a constant x will be de-noted by ½x e, i.e., ½x e ¼ fyjK

E ‘ e : x ¼ yg.

We now show that �e is defined exactly on the set of constantsthat are relevant with respect to Ce. And that it is really an equiv-

Page 21: Contextualized knowledge repositories for the Semantic Web

84 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

alence relation on this set. This will justify the construction of themodel that will then follow.

By constants relevant to Ce we mean all constants a such thatthe calculus proves KE ‘ e : >ðaÞ. The following lemma showsthat for any such constant there is the respective equivalenceclass of �e is nonempty. This ensures that we will find a domainelement to interpret each constant when we construct the modelbelow.

Lemma 8. Given a CKR K over hC;Ri, its extension KE, and therelation�e as defined in Definitions 22 and 23, then for any constant aof R and for any e 2 DC the following holds:

½a e – ; () KE ‘ e : >ðaÞ

Proof. If ½a d – ; then there is a b such that KE ‘ e : a ¼ b, whichimplies that KE ‘ e : >ðaÞ. Vice versa, if KE ‘ e : >ðaÞ then byLReas we have KE ‘ e : a ¼ a. Therefore by definition a 2 ½a e, whichimplies ½a e – ;. h

To justify the existence of equivalence classes we must alsoshow that �e is an equivalence relation.

Lemma 9. The relation �e is an equivalence relation on the setfajKE ‘ e : >ðaÞg .

Proof. Equivalence is defined as a reflexive, symmetric, and transi-tive binary relation. Let us show that �e has all these properties:

� reflexivity: KE ‘ e : >ðaÞ implies KE ‘ e : a ¼ a, which impliesthat a�ea;� symmetry: a�eb implies KE ‘ e : a ¼ b, by LReas this implies

that KE ‘ e : b ¼ a, and therefore b�ea;� transitivity: a�eb and b�ec imply KE ‘ e : a ¼ b and

KE ‘ e : b ¼ c. By LReas we have that KE ‘ e : a ¼ c, and there-fore also a�ec. h

Finally we construct a model I of K, using the equivalence clas-ses of �e as domain elements for each local interpretation andretrieving the interpretation of concepts and roles from KE by theCKR calculus.

Definition 24 (Model construction). Given a CKR K over hC;Ri,given KE, and the equivalence relations �e for each e 2 DC asdefined in Definitions 22 and 23, let us construct an interpretationI ¼ fIege2DC

where for each e 2 DC, the local interpretationIe ¼ hDe; �Ie i is defined as follows:

De ¼ f½x ejKE ‘ e : >ðxÞg;

aIe ¼ ½a e if KE ‘ e : >ðaÞ;undefined otherwise;

(

AIe ¼ f½x ejKE ‘ e : AðxÞg;

RIe ¼ fh½x e; ½y eijKE ‘ e : Rðx; yÞg

for any constant, atomic concept, and atomic role a; A; R. For com-plex concepts and roles the interpretation is inductively defined asgiven in Table 1.

We first prove that complex concepts and roles are well definedwith respect to the CKR calculus, that is, any ABox assertion is satisfiedby the constructed model if and only if it is proved by the calculus.

Lemma 10. Given a CKR K over hC;Ri, and given KE and I asconstructed in Definitions 22 and 24, then for all e 2 DC, all constantsa; b, all complex concepts C, and all possibly inverse roles R of R thefollowing holds:

� ½a e 2 CIe iff KE ‘ e : CðaÞ;� h½a e; ½b ei 2 RIe iff KE ‘ e : Rða; bÞ.

Proof. By structural induction:

1. C ¼ A is atomic: this case follows directly from theconstruction;

2. C ¼ :D : ½a e 2 ð:DÞIe iff ½a e 2 De n DIe iff KE ‘ e : >ðaÞ andKE 0 e : DðaÞ (first from the construction, second from theinduction hypothesis) iff KE ‘ e : >ðaÞ and KE ‘ e : :DðaÞ(from Lemma 7) iff KE ‘ e : :DðaÞ (by LReas);

3. C ¼ F u G : ½a e 2 ðF u GÞIe iff ½a e 2 FIe and ½a e 2 GIe iffKE ‘ e : FðaÞ and KE ‘ e : GðaÞ (by induction hypothesis) ifKE ‘ e : F u GðaÞ (by LReas);

4. C ¼ F t G : ½a e 2 ðF t GÞIe iff ½a e 2 FIe or ½a e 2 GIe iffKE ‘ e : FðaÞ or KE ‘ e : GðaÞ (by induction hypothesis) iffKE ‘ e : F t GðaÞ (by LReas);

5. C ¼ 9R:D : ½a e 2 ð9R:DÞIe iff for some ½b e h½a e; ½b ei 2 RIe and

½b e 2 DIe iff for some b we have KE ‘ e : Rða; bÞ andKE ‘ e : DðbÞ (by the construction and induction hypothesis)iff KE ‘ e : 9R:DðaÞ (by LReas);

6. C ¼PnR:D : analogously to the previous case;7. C ¼ 8R:D : can be rewritten as :9R::D;8. C ¼6nR:D : can be rewritten as :P nþ 1R:D;9. C ¼ 9R:Self : ½a e 2 ð9R: SelfÞIe iff h½a e; ½a ei 2 RIe iff

KE ‘ e : Rða; aÞ (from the construction) iff KE ‘ e : 9R:SelfðaÞ(by LReas);

10. C ¼ fbg : ½a e 2 fbgIe iff ½a e ¼ ½b e iff a�eb iff KE ‘ e : a ¼ b (by

definition of �e) iff KE ‘ e : fbgðaÞ;11. R is atomic: this case follows directly from the construction;12. R ¼ S� is an inverse role: h½a e; ½b ei 2 RIe iff h½b e; ½e ei 2 SIe iff

KE ‘ e : Sðb; aÞ (by induction hypothesis) iff KE ‘ e : Rða; bÞ(by LReas). h

The last lemma that we need before we prove that I is a modelof K is the following one which shows that the interpretation ofconstants match between Ie and I f for constants defined in Dd.

Lemma 11. If ½a e – ; and e � f, then ½a e ¼ ½a f .

Proof. Let us prove that ½a e # ½a f: if b 2 ½a e then KE ‘ e : a ¼ b (bythe construction), then also KE ‘ f : a ¼ b (by Pop), which finallygives us b 2 ½a f (again by the construction).

Vice versa, let us prove that ½a f # ½a e: if b 2 ½a f then KE ‘ f : a ¼ bfrom the construction of �f . We have assumed ½a e – ;, hence byLemma 8 we get K ‘ e : >ðaÞ, which gives us K ‘ f : >eðaÞ by Pop.Since KE ‘ f : a ¼ b, we get K ‘ f : >eðbÞ by LReas, which finally allowsus to apply Push at KE ‘ f : a ¼ b and thus derive KE ‘ e : a ¼ b andhence from the construction of �e we have b 2 ½a e. h

We will now prove that I is a CKR model for KE, by showingthat all conditions of Definition 9 are satisfied. Note that for sakeof clarity in the following enumeration we will keep the samenotation as in Definition 9 (i.e., the previously bound d is nowany d 2 DC):

1. ð>dÞI f # ð>eÞI f if d � e : ½x f 2 ð>dÞI f iff KE ‘ f : >dðxÞ. SinceKE ‘ f : >d v >e by LReas, we have that KE ‘ f : >eðxÞ, whichimplies that ½x f 2 ð>eÞI f .

Page 22: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 85

2. ðCfÞId # ð>fÞId : ½x d 2 ðCfÞId iff KE ‘ d : CfðxÞ. SinceKE ‘ d : Cf v >f by LReas, we have that KE ‘ d : >fðxÞ, whichimplies that ½x d 2 ð>fÞId .

3. ðRfÞId # ð>fÞId � ð>fÞId : If h½x d; ½y di 2 ðRfÞId , then KE ‘ d :

Rfðx; yÞ. Furthermore we have that KE ‘ d : > v 8Rf :>f , andKE ‘ d : 9Rf :> v >f , which implies that KE ‘ d : >fðxÞ andKE ‘ d : >fðyÞ. This implies that h½x d; ½y di 2 ð>fÞId .

4. if d � e, and aIe 2 Dd then aIe ¼ aId . ½a e 2 Dd iff there is a b,such that ½b d ¼ ½a e, and ½b d 2 Dd. By Lemma 11 we have that½b d ¼ ½b e which implies that ½b e ¼ ½a e. This implies thatKE ‘ e : a ¼ b, and therefore that KE ‘ d : a ¼ b, which implies½b d ¼ ½a d. Summing up, aIe ¼ ½a e ¼ ½b d ¼ ½a d ¼ aId .

5. ðXdB ÞIe ¼ ðXdBþeÞIe : Let X be a concept C. ½x e 2 CdB , iff

KE ‘ e : CdB ðxÞ. Since KE ‘ e : CdB CdBþe, we have thatKE ‘ e : CdB ðxÞ iff KE ‘ e : CdBþeðxÞ, which holds iff ½x e 2 CdBþe.An analogous argument can be done if X is a role symbol.

6. ðXdÞIe ¼ ðXdÞId if d � e. Let X be a concept symbol C. ½x e 2 ðCdÞIe

iff KE ‘ e : CdðxÞ iff KE ‘ d : CdðxÞ iff ½x e 2 ðCdÞId . An analogousargument can be done if X is a role symbol.

7. ðCfÞId ¼ ðCfÞIe \ Dd, if d � e: ½x d 2 ðCfÞId iff KE ‘ d : CfðxÞ iffKE ‘ e : >d u CfðxÞ iff KE ‘ e : >d and KE ‘ e : CfðxÞ iff½x e 2 ðCfÞId and ½x e 2 ð>dÞId iff ½x e 2 ðCfÞId \ Dd iff½x d 2 ðCfÞId \ Dd.

8. ðRfÞId ¼ ðRfÞIe \ ðDd � DdÞ, if d � e The same argument as theprevious point.

9. Id � / for all d : / 2 KE. Consider the four different axioms:(a) / is CðaÞ: in this case KE ‘ d : CðaÞ, therefore ½a d 2 CId fol-

lows from Lemma 10;(b) / is Rða; bÞ and / is :Rða; bÞ: by construction h½a d; ½b di 2 RId

or h½a d; ½b di R RId ;(c) / is C v D: if ½x d 2 CId , then KE ‘ d : CðxÞ by Lemma 10.

Since in this case KE ‘ d : C v D by LReas we have thatKE ‘ d : DðxÞ and therefore that ½x d 2 DId again by Lemma10;

(d) / is R1 � � � � � Rn v R: if h½x d; ½y di 2 ðR1 � � � � � RnÞId then theremust be ½z1 d; . . . c; ½zn�1 d such that h½x d; ½z1 di 2 RId

1 ,h½z1 d; ½z2 di 2 RId

2 ; . . . ; h½zn�1 d; ½y di 2 RIdn . From the construc-

tion we haveKE ‘ d : R1ðx; z1Þ; KE ‘ d : R2ðz1;z2Þ; . . . ;KE ‘ d : Rnðzn�1; yÞ.Since in this case also KE ‘ d : R1 � . . . � Rn v R than by LReas

we have KE ‘ Rðx; yÞ and therefore h½x d; ½y di 2 R. Please notethat this holds also in case that any of R;R1; . . . c;Rn is aninverse role.

We have just showed that I is a model of K. During the con-struction of KE (Definition 22) we have added the formulad : > xd

0

� �into KE, therefore by LReas we have KE ‘ d : > xd

0

� �. By

the construction of the model I (Definition 24), this implies½xd

0 2 Dd. Therefore K is d-consistent.

A.3. Proof of Lemma 3

Lemma 3. If K is d-satisfiable then #ðKÞ is satisfiable.

As K is d-satisfiable, there exists a model I be a model of K withDd – ;. Let us construct a DL interpretation I ¼ hD; �I i over #ðC;RÞas follows:

1. D ¼S

d2DCDd [ fxundefg where xundef is a new element not occur-

ring in Dd for all d 2 DC;2. ðadÞI ¼ aId if aId is defined otherwise ðadÞI ¼ xundef for every

individual a and for every d 2 DC; undefI ¼ xundef;3. ðAd

eÞI ¼ CId

e for every atomic concept C of R and for everyd; e 2 DC;

4. ðRde ÞI ¼ RId

e for every atomic role R of R and for every d; e 2 DC;ðSd;e; f

R ÞI ¼ ðIddÞI � ðRe

f ÞI for every role R and for all d; e; f 2 DC;

First of all it is apparent from the construction that D – ;. It re-mains to prove that I satisfies all axioms of #ðKÞ as given in Defi-nition 21. The satisfaction of the axioms introduced in items 1–3and 5–7 follows directly from the construction and from the corre-sponding condition of I being a CKR-model (Definition 9). Let usnow show the satisfaction of the remaining axioms (items 4, 8,and 9).

The first type of axioms added in item 4 is >dd u faeg v fadg for

any individual a and for any two d; e 2 DC. Let x 2 ð>dd u faegÞI ,

that is, x 2 ð>ddÞI and x ¼ ðaeÞI . Notice that x – xundef because

x 2 ð>ddÞI ¼ >Id

d ¼ Dd and the construction implies xundef R Dd. Alto-

gether this implies that aIe ¼ ðaeÞI is defined in I and alsoaIe 2 Dd ¼ ð>d

dÞI . From Condition 4 of the CKR model this implies

that x ¼ aIe ¼ aId and therefore x 2 ðfadgÞI and hence the axiomis satisfied.

The second type of axioms added in item 4 is fadg v fae; undefgfor any individual a and for any two d; e 2 DC. That is, we have toshow that either ðadÞI ¼ ðaeÞI of ðadÞI ¼ undefI . If aId is defined,then from Condition 4 of CKR models we have aId ¼ aIe and hencefrom the construction ðadÞI ¼ ðaeÞI . If aId is undefined, then di-rectly from the construction ðadÞI ¼ undefI .

The last type of axioms added in item 4 is :>ddðundefÞ for any

d 2 DC. This follows directly from the construction of I asundefI ¼ xundef R ð>d

dÞI ¼ Dd.

The first type of axioms introduced in item 8 is Idd � Re

f � Idd v Rd

f

for any role R and for any d; e; f 2 DC with d � e. Let us first realize

that ðIddÞI ¼ IId

d , that is, it is the identity relation on Dd. Hence

ðIdd � Re

f � IddÞI ¼ ðRe

f ÞI \ ðDd � DdÞ. The fact that this set is a subset

of ðRdf ÞI follows as a consequence of the construction of I and Con-

dition 8 of CKR models.The second type of axioms introduced in item 8 is Rd

f v Ref for

any role R and for any d; e; f 2 DC with d � e. Similarly to the pre-vious case, Condition 8 of CKR models gives usRId

f ¼ RIef \ ðDd � DdÞ and from the construction of I it follows that

ðRdf ÞI ¼ RId

f ¼ RIef \ ðDd � DdÞ# RIe

f ¼ ðRef ÞI .

In addition, step 8 (b) introduces two new axioms of thew form

Idd � Re

f v Sd;e;fR and Sd;e;f

R � Idd v Rd

f for each role R and for anyd; e; f 2 DC with d � e. The first axiom is trivially satisfied due to

the construction of I which implies that ðSd;e;fR ÞI ¼ ðId

dÞI � ðRe

f ÞI . Si-

milarly for the second axiom, if x 2 ðSd;e;fR � Id

dÞI then

x 2 ðIdd � Re

f � IddÞI and since we have already proven that

I � Idd � Re

f � Idd v Rd

f then x 2 ðRdf ÞI .

Finally item 9, that is, the fact that I satisfies also theaxioms /#d; / 2 KðCdÞ, is a consequence of the fact that ð�Þ#d isdefined on the basis of an embedding of R into #ðC;RÞ, and thateach pair of interpretations Id of R and I of #ðC;RÞ complies withthis embedding. Then this item is a direct consequence ofLemma 1.

A.4. Proof of Lemma 4

Lemma 4. If there is a d such that #ðKÞ 2 >dd v ?, then K is d-

satisfiable.

Given a CKR K let I be a model of #ðKÞ such that >dd is not

empty. This model exists since by hypothesis #ðKÞ 0 >dd v ?. Let

us construct the CKR model I ¼ fIdgd2DC, where for every

d 2 DC, Id ¼ hDd; Idi is defined as follows:

Page 23: Contextualized knowledge repositories for the Semantic Web

86 L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87

1. Dd ¼ ð>ddÞI ;

2. aId ¼ ðadÞI if ðadÞI – undefI otherwise aId is undefined for everyindividual a;

3. Xd0B

Id¼ ðXd

d0BþdÞI for every atomic concept/role X 0dB

.

We show that I is a model of K. By construction we have thatthere is a d such that Dd is not empty. Let us show that all the con-ditions of Definition 9 are satisfied by I.

1. If d � e, then I � >fd v >f

e. This implies that ð>fdÞI # ð>f

eÞI ,

which implies ð>dÞI f # ð>eÞI f .2. I � Cd

e v >de implies that ðCd

eÞI # ð>d

eÞI , which implies

ðCeÞId # ð>eÞId .3. I � 9Rd

e :> v >de and I � > v 8Rd

e :>de implies that ðRd

e ÞI # ð>d

e ÞI�

ð>de ÞI , which implies ðReÞId # ð>eÞId � ð>eÞId .

4. Suppose d � e and aId is defined. From the construction of #ðKÞwe have I � fadg v fae; undefg, that is, either ðadÞI ¼ ðaeÞI orðadÞI ¼ undefI . However, since aId is defined, due to the con-struction of I it must be the case that ðadÞI – undefI and henceðadÞI ¼ ðaeÞI . From the construction of I we haveaId ¼ ðadÞI ¼ ðaeÞI ¼ aIe .Suppose the other case, i.e., d � e and aIe is defined andaIe 2 Dd. From the construction of #ðKÞ we haveI � >d

d u faeg v fadg, that is, ð>ddÞI \ fðaeÞIg# fðadÞI g. We have

assumed aIe 2 Dd and hence the construction of I this impliesðaeÞI 2 ð>d

dÞI and hence the above inclusion reduces into

fðaeÞIg# fðadÞI g which implies ðaeÞI ¼ ðadÞI and from con-struction of I also aId ¼ aIe .

5. By construction of I, we have that ðXdB ÞIe ¼ ðXe

dBþeÞI

¼ ðXdBþeÞIe ;6. We have that I � Xd

d Xed. This implies that ðXdÞIe ¼ ðXe

dÞI ¼

ðXddÞI ¼ ðXdÞId ;

7. If d � e, we have that I � Cdf Ce

f u >dd. This implies that

ðCdf ÞI ¼ ðCe

f ÞI \ ð>d

dÞI , which implies ðCfÞId ¼ ðCfÞIe \ Dd;

8. I � Idd � Re

f � Idd v Rd

f implies that ðRfÞId � ðRfÞIe \ D2d. The fact

that I � Rdf v Re

f , implies that ðRfÞId # ðRfÞIe \ D2d.

9. Let d ¼ dimðCÞ, if / 2 KðCÞ, then we have that I � /#d. Similarlyto the previous lemma, this again follows from the fact that Id

and I comply with the embedding respective to the operatorð�Þ # d, and hence we obtain this condition by Lemma 1.

A.5. Proof of Theorem 2

Theorem 2. If K is --stratified, then checking if K � d : / is decid-able with the complexity upper-bound of 2NEXPTIME.

The decidability follows from Lemmas 3 and 4, as the problemof checking K � e : / can be rewritten into the problem of checkingif #ðKÞ � /]d and #ðKÞ is --stratified. We will show that thetransformation #ð�Þ is polynomial. Since #ðKÞ is SROIQ knowl-edge base and deciding entailment id 2NEXPTIME-hard for SROIQ[35] it follows that checking if K � d : / is possible within theupper bound of 2NEXPTIME worst case complexity.

Without loss of generality, we will consider the size of the inputto be the total number of occurrences of all symbols from R and Cin both K and / summed together with the total number of all DLconstructors in K and / and with the number of formulae in K and/. We will denote this number by m. The real size of input to beprocessed depends on the encoding of symbols. As the number ofsymbols used in any particular knowledge base is always finite,suitable encoding can always be found such that the real size of in-put is c �m for some constant c [36].

As explained before, the number of contextual dimensions is as-sumed to be a fixed constant k. While in theory the number of pos-sible dimensional values may be large, in practise the number of

contexts n is always smaller than m. This is because whenever anew context C is initialized, also k new formulae are added in themeta knowledge, by which the dimensional values are associatedwith C.

Let us now determine the size of #ðKÞ. We will go through theconstruction in Definition 21 point by point:

1. one axiom >fd v >f

e for any three initialized contexts Cd; Ce andCf , with d � e. These are maximum n3 of axioms of size 3, i.e.,with total size bounded with 3� n3;

2. one axiom Ade v >d

e for any two initialized contexts Cd; Ce andfor any Ae occurring in K. Note that Ae occurs in K wheneverAeB occurs in C� with e ¼ eB þ g (below this sense will be alsoused w.r.t. roles). This means that for each such occurrence ofAe in K there is at least one actual occurrence of some AeB withpossibly incomplete dimensional vector. Therefore at most matomic symbols (concepts, roles and individuals) in total occurin K in this sense. This implies that most m� n2 axioms of size3 are added in this step, with total size bounded with3�m� n2;

3. a pair of axioms 9Rde :> v >d

e and > v 8Rde :>d

e ; for any two initi-alized contexts Cd; Ce and for any Re occurring in K. Similarly tothe previous step this yields at most 2�m� n2 axioms of size 5,i.e., with total size bounded with 10�m� n2;

4. two axioms >dd u faeg v fadg and fadg v fae; undefg for any two

initialized contexts Cd, Ce with d � e and for any constant a, andone axiom :>d

dðundefÞ for any initialized context Cd This leads tomaximum of m� n2 axioms of size 7, maximum of m� n2

axioms of size 8, and maximum of n axioms of size 3. The totalsum of all these axioms is bounded under 15�m� n2 þ 3� n;

5. one axiom Xdd Xe

d for any two initialized contexts Cd; Ce withd � e and for any atomic concept or role Xd occurring in K. Thisagain leads to the maximum of m� n2 axioms of size 3 withtotal size bounded with 3�m� n2;

6. Adf Ae

f u >dd for any two initialized contexts Cd; Ce with d � e

and for any atomic concept Af occurring in K. This leads tothe maximum of m� n2 axioms of size 5, i.e., with total sizebounded with 5�m� n2;

7. four axioms Idd � Re

f � Idd v Rd

f , Rdf v Re

f , Idd � Re

f v Sd;e;fR , and

Sd;e;fR � Id

d v Rdf for any two initialized contexts Cd; Ce with

d � e and for any Rf occurring in K. This leads to the maximumof m� n2 axioms of size 7; m� n2 axioms of size 3, and twicem� n2 axioms size 5. Total size of both these sets together istherefore bounded with 20�m� n2;

8. one axiom /#d for every axiom / occurring in any context KðCÞof K. In this step less than m axioms are added. All of theseaxioms are transformed by the #ð�Þ operator which yields to ablow up in the axiom size because each symbol may be replacedby up to five new symbols (i.e., the transformation is linear).Therefore the total size of the axioms added in this step isbounded with 5�m.

Summing up, the transformed knowledge base #ðKÞ is boundedin size with 59�m� n2 þ 8�m which is under Oðm3Þ since n 6 m.

References

[1] L. Ding, T. Finin, Y. Peng, P.P. da Silva, D. McGuinness, Tracking RDF graphprovenance using RDF molecules, in: ISWC, 2005.

[2] H.C. Liao, C.C. Tu, A RDF and OWL-based temporal context reasoning model forsmart home, Inform. Tech. J 6 (2007) 1130–1138.

[3] R. Guha, R. McCool, R. Fikes, Contexts for the semantic web, in: ISWC, 2004.[4] H. Stoermer, Introducing context into semantic web knowledge bases, in:

CAiSE DC, 2006.[5] O. Khriyenko, V. Terziyan, A framework for context sensitive metadata

description, IJSMO 1 (2) (2006) 154–164.[6] S. Klarman, V. Gutiérrez-Basulto, ALCALC: a context description logic, in: JELIA,

2010.

Page 24: Contextualized knowledge repositories for the Semantic Web

L. Serafini, M. Homola / Web Semantics: Science, Services and Agents on the World Wide Web 12–13 (2012) 64–87 87

[7] T. Tran, P. Haase, B. Motik, B. Cuenca Grau, I. Horrocks, Metalevel informationin ontology-based applications, in: AAAI, 2008.

[8] J. McCarthy, Notes on formalizing context, in: IJCAI, 1993.[9] M. Benerecetti, P. Bouquet, C. Ghidini, On the Dimensions of Context

Dependence, in: Perspectives on Contexts, CSLI, 2007.[10] M. Benerecetti, P. Bouquet, C. Ghidini, Contextual reasoning distilled, Exp.

Theor. AI 12 (3) (2000) 279–305.[11] D. Lenat, The Dimensions of Context Space, Tech. rep., CYCorp, 1998, published

online <http://www.cyc.com/doc/context-space.pdf> (accessed 21.06.2009).[12] I. Horrocks, O. Kutz, U. Sattler, The even more irresistible SROIQ, in:

Proceedings of the 10th International Conference on Principles of KnowledgeRepresentation and Reasoning (KR 2006), AAAI Press, 2006, pp. 57–67.

[13] W3C, OWL 2 Web Ontology Language Document Overview, W3CRecommendation, 2009.

[14] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, P. Patel-Schneider (Eds.), TheDescription Logic Handbook, Cambridge University Press, 2003.

[15] Y. Kazakov, An extension of complex role inclusion axioms in the descriptionlogic SROIQ, in: IJCAR, 2010.

[16] F. Giunchiglia, L. Serafini, Multilanguage hierarchical logics, or: how we can dowithout modal logics, Artif. Intell 65 (1) (1994) 29–70.

[17] A. Borgida, L. Serafini, Distributed description logics: assimilating informationfrom peer sources, J. Data Sem. 1 (2003) 153–184.

[18] J. Bao, G. Voutsadakis, G. Slutzki, V. Honavar, Package-based description logics,Modular Ontologies: Concepts, Theories and Techniques for KnowledgeModularization of LNCS, vol. 5445, Springer, 2009, pp. 349–371.

[19] O. Udrea, D. Recupero, V.S. Subrahmanian, Annotated RDF, ACM Trans.Comput. Log. 11 (2) (2010) 1–41.

[20] U. Straccia, N. Lopes, G. Lukácsy, A. Polleres, A general framework forrepresenting and reasoning with annotated semantic web data, in:Proceedings of the 24th AAAI Conference on Artificial Intelligence (AAAI2010), Special Track on Artificial Intelligence and the Web, 2010.

[21] M. Homola, A. Tamilin, L. Serafini, Modeling contextualized knowledge, in:Proceedings of the 2nd Workshop on Context, Information and Ontologies(CIAO 2010), vol. 626 of CEUR-WS, 2010.

[22] M. Joseph, L. Serafini, Simple reasoning for contextualized RDF knowledge, in:Modular Ontologies–Proceedings of the 5th International Workshop (WoMo2011), vol. 230 of FIAI, IOS Press, 2011.

[23] D. Prawitz, Natural Deduction: A Proof-Theoretical Study, Almquist andWiksell, 1965.

[24] C.C. Chang, H.J. Keisler, Model Theory, third ed., North Holland, 1990.[25] L. Serafini, M. Homola, Contextual representation and reasoning with

description logics, in: Proceedings of the 2011 International workshop onDescription Logics (DL2011), vol. 745 of CEUR-WS, 2011.

[26] D. Lenat, Cyc: a large-scale investment in knowledge infrastructure,Communications of the ACM 38 (11) (1995) 33–38.

[27] J. Bao, J. Tao, D. McGuinness, Context representation for the semantic web, in:Proceedings of WebSci10, 2010.

[28] L. Tanca, Context-based data tailoring for mobile users, in: BTW 2007Workshops, 2007, pp. 282–295.

[29] O. Kutz, C. Lutz, F. Wolter, M. Zakharyaschev, E-connections of abstractdescription systems, Artif. Intell. 156 (1) (2004) 1–73.

[30] J.Z. Pan, L. Serafini, Y. Zhao, Semantic import: an approach for partial ontologyreuse, Proceedings of the 1st International Workshop on Modular Ontologies(WoMo-06), vol. 232, Athens, Georgia, USA, 2006.

[31] B. Konev, D. Walther, F. Wolter, The logical difference problem for descriptionlogic terminologies, in: IJCAR, LNAI, Springer, 2008.

[32] E. Franconi, T. Mayer, I. Varzinczak, Semantic diff as the basis for knowledgebase versioning, in: Procs. of 13th International Workshop of Non-monotonicReasoning (NMR 2010), 2010.

[33] H.J. ter Horst, Completeness, decidability and complexity of entailment for RDFSchema and a semantic extension involving the OWL vocabulary, J. Web Sem.3 (2–3) (2005) 79–115.

[34] J. Carroll, C. Bizer, P. Hayes, P. Stickler, Named graphs, provenance and trust, in:WWW’05, ACM, 2005.

[35] Y. Kazakov, RIQ and SROIQ are harder than SHOIQ, in: KR, 2008.[36] S. Tobies, Complexity results and practical algorithms for logics in knowledge

representation, Ph.D. Thesis, RWTH Aachen, Germany, 2001.