A Logical Framework for Modularity of Ontologies∗

Bernardo Cuenca Grau, , Yevgeny Kazakov and Ulrike Sattler The School of Manchester, M13 9PL, UK {bcg, horrocks, ykazakov, sattler }@cs.man.ac.uk

Abstract ontology itself by possibly reusing the meaning of external symbols. Hence by merging an ontology with external on- Modularity is a key requirement for collaborative tologies we import the meaning of its external symbols to de- ontology engineering and for distributed ontology fine the meaning of its local symbols. reuse on the Web. Modern ontology languages, To make this idea work, we need to impose certain con- such as OWL, are logic-based, and thus a useful straints on the usage of the external signature: in particular, notion of modularity needs to take the semantics of merging ontologies should be “safe” in the sense that they ontologies and their implications into account. We do not produce unexpected results such as new inconsisten- propose a logic-based notion of modularity that al- cies or subsumptions between imported symbols. To achieve lows the modeler to specify the external signature this kind of safety, we use the notion of conservative exten- of their ontology, whose symbols are assumed to sions to define modularity of ontologies, and then prove that be defined in some other ontology. We define two a property of some ontologies, called locality, can be used restrictions on the usage of the external signature, to achieve modularity. More precisely, we define two no- a syntactic and a slightly less restrictive, seman- tions of locality for SHIQ TBoxes: (i) a tractable syntac- tic one, each of which is decidable and guarantees tic one which can be used to provide guidance in ontology a certain kind of “black-box” behavior, which en- editing tools, and (ii) a more general semantic one which can ables the controlled merging of ontologies. Analy- be checked using a DL-reasoner. Additionally, we present an sis of real-world ontologies suggests that these re- extension of locality to the more expressive logic SHOIQ strictions are not too onerous. [Horrocks and Sattler, 2005]. Finally, we analyse existing ontologies and conclude that our restrictions to local TBoxes 1 Motivation are quite natural. When integrating independently developed ontologies, we Modularity is a key requirement for many tasks concerning often have to identify different symbols in the ontologies hav- ontology design, maintenance and integration, such as the ing the same intended meaning. This is a problem known as collaborative development of ontologies and the merging of ontology matching or mapping,1 which we are not concerned independently developed ontologies into a single, reconciled with here: we consider ontologies sharing some part of their ontology. Modular representations are easier to understand, signature, and how we can make sure that that their merge reason with, extend and reuse. Unfortunately, in contrast (i.e. the union of their axioms) is “well-behaved”. to other disciplines such as software engineering—in which modularity is a well established notion—ontology engineer- ing is still lacking a useful, well-defined notion of modularity. 2 Preliminaries Modern ontology languages, such as OWL [Patel- We introduce the SHOIQ, which provides Schneider et al., 2004], are logic-based; consequently, a no- the foundation for OWL. tion of modularity needs to take into account the semantics of A SHOIQ-signature is the disjoint union S = R  C  I the ontologies and their implications. of sets of role names (denoted by R, S, ···), concept names In this paper, we propose a logic-based framework for (denoted by A, B, ···)andnominals (denoted by i, j, k, ···). modularity of ontologies in which we distinguish between A SHOIQ-role is either R ∈ R or an inverse role R− with external and local symbols of ontologies. Intuitively, the ex- R ∈ R. We denote by Rol(S) the set of SHOIQ-roles for ternal symbols of an ontology are those that are assumed to the signature S.ThesetCon(S) of SHOIQ-concepts for the be defined somewhere externally in other ontologies; the re- signature S is defined by the grammar maining, local symbols, are assumed to be defined within the Con(S) ::= A | j | (¬C) | (C1 C2) | (∃R.C) | ( nS.C) ∗This work is supported by the EU Project TONES (Thinking ONtologiES) ref: IST-007603 and by the EPSRC Project REOL 1The website http://www.ontologymatching.org (Reasoning in Expressive Ontology Languages) ref: EP/C537211/1. provides extensive information about this area.

IJCAI-07 298 where A ∈ C, j ∈ I, C(i) ∈ Con(S), R, S ∈ Rol(S), with S In order to formulate our notion of modularity, we will dis- a simple role,2 and n a positive integer. We use the following tinguish between the local and external symbols of an ontol- abbreviations: C D stands for ¬(¬C ¬D);  and ⊥ stand ogy. We assume that the signature Sig(T ) of a TBox T is for A ¬A and A ¬A, respectively; ∀R.C and nS.C partitioned into two parts: the local signature Loc(T ) of T stand for ¬∃R.¬C and ¬( n+1S.C), respectively. and the external signature Ext(T ) of T . To distinguish be- A SHOIQ-TBox T , or ontology, is a finite set of role in- tween the elements of these signatures, we will underline the clusion axioms (RIs) R1 R2 with Ri ∈ Rol(S), transitivity external signature elements whenever used within the con- T (T ) axioms Trans(R) with R ∈ R and general concept inclusion text of . Intuitively, Ext specifies the concept and role axioms (GCIs) C1 C2 with Ci ∈ Con(S).WeuseA ≡ C names that are (or can be) imported from other ontologies, (T ) T as an abbreviation for the two GCIs A C and C A. while Loc specifies those that are defined in . The signature Sig(α) (respectively Sig(T )) of an axiom α As a motivating example, imagine a set of bio-medical on- (respectively of a TBox T ) is the set of symbols occurring in tologies that is being developed collaboratively by a team of α (respectively in T ). A SHIQ-TBox is a SHOIQ-TBox experts. Suppose that one group of experts designs an on- G that does not contain nominals. tology about genes and another group designs an ontology D Given a signature S = R  C  I,anS-interpretation I about diseases. Now certain genes are defined in terms of is a pair I =(ΔI ,.I ),whereΔI is a non-empty set, called the diseases they cause. For example, the gene ErbB2 is de- .I scribed in G as an Oncogene that is found in humans and is the domain of the interpretation, and is the interpretation 3 function that assigns to each R ∈ R a binary relation RI ⊆ associated with a disease called Adrenocarcinoma I I I I Δ × Δ , to each A ∈ C asetA ⊆ Δ ,andtoevery ErbB2 ≡ Oncogene ∃foundIn.Human j ∈ I jI ⊆ ΔI a singleton set . The interpretation function is ∃associatedWith.Adrenocarcinoma extended to complex roles and concepts as follows: The concept Adrenocarcinoma is described in D, which is un- (R−)I = {x, y|y,x∈RI} der the control of a different group of modelers. So, this con- (¬C)I =ΔI \ CI cept is external for G, whereas the remaining concept and role (C  D)I = CI ∩ DI names are local for G. Now one consequence of these ontolo- (∃R.C)I = {x ∈ ΔI |∃y.x, y∈RI ∧ y ∈ CI } gies being modularly “well-behaved” would be that the gene ( nR.C)I = {x ∈ ΔI | experts building G should not change the knowledge about {y ∈ ΔI |x, y∈RI ∧ y ∈ CI }≥n} diseases, even if they are using them in their axioms. Another example is the integration of a foundational (or I|= α “upper”) ontology U and a domain ontology O. Founda- The satisfaction relation between an interpretation 4 I and a SHOIQ-axiom α (read as I satisfies α)isdefined tional ontologies, such as CYC, SUMO, and DOLCE, pro- I I vide a structure upon which ontologies for specific subject as follows: I|=(R1 R2) iff R1 ⊆ R2 ; I|= Trans(R) iff RI is transitive; I|=(C D) iff CI ⊆ DI.Aninter- matters can be constructed and are assumed to be the result pretation I is a model of a TBox T if I satisfies all axioms in of an agreement between experts. Suppose that an ontol- T T α T|= α) I|= α ogy developer wants to reuse the generic concept of a Sub- .ATBox implies an axiom (written if U O for every model I of T . An axiom α is a tautology if it is stance from in their ontology about Chemicals.Forsuch satisfied in every interpretation. a purpose, they state that the concept Organic Chemical in I I their chemical ontology O is more specific than Substance An S-interpretation I =(Δ, · ) is an expansion of an    in U by using the axiom: Organic Chemical Substance, S-interpretation I =(ΔI , ·I ) if S ⊇ S, ΔI =ΔI ,and  where Substance ∈ Ext(O). Since foundational ontologies XI = XI for every X ∈ S.Thetrivial expansion of I to  are well-established ontologies that one does not control and, S is an expansion I =(ΔI , ·I ) of I such that XI = ∅ for typically, does not have complete knowledge about, it is espe- every X ∈ S \ S. cially important that the merge O∪Udoes not produce new logical consequences w.r.t. U—even if U changes. 3 Modularity of Ontologies In both examples, we have argued that ontology integration should be carried out in such a way that consequences of a In this section, we propose a logical formalization for the no- TBox T are not changed when elements of T are reused in tion of modularity for ontologies. In analogy to software en- another TBox T . This property can be formalized using the gineering, we should be able to compose complex ontologies notion of a conservative extension [Ghilardi et al., 2006]. from simpler (modular) ontologies in a consistent and well- Definition 1 (Conservative Extension). Let T and T be defined way, in particular without unintended interactions be- TBoxes. Then T∪T is a conservative extension of T if, for tween the component ontologies. This notion of modular- every axiom α with Sig(α) ⊆ Sig(T ) we have T∪T |= α ity would be useful for both the collaborative development of iff T |= α. ♦ a single ontology by different domain experts, and the inte- Thus, given T and T , their union T∪T does not yield gration of independently developed ontologies, including the new consequences in the language of T if T∪T is a conser- reuse of existing third-party ontologies. 3Example from the National Cancer Institute Ontology http: 2See [Horrocks and Sattler, 2005] for a precise definition of sim- //www.mindswap.org/2003/CancerOntology. ple roles. 4See http://ontology.teknowledge.com.

IJCAI-07 299 vative extension of T . A useful notion of modularity, how- As discussed in Section 3, the external names are “im- ever, should abstract from the particular T under considera- ported” in order to reuse them in the definition of other con- tion. In fact, the external signature should be the core notion cepts, and not to further constrain their meaning. Intuitively, in a modular representation as opposed to its particular defin- axioms of type (1) are consistent with this idea, whereas ax- ition in a particular ontology T . This is especially important ioms of type (2) are not. when T may evolve, and where this evolution is beyond our The principal difference between these two axioms is that control—which, for example, could well be the case when us- (2) forces the external concept C2 to contain only instances of ing the “imports” construct provided by OWL. Consequently, the local concept name A, thus bounding the size of possible in order for T to use Ext(T ) in a modular way, T∪T should interpretations of C2 once the meaning of A is established. be a conservative extension of any T over Ext(T ). In contrast, (1) still (in principle) allows for interpretations Furthermore, it is important to ensure that, whenever two of C1 of unbounded size. Note that this argument does not independent parts T1 and T2 of an ontology T under the con- prohibit all inclusion axioms between external concepts and trol of different modelers are developed in a modular way, local ones. For example, in contrast to (2), the axiom then T remains modular as well. C ¬A These requirements can be formalized as follows: 2 (local) (3) M T Definition 2 (Modularity). Aset of TBoxes with still leaves sufficient “freedom” for the interpretation of C2, Sig(T )=Loc(T )  Ext(T ) is a modularity class if the fol- even if the interpretation for A is fixed. In fact, this axiom is lowing conditions hold: equivalent to A ¬C2, and thus is of type (1). M1. If T∈M,thenT∪T is a conservative extension of Our choice of the types of simple axioms to disallow can be every T such that Sig(T ) ∩ Loc(T )=∅; generalized to more complex axioms; for example, all axioms below should be forbidden for the reasons given above: M2. If T1, T2 ∈ M,thenT = T1 ∪T2 ∈ M with Loc(T )= (T1) ∪ (T2) ♦ Loc Loc . C1 A1  A2 and A ≡ C2 ∃R.B (non-local) (4) Please note that our framework is independent of the DL under consideration. Also, Definition 2 does not define a The last axiom is disallowed because it implies (2). modularity class uniquely, but just states conditions for be- Even if an axiom does not explicitly involve the external ing one. When the modularity class is clear from the context, symbols, it may still constrain their meaning. In fact, cer- we will call its elements modular ontologies. tain GCIs have a global effect and impose constraints on all In the next section, we focus our attention on the logic elements of the models of an ontology, and thereby on the in- SHIQ, and show that it is possible to define a reasonable terpretation of external concepts. For example, it is easy to modularity class such that (1) checking its membership can see that the axioms be done using standard reasoning tools, (2) it has an inex-  A and ¬A1 A2 (non-local) (5) pensive syntactic approximation that can be used to guide the modeling of ontologies in a modular way, and (3) our analy- imply (2) and the first axiom in (4) respectively.5 These ob- sis of existing ontologies shows that they seem to conform servations lead to the following definition: “naturally” with its restrictions. Definition 3 (Locality). Let S be a SHIQ-signature and let E ⊆ S be the external signature. The following grammar 4 Modularity of SHIQ ontologies + − defines the two sets CE and CE of positively and negatively In this section we define a particular modularity class, the local concepts w.r.t. E: class of local ontologies, which captures many practical ex- + − + + + amples of modularly developed ontologies. We first give a CE ::= A | (¬C ) | (C  C ) | (∃R .C) | (∃R.C ) | + syntactic definition of local ontologies and then generalize it | ( nR+.C) | ( nR.C ) . to a semantic one. Finally, we prove that our semantic defini- − + − − C ::= (¬C ) | (C1  C2 ) . tion leads to a maximal class of modular TBoxes. E Definition 2 excludes already many SHIQ-TBoxes. Prop- where A is a concept name from S \ E, R ∈ Rol(S), C ∈ erty M1, in particular, implies that no modular TBox T can + + − − + 6 Con(S), C ∈CE , C(i) ∈CE , i =1, 2,andR ∈ Rol(E). contain the two axioms below at the same time: + A role inclusion axiom R R or a transitivity axiom A C + 1 (local) (1) Trans(R ) is local w.r.t. E.AGCIislocal w.r.t. E if it is + − + + C2 A (non-local) (2) either of the form C C or C C ,whereC ∈CE , C− ∈C− C ∈ (S) SHIQ T where A is a local concept name and C1, C2 are constructed E and Con .A -TBox is local if T (T ) ♦ using Ext(T ). These axioms imply C2 C1, which indeed every axiom from is local w.r.t. Ext . C changes the meaning of the external concepts i.Atthis Intuitively, the positively local concepts are those whose point, we are faced with a fundamental choice as to the type of interpretation is bounded (i.e. its size is limited) when the axioms to disallow. Each choice leads to a different modular- interpretation of the local symbols is fixed. In this respect, ity class. We argue that, analogously to software engineering, 5  where refinement is the main application of modularity, ax- ¬A1 A2 implies A1A2, which implies C A1A2. 6 ioms of type (1) fit better with ontology integration scenarios, Recall that ∀R.C, ( nR.C) and C1 C2 are expressed using such as those sketched in Section 3, than axioms of type (2). the other constructors, so they can be used in local concepts as well.

IJCAI-07 300 they behave similarly to local concept names. Negatively lo- Lemma 5 tells us that, in Example 4, W∪Fdoes not cal concepts are essentially negations of positively local con- entail new information about food only.EvenifF evolves, cepts. Please, note that, given E ⊆ S, a concept written over say by adding the axiom VealParmesan ∃producedIn.Italy + − S may be neither in CE , nor in CE . using a third ontology C of countries, W will not inter- Definition 3 can be used to formulate guidelines for con- fere with F. On the other hand, using the imported con- structing modular ontologies, as illustrated by the following cepts from F allows us to derive some non-trivial proper- example. Moreover, Definition 3 can be used in ontology ed- ties involving the local and mixed signature of W,suchas itors to detect and warn the user of an a priori “dangerous” Chardonnay RedWine and Rioja DeliciousProduct. usage of the external signature—without the need to perform As we have seen, our notion of locality from Definition 3 any kind of reasoning. yields a modularity class. This class, however, is not the most Example 4 Suppose we are developing W, an ontology about general one we can achieve. In particular, there are axioms F that are not local, but obviously unproblematic. For example, wines, and we want to reuse some concepts and roles from , A A  C an independently developed ontology about food. the axiom is a tautology, but is disallowed by Definition 3 since it involves external symbols only; another F: VealParmesan MeatDish ∃hasIngredient.Veal example is the GCI A1  B A2  B which is implied by A A DeliciousProduct ∃hasIngredient.DeliciousProduct the (syntactically) local axiom 1 2. The limitation of our syntactic notion of locality is its inability to “compare” Trans(hasIngredient) concepts from the external signature. W: Chardonnay Wine ∃servedWith.VealParmesan A natural question is whether we can generalize Defini- ∃ . tion 3 to overcome this limitation. Obviously, such general- Rioja Wine hasIngredient Tempranillo ization cannot be given in terms of syntax only since check- RedWine  Wine ∃servedWith.MeatDish ing for tautologies in the external signature necessarily in- Tempranillo DeliciousProduct volves reasoning. Since our proof of Lemma 5 relies mainly on Lemma 6, we generalize our notion of locality as follows: Here Ext(W)={hasIngredient, DeliciousProduct, Definition 7 (Semantic Locality). Let E ⊆ S.ASHIQ- VealParmesan, MeatDish} and W is local. ♦ axiom α with Sig(α) ⊆ S is semantically local w.r.t. E if The following Lemma shows that our notion of locality sat- the trivial expansion I of every E-interpretation I to S is a isfies the desired properties from Definition 2. model of α.ASHIQ-TBox T is semantically local if every axiom in T is semantically local w.r.t. Ext(T ). ♦ Lemma 5 [Locality Implies Modularity] The set of local SHIQ TBoxes is a modularity class. Lemma 6 essentially implies that every syntactically local TBox is semantically local. Interestingly, both notions coin- To prove Lemma 5, we use the following property: cide when E = ∅ or when α is a non-trivial role inclusion Lemma 6 Let T bealocalSHIQ TBox with E = Ext(T ), axiom (not of the form R R) or a transitivity axiom. It and let I be an E-interpretation. Then the trivial expansion is easy to check that the conditions for a modularity class in I of I to Sig(T ) is a model of T . Definition 2 hold for semantic locality as well. The following proposition provides an effective way of checking whether a Proof. We need to show that I|= α for every α ∈T. α ∈T GCI satisfies Definition 7: According to Definition 3, every has one of the forms: R+ R, Trans(R+), C+ C or C C−,where Proposition 8 Let α be a GCI and E ⊆ S.Letα be obtained + + + − − α ∃R.C R ∈/ Rol(E), C ∈C and C ∈C . To prove I|= α from by replacing every subconcept of the form , E E nR.C A α ⊥ it is then suffices to show that (R+)I = ∅, (C+)I = ∅ and , and every concept name in with ,where (C−)I =ΔI R/∈ Rol(E) and A/∈ E.Thenα is semantically local w.r.t. for each such axiom. The first property holds E α since I is the trivial expansion of an E-interpretation I.The iff is a tautology. remaining two properties can be easily shown by induction ∃R.C nR.C C+ C− Proof. The subconcepts of the form , ,and over the definitions of E and E from Definition 3. A are interpreted by ∅ in every trivial expansion of every E ⊥ Proof of Lemma 5. Let M be a set of TBoxes Ti, each of -interpretation, hence they are indistinguishable from in which is local w.r.t. Ext(Ti). Property M2 from Definition 2 the context of Definition 7. Replacing all these subconcepts α ⊥ α (α) ⊆ E follows from Definition 3 since every axiom α that is local in with yields with Sig , and thus Defini- α SHIQ w.r.t. E is also local w.r.t. every E with (E ∩ Sig(α)) ⊆ E. tion 7 implies that is semantically local iff every - α In order to prove Property M1, let T bealocalSHIQ- interpretation satisfies .  T ∪T |= α T TBox. Assume ( ) for some TBox and an As mentioned above, deciding semantic locality involves axiom α with Sig(α) ⊆ Sig(T ) and Sig(T ) ∩ Loc(T )=∅. reasoning; in fact, this problem is PSPACE-complete in the We have to show that T |= α. 7 T |= α size of the axiom, as opposed to checking syntactic locality, Assume to the contrary that . Then, there exists which can be done in polynomial time. We expect the test a model I of T such that I |= α.LetI be the trivial expansion of I to Sig(T ).ThenI|= T and I |= α since 7 This is precisely the complexity of checking subsumption be- Sig(α) ⊆ Sig(T ). Additionally, by Lemma 6, I|= T .So tween SHIQ-concepts w.r.t. the empty TBox and without role in- T∪T |= α, which contradicts our assumption (). clusions and transitivity axioms [Tobies, 2001].

IJCAI-07 301 from Proposition 8 to perform well in practice since the size over it. Under this assumption, Definitions 3 and 7 can be of axioms in a TBox is typically small w.r.t. the size of the reused for SHOIQ. Such notions of locality still allow for TBox, and would like to point out that it can be performed non-trivial uses of nominals in T . For example, the following using any existing DL reasoner. axiom is semantically local w.r.t. E = {elvis},evenifelvis It is worth noting that both notions of locality provide the is used as a nominal: “black-box” behavior we are aiming at, and both involve only ElvisLover ≡ MusicFan ∃likes.elvis the ontology T and its external signature. Finally, a nat- ural question arising is whether semantic locality can be fur- Indeed, the trivial expansion of every E-Interpretation to S = ther generalized while preserving modularity. The following {ElvisLover, MusicFan, likes} is a model of this axiom. lemma answers this question negatively. Definition 11 (Locality for SHOIQ). A SHOIQ-TBox T (T )=RCI Lemma 9 [Semantic Locality is Maximal] with Sig is syntactically (semantically) local E T E ∪ I If a SHIQ-TBox T1 is not semantically local, then there exist w.r.t. if is syntactically (semantically) local w.r.t. ♦ SHIQ-TBoxes T2 and T such that T2 is local, Loc(T2) ⊆ as in Definition 3 (Definition 7). Loc(T1), Loc(T1) ∩ Sig(T )=∅,andT1 ∪T2 ∪T is not a Lemma 12 [Semantic Locality Implies Modularity] The conservative extension of T . set of semantically local SHOIQ TBoxes is a modularity E class for . Proof. Let T1 be not semantically local, and define T2 and T The proof is analogous to the one of Lemma 5. Unfortu- as follows: T2 consists of the axioms of the form A ⊥and nately, an important use of nominals in DLs, namely ABox ∃R. ⊥for every A, R ∈ Loc(T1); T consists of axioms assertions, is non-local according to our definition. For ex- of the form ⊥ A and ⊥ ∃R . for every A ,R ∈ ample, the assertion elvis Singer (typically written as Ext(T1). Note that (i) T2 is local, (ii) for every model I of I I elvis:Singer) is not local since elvis is treated as an exter- T2,wehaveA = ∅ and R = ∅ for every A, R ∈ Loc(T1) nal element. In fact, it is not possible to extend the definition and (iii) every Ext(T1)-interpretation is a model of T ,and of locality to capture assertions and retain modularity: (iv) T uses all symbols from Ext(T1). In order to show that T1 ∪T2 ∪T is not a conservative Proposition 13 [Assertions Cannot be Local] extension of T , we construct an axiom α over the signature For every assertion α =(i A) there exists a syntactically T T∪{α} of T such that T |= α but T1 ∪T2 ∪T |= α .Since local TBox such that is inconsistent. T α ∈T 1 is not semantically local, there exists an axiom 1 Proof. Take T = {A ⊥}. which is not semantically local w.r.t. Ext(T1),andwhichwe use to define α .Ifα is a role axiom of the form α =(R Proposition 13 implies that no TBox T1 containing an as- R),wesetα =( ∀R.⊥);ifα =(R S) with sertion α can be declared as local without braking either prop- R = S or α = Trans(R),wesetα = α;andifα is a erty M1 or M2 of modularity from Definition 2. Indeed, by GCI, we define α from α as in Proposition 8. As a result, α taking T as in the proof of Proposition 13, we obtain an in- uses Ext(T1)=Sig(T ) only, and T |= α since α is not a consistent merge T1 ∪T which should be local according to tautology (for the last case this follows from Proposition 8). M2 if T1 is local. However, no inconsistent TBox can be local Since T1 contains α and because of the property (ii) above since it implies all axioms and hence violates condition M1. for T2,wehaveT1 ∪T2 |= α ,andsoT1 ∪T2 ∪T |= α . Even if the merge of a TBox and a set of assertions is con- sistent, new subsumptions over the external signature may Lemma 9 shows that semantic locality cannot be general- still be entailed. For example, consider the TBox T consist- ized without violating the properties in Definition 2. Indeed, ing of the axiom: condition M2 implies that the union T of two local TBoxes T1 Frog ∃hasColor.green ∀hasColor.Dark and T2 is a local TBox, and condition M2 implies that T∪T is conservative over every T with Sig(T ) ∩ Loc(T )=∅. which is local w.r.t. E = {green, Dark}.Ifweaddtheasser- The results in Lemma 5 and Lemma 9 are summarized in the tion kermit Frog to T , then we obtain that green is a dark following theorem: color (green Dark), as a new logical consequence. Theorem 10 A set of semantically local SHIQ TBoxes is a To sum up, we have shown that locality can be extended maximal class of modular TBoxes. to SHOIQ, but not in the presence of assertions. An open question is whether semantic locality for SHOIQ is maxi- 5 Modularity of SHOIQ ontologies mal in the sense of Lemma 9. When trying to extend the results in the previous section to 6 Field Study the more expressive logic SHOIQ, we soon encounter diffi- In order to test the adequacy of our conditions in practice, culties. Nominals are interpreted as singleton sets and, thus, a we have implemented a (syntactic) locality checker and run straightforward extension of Definition 7 fails since nominals it over ontologies from a library of 300 ontologies of various cannot be interpreted by the empty set. sizes and complexity some of which import each other [Gar- A notion of modularity, however, can still be achieved if diner et al., 2006].8 Since OWL does not allow to declare all nominals in a TBox T are treated as external concepts; the intuitive reason for this is that the interpretation of nominals 8The library is available at http://www.cs.man.ac.uk/ is already very constrained, and hence we have little control ∼horrocks/testing/

IJCAI-07 302 symbols as local or external, we have used the following “in- the external signature: instead of considering a pair of ontolo- formed guess work”: for an ontology T ,wedefinetheset gies T , T , our approach takes an ontology T with specified Loc(T ) as the set of symbols in T that do not occur in the sets of local and external symbols, and provides guarantees signature of the ontologies imported (directly or indirectly) for the merge of T with any ontology T which does not use using the owl:imports construct by T , and defining Ext(T ) local symbols. In contrast, the approach described in [Ghi- to be the complement of Loc(T ) in Sig(T ).Theowl:imports lardi et al., 2006] considers the problem of whether, for two construct allows to include, in an ontology T , the axioms of given ALC TBoxes T , T ,theirmergeT∪T is conserv- another ontology T published on the Web by reference. The ative over T . It turns out that this problem is decidable in usage of owl:imports T in T produces the (logical) union 2EXPTIME in the size of T∪T, and thus it is significantly T∪T. harder than standard reasoning tasks (such as deciding on- It turned out that 96 of the 300 ontologies used the tology consistency). A solution to the latter problem can be owl:imports construct, and that all but 11 of these 96 ontolo- used to decide whether T and T can be safely merged— gies are syntactically local (and hence also semantically lo- which can be the case without any of them being local. If cal). From the 11 non-local ontologies, 7 are written in the T or T are changed, however, then this test would need to OWL-Full species of OWL to which our framework does not be repeated—which is not the case in the approach presented yet apply. The remaining 4 non-localities are due to the pres- here (see the above discussion of its black box behavior). As ence of so-called mapping axioms of the form A ≡ B,where a consequence, these two approaches can be used in different A ∈ Loc(T ) and B ∈ Ext(T ), which are not even seman- scenarios: ours can be used to provide guidelines for ontology tically local. We were able to fix these non-localities as fol- engineers who want to design modular ontologies that show lows: we replace every occurrence of A in T with B and black box behavior, whereas the one described in [Ghilardi et then remove this axiom from T . After this transformation, all al., 2006] can be used to check safe integrability for a given, 4 non-local ontologies turned out to be local. fixed set of TBoxes. Summing up, we have proposed a logic-based framework 7 Discussion and Related Work for modularity, which we have instantiated in a plausible and practically applicable way for SHIQ, and in a preliminary In the last few years, a rapidly growing body of work has way for SHOIQ. We believe that our results will be useful been developed under the names of Ontology Mapping and as the foundations of tools that support both the collabora- Alignment, Ontology Merging and Ontology Integration;see tive development of complex ontologies and the integration [Kalfoglou and M.Schorlemmer, 2003; Noy, 2004] for sur- of independently developed ontologies on the Semantic Web. veys. This field is rather diverse, has originated from differ- ent communities, and is concerned with two different prob- lems: (i) how to (semi-automatically) detect correspondences References between terms in the signatures of the ontologies to be in- [Gardiner et al., 2006] T. Gardiner, I. Horrocks, and tegrated (e.g. Instructor corresponds to ), and, (ii) D. Tsarkov. Automated benchmarking of description how to assess and predict the (logical) consequences of the logic reasoners. In Proc. of DL, 2006. merging. Typically, when integrating ontologies, one first [Ghilardi et al., 2006] S. Ghilardi, C. Lutz, and F. Wolter. solves (i) and then (ii). Did I damage my ontology? a case for conservative ex- Although (i) has been the focus of intensive research in tensions in description logics. In Proc. of KR-06, 2006. the last few years [Kalfoglou and M.Schorlemmer, 2003], and tools for ontology mapping are available, to the best of [Grau et al., 2006] B. Cuenca Grau, I. Horrocks, O. Kutz, our knowledge, the problem of predicting and controlling and U. Sattler. Will my ontologies fit together? In Proc. the consequences of ontology integration has been addressed of DL, 2006. only very recently in [Ghilardi et al., 2006] and [Grau et al., [Horrocks and Sattler, 2005] I. Horrocks and U. Sattler. A 2006].In[Ghilardi et al., 2006], the authors point out the tableaux decision procedure for SHOIQ.InProc. of IJ- importance of the notion of a conservative extension for on- CAI, 2005. tology evolution and merging, and provide decidability and [Kalfoglou and M.Schorlemmer, 2003] Y. Kalfoglou and complexity results for the problem of deciding conservative M.Schorlemmer. Ontology mapping: The state of the art. ALC [ ] extensions in the basic DL .In Grau et al., 2006 ,the The Knowledge Engineering Review, 18:1–31, 2003. authors identify two basic ontology integration scenarios. For each of them, the authors established a set of semantic proper- [Noy, 2004] N. Noy. Semantic integration: A survey on ties (including being conservative extensions) to be satisfied ontology-based approaches. SIGMOD Record, 2004. by the integrated ontology, and presented a set of syntactic [Patel-Schneider et al., 2004] P.F. Patel-Schneider, P. Hayes, constraints on the component ontologies to ensure the preser- and I. Horrocks. OWL semantics vation of the desired semantic properties. and abstract syntax. W3C Recommendation, 2004. [ The results in this paper generalize those from Grau et [Tobies, 2001] S. Tobies. Complexity Results and Practical ] al., 2006 , since the integration scenarios presented there are Algorithms for Logics in Knowledge Representation.PhD particular cases of Definition 3. Also, in contrast to both , RWTH Aachen, 2001. [Ghilardi et al., 2006],and[Grau et al., 2006], our notion of modularity implies a “black box” behavior with respect to

IJCAI-07 303