1 Introduction

Ontology developers face choices on how to represent the subject domain knowledge during the ontology authoring stage. In some instances, there really is a right and a wrong way of representing it—e.g., not confusing subsumption with parthood—but this is not always the case. For instance, whether Marriage should be represented as a class or as an object property. Some OWL files may also lean more toward being a logic-based conceptual data model for a single application, rather than have its knowledge represented such that many applications may avail of it, such as with ontologies for ontology-based data access applications [2] versus foundational ontologies such as DOLCE [16], respectively. In the context of ontology alignment, such different modelling decisions result in modeller-intended alignments that cannot be found automatically with current alignment tools [19, 23] and may have a mismatch logically despite a deemed ‘sufficient semantic equivalence’ conceptually. For instance, ontology \(O_1\) may have \(\mathsf{Employee \sqsubseteq Person}\), which is a typical subsumption in conceptual modelling, versus \(\mathsf{Person \sqsubseteq Physical Object}\), \(\mathsf{Employee \sqsubseteq Role}\), and \(\mathsf{Employee \sqsubseteq \exists inheresIn.Person}\) in ontology \(O_2\) that is inspired by foundational ontology modelling practices, and where \(\mathsf{Physical Object \sqsubseteq \lnot Role}\) is also asserted. Aligning \(\mathsf{Employee}\) and \(\mathsf{Person}\) across these two ontologies with a simple 1:1 equivalence axiom will then result in an unsatisfiable \(\mathsf{Employee}\) in \(O_1\). This and similar situations raise the question of how to link or integrate \(O_1\) with \(O_2\) when there is no single vocabulary element to match with in both ontologies, or when intuitively the knowledge represented is deemed sufficiently the same with respect to the subject domain knowledge, but an alignment will result in an inconsistency nevertheless.

This question can be recast as one of somehow having to manage and resolve heterogeneous modelling patterns, rather than the customary pairwise alignments of single elements [3, 19]. This requires the capability to align patterns as a whole, and thus also involve different types of elements that will have to be bridged, such as a class and an object property, which has been noted widely as an open issue in ontology matching [19]. Ontology Design Patterns (ODPs) have a type of pattern called correspondence pattern, with a few correspondences proposed in [20,21,22] and several submissions are included in the ODP catalogueFootnote 1. They are mostly definition alignments, however, i.e., with a class on the left-hand side of the equivalence and a pattern (the definition of the class) on the right-hand side (automated only recently [7]), rather than patterns on both sides. Ghidini et al. [8] focus on logic and reasoning complexity and cover only a small subset of possible correspondences with single heterogeneous elements. In short, heterogeneous alignments between modelling patterns is a manual, individual, process at present.

We aim to address this mapping impasse by identifying common modelling patterns, their rationale, and providing a formalisation of the corresponding ODPs, inclusive of a formalisation of an ontology pattern itself. This resulted in six complex alignments between modelling patterns. Secondly, we show that automated finding of the patterns and checking correctness of a possible pattern-based alignment is indeed possible. Algorithmically, finding such patterns can be reduced to localised pattern matching in the ontology. We present two such algorithms for one of the pattern alignments to demonstrate that feasibility; the algorithms for the other patterns follow the same design. They are being implemented in the ICOM tool [4] that already caters for inter-ontology assertions between single elements in different OWL ontologies and reason over them.

The remainder of this paper is structured as follows. Section 2 describes related work. Sections 3 and 4 present the main theoretical contribution of the paper with the formal representation of a design pattern and the pattern alignments. Section 5 describes the optimised algorithms, which is followed by a discussion (Sect. 6) and conclusions (Sect. 7).

2 Related Works

The work most closely related to ours is that of [20,21,22], who present mostly definition alignments as correspondence patterns within the context of ontology design patterns. That is, there is one named concept in ontology \(O_1\) that matches with an axiom in \(O_2\), such as PinotageWine in a simple wine ontology \(O_1\) being aligned to \(\mathsf{Wine \sqcap \exists grapeVariety.Pinotage}\) from a more detailed wyn ontologie \(O_2\). Based on the alignment naming, Scharffe et al.’s (no longer available) library [22] also includes a few homogeneous mappings that involve more than one element, such as a range restriction. Somewhat related to this are entity transformations within the same ontology [25], which covers single-entity swaps and one pattern similar to one in [21]. Such correspondences were, at the time, a substantial extension to the 1:1 mappings common in ontology matching [3, 19] and independent of later automated alignment efforts [19]. Definition alignments and automatic finding thereof now has a logic-based tool to assist with this [7].

Other recent efforts in automated ontology matching has commenced considering aligning domain ontologies to a foundational ontology [23], which brings afore a separate set of issues. One is that such matching involves mostly subsumption rather than equivalence [23]. The domain ontology\(\leftrightarrow \)foundational ontology alignment issues regarding modelling choices, such as a process as a class (e.g., Running) or an object property () (e.g., runs) and those mentioned in the introduction of this paper, were not addressed. Logic-based approaches for heterogenous alignments were investigated in [8] that focussed on the class  mappings (DL concept, role), such as the marriage example mentioned in the introduction, and  (DL role, attribute) mappings, using bridge rules. These two patterns are a subset of the range needed for heterogeneous alignments and the logic is a subset of OWL (\(\mathcal {ALCQI}_b\)). The Distributed Ontology Language [17] takes another approach by defining a framework by which to link and extend logical theories. This is useful for the case where the ontologies are represented in different logics, but it does not consider patterns yet.

Conceptual model alignment patterns have been proposed by [5, 14], which resemble some of the cases in ontologies, such as their class\(\leftrightarrow \)relationship and the relationship\(\leftrightarrow \)attribute, and ORM Value Type\(\leftrightarrow \)UML Attribute. They used a rule-based approach to inter-model links in general and more applied with ATL in particular, which is popular in model-driven engineering but not immediately usable for ontologies, and they avail of a particular unifying metamodel to mediate between the conceptual models, which is different for OWL.

In sum, while some reusable ideas have been proposed, logic-based linking of heterogeneous patterns between ontologies it yet to be solved.

3 Formal Representation of Patterns and Alignments

We need a way to formally describe a pattern before being able to declare links between patterns. Such precision is useful for determining a logical or a ‘subject domain semantics’ equivalence or subsumption or another motivation for aligning the patterns. To the best of our knowledge, there is no formal definition of an ODP yet, therefore we introduce this first before the actual alignment patterns. Note that the focus is on the ontology and logic aspects; for a specification of ODP documentation and metadata, the reader is referred to [12].

Definition 1

(Language of pattern instantiation). OWL Ontology O with language specification adhering to the W3C standard [18], which has classes \(C \in V_C\), object properties \(OP \in V_{OP}\), data properties \(D \in V_D\), data types \(DT \in V_{DT}\) of the permitted XML schema types, axiom components (‘language features’) \(X \in V_X\), and such that \(Ax \in V_{Ax}\) are the axioms.

Of course, this could be another ontology language, but it is easier for the current presentation to cast it in the context of OWL. The ‘axiom components’ in Definition 1 include features such as functionality on an object property “\(\le 1\,\)”, transitivity, ‘at least one’ “\(\exists \)”, and cardinality that can be used according to the syntax of the language.

The pattern itself is a meta-level specification, alike UML’s stereotyping. In addition, because some patterns will refer to categories from a foundational ontology, yet which are also included in the ontology, we acknowledge their status here with respect to the context of a pattern.

Definition 2

(Language for patterns: Vocabulary \(\mathcal {V}\)). The meta-level (second order) elements (or stereotypes) for patterns are:

  • class \(C \in V_C\) as \(\mathcal {C}\) in the pattern;

  • object property \(OP \in V_{OP}\) as \(\mathcal {R}\) in the pattern;

  • data property \(D \in V_D\) as \(\mathcal {D}\) in the pattern;

  • data type \(DT \in V_{DT}\) as \(\mathcal {DT}\) in the pattern;

  • reserved set of entities from a foundational ontology, as \(\mathcal {F}\) in the pattern;

where added subscripts i with \(1 \le i \le n\) may be different elements. Two elements in the vocabulary are called homogeneous iff they belong to the same type, i.e., they are both classes, or both object properties, and so on. Elements can be used in axioms \(Ax \in V_{Ax}\) that consists of axiom components \(x \in V_X\) in the pattern such that the type of axioms are those supported in the ontology language in which the instance of the pattern is represented.

Subsumption and equivalence axiom components relate homogeneous elements; functionality and at least one axiom components relate heterogeneous elements from the vocabulary. The set of “reserved entities” in \(\mathcal {F}\) depends on which foundational ontology is used; e.g., for DOLCE, this set includes, among others, Perdurant, Endurant, and qt and for BFO, Independent Continuant and Quality.

An ontology pattern P can now be defined as follows.

Definition 3

(Ontology Pattern P). An ontology pattern P consists of more than one element from vocabulary \(\mathcal {V}\) which relate through at least one axiom component from \(V_X\). Its specification contains the:

  • pattern name;

  • pattern elements from \(\mathcal {V}\);

  • pattern axiom component(s) from \(V_X\);

  • pattern’s full formalisation.

For instance, a simple named class subsumption pattern with axiom component \(\sqsubseteq \) (in \(V_X\)) and two named classes is formalised as \(\mathcal {C}_1 \sqsubseteq \mathcal {C}_2\), which can be instantiated with classes, e.g., \(\mathsf{Human, Animal} \in V_C\) as, in DL notation, \(\mathsf{Human \sqsubseteq Animal}\). A slightly more comprehensive one, the basic all-some pattern, then has as specification: pattern name: basic all-some, with pattern elements: \(\mathcal {C}_1\), \(\mathcal {C}_2\), \(\mathcal {R}\), the pattern axiom component(s): \(\sqsubseteq \), \(\exists \), and the pattern’s full formalisation: \(\mathcal {C}_1 \sqsubseteq \exists \mathcal {R}.\mathcal {C}_2\). An instantiation of this pattern is, e.g., \(\mathsf{Professor \sqsubseteq \exists teaches.Course}\).

Now that we have a precise notion of patterns and instantiations, we can proceed to define mappings between elements in different ontologies in two steps: the component of common homogeneous mappings and the homogeneous with heterogeneous alignments that are typically needed to align patterns as a whole. The former is defined in Definition 4, which is a shorthand version of the lengthy specification in [3], and the latter in Definition 5.

Definition 4

(Homogeneous mapping). Let \(O, O'\) be two ontologies with vocabularies \(\mathcal {V},\mathcal {V'}\). A mapping is a subsumption or equivalence axiom relating two homogeneous elements, one in \(\mathcal {V}\) and the other in \(\mathcal {V'}\).

For example, to relate the class \(\mathsf{Teacher}\) in O to \(\mathsf{Instructor}\) in \(O'\) with the mapping \(\mathsf{Instructor}\sqsubseteq \mathsf{Teacher}\). Mappings provide bindings between homogeneous elements in different ontologies, constituting the basis for ontology pattern alignment.

Definition 5

(Ontology Pattern Alignment, OPA). An ontology pattern alignment OPA consists of two ontology patterns, P and \(P'\), such that its signature \(\Sigma \) is a subset of the signature of the respective ontologies O and \(O^{\prime }\), i.e., \(\Sigma (P) \subseteq \Sigma (O)\) and \(\Sigma (P') \subseteq \Sigma (O^{\prime })\), and alignment axioms

  • alignment pattern name;

  • pattern elements;

  • alignment patterns’ context, consisting of:

    • O’s pattern P

    • \(O^{\prime }\)’s pattern \(P'\)

  • alignment pattern axiom component(s) from \(V_X\);

  • pattern alignment’s formalisation, composed of:

    • a (possibly empty) set of mappings between homogeneous elements in P and \(P'\)

    • a set of axioms made from components in \(V_X\) connecting heterogeneous elements in P and \(P'\)

An OPA thus relates different patterns in separate ontologies, based on previous knowledge of class or alignments.

Note that here, and in the remainder of the paper, a pattern must neither be inconsistent nor have unsatisfiable classes or s. That is, a pattern is well-formed, and verified to be so before any alignment of patterns will occur.

4 Aligning Alternate Modelling Patterns

In presenting the patterns, we first introduce those motivated by ‘conceptual’ or ‘subject domain semantics-motivated’ mappings that have sufficient semantic approximation and are typical for differences in modelling decisions between domain ontologies and foundational ontologies (Sect. 4.1). Subsequently, we analyse, update, and formalise those presented elsewhere, which are mostly of the definitorial type rather than true pattern mappings (Sect. 4.2). In interest of space, we omit from the presentation the “pattern axiom component(s)”, for they they are principally relevant for the language fragments aspects, which is not the current scope and they can be seen from the full formalisation anyway.

4.1 Matching Modelling Patterns

Five pattern alignments are introduced, of which common examples are shown in Fig. 1. While they may look different, some are slight variants of the same pattern, so, in the interest of space, we formalise the principal cases only.

Fig. 1.
figure 1

Examples of the modelling patterns. A: generic class vs ; B: Perdurant class vs ; C: class vs. ; D: qualities vs s; E: example on representing roles.

A: Class vs. Object Property ( ) is the more generic, unconstrained version of Fig. 1-B (‘Perdurant class vs. ’; see below),which is called granularity mismatch in [6]. The typical example is Marriage. It may well be that most practical cases turn out to be of that pattern because typically verbs are used as names of s, which, in turn, are typically reified as dolce:Perdurant or bfo:Occurrent.

  • alignment pattern name: class-OP

  • pattern elements: \(\mathcal {C}_1, \mathcal {C}_2, \mathcal {R}_1\) from O, \(\mathcal {C}^{\prime }_3, \mathcal {C}^{\prime }_4, \mathcal {C}^{\prime }_5, \mathcal {R}^{\prime }_2, \mathcal {R}^{\prime }_3\) from \(O'\)

  • alignment pattern’ contexts:

    • pattern P in O: \( \exists \mathcal {R}_1.\mathcal {C}_2 \sqsubseteq \mathcal {C}_1\) and \(\exists \mathcal {R}_1^-.\mathcal {C}_1\sqsubseteq \mathcal {C}_2\);

    • pattern P’ in O’: \( \exists \mathcal {R}^{\prime }_2. \mathcal {C}^{\prime }_4\sqsubseteq \mathcal {C}^{\prime }_3\), \(\exists \mathcal {R}^{\prime -}_2. \mathcal {C}^{\prime }_3\sqsubseteq \mathcal {C}^{\prime }_4 \), \(\exists \mathcal {R}^{\prime }_3. \mathcal {C}^{\prime }_5\sqsubseteq \mathcal {C}^{\prime }_3\), \(\exists \mathcal {R}^{\prime -}_3. \mathcal {C}^{\prime }_3\sqsubseteq \mathcal {C}^{\prime }_5\), \(\mathcal {C}^{\prime }_3\sqsubseteq (\exists \mathcal {R}^{\prime }_2)\), and \(\mathcal {C}^{\prime }_3\sqsubseteq (\exists \mathcal {R}^{\prime }_3)\).

  • pattern’s full formalisation:

    • homogeneous mappings: between \(\mathcal {C}_1\) and \(\mathcal {C}^{\prime }_4\) and between \(\mathcal {C}_2\) and \(\mathcal {C}^{\prime }_5\), which may be subsumption or equivalence relations.

    • heterogeneous alignments:\(\exists \mathcal {R}_1\sqsubseteq \mathcal {C}^{\prime }_3\), \(\exists \mathcal {R}_1^-\sqsubseteq \mathcal {C}^{\prime }_3\), \(\mathcal {C}^{\prime }_3\sqsubseteq \exists \mathcal {R}_1\sqcap \exists \mathcal {R}_1^-\sqcap (\le 1\, \mathcal {R}_1) \sqcap (\le 1\, \mathcal {R}_1^-)\).

Figure 1-A includes two instantiations of this pattern. In the first one, \(\mathcal {C}_1\equiv \mathcal {C}_2\) for Person, \(\mathcal {C}^{\prime }_4\equiv \mathcal {C}^{\prime }_5\) for Person as well, and the pattern associates the role \(\mathsf{married\ to}\) (\(\mathcal {R}_1\)) with the class \(\mathsf{Marriage}\) (instantiating \(\mathcal {C}^{\prime }_3\)). There must be an equivalence or a subsumption mapping between the Person classes in both ontologies. Note that due to cardinality constraints in \(P'\) that are not in P, the alignment de facto generates a new property that is a sub property of \(\mathcal {R}_1\).

B: Perdurant Class vs. . This mismatch tends to occur more often when aligning a domain ontology to a foundational ontology (FO). FOs typically have a class Perdurant (Occurrent) for objects unfolding in time (cf. endurants that are wholly present at each time instant they exist), which is the branch in the TBox to represent entities such as Running and Performance. They relate to endurants, like a runner participates in a running (event) like a marathon. Domain ontologies may use a modelling approach more typical of conceptual modelling, where there would not be a ‘running’, but an  runs between a class runner and the class marathon, and an  performs etc. That is, the choice between the verb or its reification. For the FO, there are thus three classes (runner, running, and marathon) with two s, whereas in the domain ontology, there are two classes (runner and marathon) and one . The formalisation of this pattern is similar to case A, but \(\mathcal {F}\) is non-empty such that \(\mathcal {C}^{\prime }_3 \sqsubseteq PD\) (DOLCE’s Perdurant, or an equivalent [13]) and at least \(\mathcal {C}_1\), \(\mathcal {C}_2\), \(\mathcal {C}^{\prime }_4\) and \(\mathcal {C}^{\prime }_5\) in the pattern are subsumed by ED (Endurant) or its equivalent.

C: Class vs Data Property ( ). A typical example that also persists in conceptual modelling, is whether ‘skill’ should be modelled as a class Skill with subclasses or as a  hasSkill with data values. From an ontological viewpoint, the former is better, as the latter diminishes the chances of interoperability and usability of ontologies, but it does occur. Note that in the pattern alignment, we take s to be specialisations of s, which are recast as a subsumption between two unnamed classes.

  • alignment pattern name: class-DP

  • pattern elements: \(\mathcal {C}_1, \mathcal {D}_1,\mathcal {DT}_1\) from O, \(\mathcal {C}^{\prime }_2, \mathcal {C}^{\prime }_3, \mathcal {R}^{\prime }_1\) from \(O'\).

  • alignment pattern contexts:

    • pattern P in O: \(\exists \mathcal {D}_1 \sqsubseteq \mathcal {C}_1\) and \(\exists \mathcal {D}_1.\mathcal {DT}_1 \sqsubseteq \mathcal {C}_1\);

    • pattern P’ in O’: \(\exists \mathcal {R}^{\prime }_1\sqsubseteq \mathcal {C}^{\prime }_2\), and \(\exists \mathcal {R}^{\prime -}_1\sqsubseteq \mathcal {C}^{\prime }_3\).

  • pattern’s full formalisation:

    • homogeneous mappings: \(\mathcal {C}_1 \sqsubseteq \mathcal {C}^{\prime }_2\);

    • heterogeneous alignments: \(\exists \mathcal {D}_1.\mathcal {DT}_1 \sqsubseteq \exists \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_3\)

vs . This is a consequence of the ‘class vs data property’ choice, for the  turns into a class, which therewith forces the introduction of an . The details of  vs.  are a fragment of the previous one, and is therefore omitted.

D: Qualities vs. s. This distinction is another case of FO modelling vs the more widely-known option from conceptual modelling practices. Instead of a  such as hasColour and hasHeight that are known in philosophy as attributions, one can turn that into a class of type Quality (or similar) and then have two properties, one from the class of type Endurant to the Quality and one from the Quality to a Region for the value space. This is a modification of case C, for it entails ‘class vs. data property’ as the attribute is turned into a class, yet it is not just any class but specifically Quality from a FO (i.e., it is in \(\mathcal {F}\)), with associated s and a subclass of \(\mathsf{Abstract} \in \mathcal {F}\) for the category of value regions, and associated constraints.

  • alignment pattern name: quality-DP

  • pattern elements: \(\mathcal {C}_1, \mathcal {D}_1,\mathcal {DT}_1\) from O, \(\mathcal {C}^{\prime }_2, \mathcal {C}^{\prime }_3, \mathcal {C}^{\prime }_4, \mathcal {C}^{\prime }_5, \mathcal {C}^{\prime }_6, \mathcal {C}^{\prime }_7, \mathcal {R}^{\prime }_1, \mathcal {R}^{\prime }_2\) from \(O'\) where \(\mathcal {C}^{\prime }_3, \mathcal {C}^{\prime }_5, \mathcal {C}^{\prime }_7, \mathcal {R}^{\prime }_1, \mathcal {R}^{\prime }_2 \in \mathcal {F}\).

  • alignment pattern contexts:

    • pattern P in O: \(\exists \mathcal {D}_1.\mathcal {DT}_1 \sqsubseteq \mathcal {C}_1\);

    • pattern P’ in O’: \(\mathcal {C}^{\prime }_2 \sqsubseteq \mathcal {C}^{\prime }_3\), \(\mathcal {C}^{\prime }_4 \sqsubseteq \mathcal {C}^{\prime }_5\), \(\mathcal {C}^{\prime }_6 \sqsubseteq \mathcal {C}^{\prime }_7\) \(\exists \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_5\sqsubseteq \mathcal {C}^{\prime }_3\), \(\exists \mathcal {R}^{\prime -}_1.\mathcal {C}^{\prime }_3\sqsubseteq \mathcal {C}^{\prime }_5\), \(\exists \mathcal {R}^{\prime }_2.\mathcal {C}^{\prime }_7\sqsubseteq \mathcal {C}^{\prime }_5\), \(\exists \mathcal {R}^{\prime -}_1.\mathcal {C}^{\prime }_5\sqsubseteq \mathcal {C}^{\prime }_7\), \(\mathcal {C}^{\prime }_5 \sqsubseteq \exists \mathcal {R}^{\prime -}_1.\mathcal {C}^{\prime }_3\), \(\mathcal {C}^{\prime }_5 \sqsubseteq \exists \mathcal {R}^{\prime }_2.\mathcal {C}^{\prime }_7\), and these are inherited down the hierarchy for \(\mathcal {C}^{\prime }_2\), \(\mathcal {C}^{\prime }_4\), and \(\mathcal {C}^{\prime }_6\).

  • pattern’s full formalisation: (in addition to the “alignment pattern contexts”)

    • homogeneous mappings: \(\mathcal {C}_1 \sqsubseteq \mathcal {C}^{\prime }_2\);

    • heterogeneous alignments: \(\exists \mathcal {D}_1.\mathcal {DT}_1 \sqsubseteq \exists \mathcal {R}^{\prime }_1.(\exists \mathcal {R}^{\prime }_2.\mathcal {C}^{\prime }_6)\)

If \(\mathcal {F}\) draws from DOLCE’s vocabulary, then \(\mathcal {C}^{\prime }_3 \equiv ED\) (Endurant), \(\mathcal {C}^{\prime }_5 \equiv Q\) (Quality), \(\mathcal {C}^{\prime }_7 \equiv R\) (Region), \(\mathcal {R}^{\prime }_1 \equiv qt\) (‘has quality’), and \(\mathcal {R}^{\prime }_2 \equiv ql\) (‘has quale’); see [13] for their mappings to BFO and GFO.

E: Representing Roles. The differences for this case can be traced back to both conceptual modelling practices and OntoClean [9] that conflict with FO guidelines. For instance, one can represent \(\mathsf{Employee \sqsubseteq Person}\) in an ontology, or, more generally in OntoClean terminology, that an anti-rigid property (like Employee) is subsumed by a rigid one (like Person). FOs put those anti-rigid properties—they being the roles played by rigid properties (Independent Continuant in BFO or Physical Object in DOLCE)—in another branch in the taxonomy, typically as subclasses of, e.g., Role in BFO or Social Object in DOLCE. The two are then related through an  generally known as inherence, where the role inheres in the physical object or the physical object is the bearer of the role.

  • alignment pattern name: subs-Role-inherence

  • pattern elements: \(\mathcal {C}_1\), \(\mathcal {C}_2\) from O, \(\mathcal {C}^{\prime }_3\), \(\mathcal {C}^{\prime }_4\), \(\mathcal {C}^{\prime }_5\), \(\mathcal {C}^{\prime }_6\), \(\mathcal {R}^{\prime }_1\) from \(O'\) and \(\mathcal {C}^{\prime }_4, \mathcal {C}^{\prime }_6, R^{\prime }_1 \in \mathcal {F}\).

  • alignment pattern contexts:

    • pattern P in O: \(\mathcal {C}_1 \sqsubseteq \mathcal {C}_2\);

    • pattern P’ in O’: \(\mathcal {C}^{\prime }_3 \sqsubseteq \mathcal {C}^{\prime }_4\), \(\mathcal {C}^{\prime }_5 \sqsubseteq \mathcal {C}^{\prime }_6\), \(\exists \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_6 \sqsubseteq \mathcal {C}^{\prime }_4\), \(\exists \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_5 \sqsubseteq \mathcal {C}^{\prime }_3\), \(\exists \mathcal {R}^{\prime -}_1.\mathcal {C}^{\prime }_4 \sqsubseteq \mathcal {C}^{\prime }_6\), \(\exists \mathcal {R}^{\prime -}_1.\mathcal {C}^{\prime }_3 \sqsubseteq \mathcal {C}^{\prime }_5\), \(\mathcal {C}^{\prime }_6 \sqsubseteq \, =1\, \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_4\), \(\mathcal {C}^{\prime }_5 \sqsubseteq \, =1\, \mathcal {R}^{\prime }_1.\mathcal {C}^{\prime }_3\).

  • pattern’s full formalisation:

    • homogeneous mappings: \(\mathcal {C}_1 \equiv \mathcal {C}^{\prime }_5\), \(\mathcal {C}_2 \equiv \mathcal {C}^{\prime }_3\);

    • heterogeneous alignments: the subsumption relation in O aligns with \(\mathcal {R}_1\), which is not expressible in DL or OWL.

If \(\mathcal {F}\) draws from DOLCE, then \(\mathcal {C}^{\prime }_4 \equiv POB\) (Physical object), \(\mathcal {C}^{\prime }_6 \equiv SOB\) (Social object), and \(\mathcal {R}^{\prime }_1 \equiv OD\) (one-sided constant dependence) or \(\mathcal {R}^{\prime }_1 \equiv OGD\) (one-sided generic constant dependence); see [13] for their mappings to BFO and GFO.

4.2 Assessment and Formalisation of Other Correspondence Patterns

As noted, correspondence patterns have been proposed before in [20,21,22] and there are several submissions in the ODP catalogue. The analysis of these CPs brings afore the difference between patterns that are patterns and those that are essentially definition mappings. That is, the former has more than one vocabulary element on the left-hand side of the mapping (recall Definition 3 of an ODP) and more than one vocabulary element on the right-hand side of the inclusion or equivalence, whereas the latter has one vocabulary element on the left-hand side and more than one on the right-hand side (or vv.). We first provide the analysis of the proposed CPs and refine and formalise the the patterns afterward.

Ritze et al. [20] surveyed multiple sources, and proposed four patterns based on that, three of which are of the definition-mapping type:

CAT::

Class Attribute Type: \(C_1 \equiv \exists R_2.C_2\), where R can be an  or , with as example: \(\mathsf{Positive Reviewed Paper \equiv Paper \sqcap \exists hasEvaluation.positive}\) [20]. By that example, R is a , not an , and the right-hand side in the pattern misses a parent class. This would need to be separated into a CAT for s and CAT for s, so as to recognise the pattern properly in alignment tools. The omission of the named class on the rhs seems to have been unintended, for [20] note it is the same as the CAT in the ODP catalogue (see below), which does include the class on the rhs, as does its ‘inverse’, below.

CAT\(^-\)::

\(C_1 \equiv C_2 \sqcap \exists R^-_2.C_3\); e.g., \(\mathsf{Researcher \equiv Person \sqcap \exists researchedBy^-.\top }\) [20].

CAV::

Class Attribute Value, with nominals: \(C_1 \equiv \exists R_2.\{...\}\), with as example \(\mathsf{submittedPaper \equiv submission.\{true\}}\), where ‘true’ is discussed as if it were a Boolean but is represented as one of the values, like the one for passing the course as \(\mathsf{hasExamScore.\{A,B,C,D\}}\) [20]. However, with nominals/one-of, which is a class, CAV turns out to be a variant of CAT.

PC::

\(R_1 \equiv S_2 \circ S_3\), where \(S_3\) is a  [20]. However, OWL2 does not permit a chain combining s and a , and if \(S_3\) were to be an , then the ontologies+mapping assertion goes beyond OWL 2 DL, for true role composition is undecidable. This can be corrected by asserting subsumption rather than equivalence, which brings us back to our pattern D.

Scharffe and Fensel [21, 22] claim to have a library of 35 patters, but the URL in the paper is broken, therefore, we assess only those described in [21, 22], three of which are definitorial. Those patterns all have observed instances, such as when trying to align the wine ontology with the ontologie du vin, DOAP with OSSV, and FOAF with itself, whose examples are omitted here for brevity.

CAT::

Class Attribute Type: \(C_1 \equiv C_2 \sqcap \exists R_2.C_3\) [21], as intended by [20].

CRD::

\(C_1 \sqsubseteq \exists R_2.(\exists S_2.datatype) \equiv D_3 \sqsubseteq \exists R_3.datatype\), so \(S_2\) and \(R_3\) are s [21], and noting that the ‘Property-Relation Correspondence’ in [22] is a fragment of CRD. This is a sort of specialisation of our pattern D, as a  is a kind of .

UI::

Union and intersection patterns: they were not formalised in [21, 22], but are obvious, being: \(C_1 \equiv C_2 \sqcup C_3\) and \(C_1 \sqcap C_2 \equiv C_3\).

The other correspondence patterns listed in [22] include homogeneous mappings of one or more entities, such as ‘Equivalent Attribute’ and domain/range axioms, whereas a ‘Class to instance’ mapping constitutes a modelling error in either O or \(O'\) and is therefore not considered here.

The ODP catalogue (see footnote 1) has two types of correspondence patterns: reengineering and alignment patterns. The former can be seen as a ‘swapping’ of elements within the same ontology for syntax refactoring, whereas the latter are matchings between two ontologies. There are 13 submitted alignment patterns. They include the aforementioned Class Union (UI), CAT, CAV, Class by path attribute value (alike the PC of [20]), Class correspondence by relation domain with an unsupported AttributeOccurenceCondition, (named) Class Equivalence, (named) Class Subsumption, disjointness between (named) classes, and three Vocabulary Alignment Patterns (VAP) that have the same formalisation in the catalogue, amounting to an  subsumption where the subsumed one has a domain and range axiom whose classes are aligned as well.

This results in the following two heterogeneous alignments inspired by [21]’s CRD and the catalogue’s VAP:

figure a

The formalisation of the six OPAs, and thus 12 ODPs, presented in this section constitute typical cases of modelling decisions. Although this might still be shown to be not exhaustive, it does comprise a systematic approach for extension with other complex alignments.

5 Alignment Pattern Search and Checking Algorithms

In order to show viability of our proposal, we introduce in this section two algorithms for automated finding of, and checking correctness for, for handling pattern A from Sect. 4.1. These algorithms can be incorporated in an ontology development tool based on a DL/OWL reasoner, evidencing patterns are practically relevant in ontology engineering (lest the pattern becomes an abstract constraint relegated to a handwaiving manual check at best). We assume the tool already has the capability of simultaneously handling two or more ontologies, and also can represent inter-ontology homogeneous mappings between classes and between s. ICOM [4] is an example of such a tool.

Inter-ontology mappings can be explicitly added by the user, or implicitly detected by the tool assisted by the reasoner. Both algorithms are described using calls to OWLink [15] services in order to make them independent of the actual DL/OWL reasoner used in the tool.

Algorithm 1 searches for all possible pattern matching instantiations in any pair of ontologies such that the homogeneous mappings have already been analysed. The search is done based on reasoner services and proposes to the user to select which of the instantiations found are meaningful for the ontology integration process. It uses OWLink’s IsOPSatisfiable for checking  satisfiability and GetSubClasses with the ‘direct’ flag activated in order to get the immediate descendants of a class expression, and it needs to be run each time before accepting a suggestion made by the user. Algorithm 1’s running time is proportional to \(m^2r^3c\), where m is the number of detected homogeneous mappings, r the number of s and c the number of classes in the integration scenario. This is acceptable for being on-demand available when the user considers the homogeneous mappings stable.

figure b
Fig. 2.
figure 2

ICOM integration project with mappings (top) and pattern alignment suggestion (inset).

To illustrate the algorithm with an example, suppose we are integrating two pre-existing ontologies, represented as different ICOM schemas within the same grand project as shown in Fig. 2. The \(\mathbf {TennisCircuit}\) ontology (top one) contains knowledge about tennis matches and the \(\mathbf {Olympiad}\) ontology (second one) describes athletes who participated in Olympic competitions (setting aside whether they are ‘good’). ICOM’s homogeneous mappings are shown with thin cross-ontology lines, being \(\mathsf {TennisPlayer}\sqsubseteq \mathsf {Athlete}\) and \(\mathsf {Tennis}\sqsubseteq \mathsf {Tournament}\), which may have been explicitly added by the user, detected by deduction from the tool, or (when integrated) suggested by an ontology alignment technique [1]. After assessing the mappings, the user may ask the tool to find possible alignment patterns. It runs Algorithm 1, and in line 5 it finds class \(\mathsf {Match}\) such that it is connected to \(\mathsf {partOf}\) and \(\mathsf {played}\). Then it asks the reasoner to check if these two s are related to the already mapped classes \(\mathsf {Tournament}\) and \(\mathsf {TennisPlayer}\) from \(\mathbf {TennisCircuit}\) (lines 6–7), and finds \(\mathsf {participated}\) that connects the mapped classes \(\mathsf {Tennis}\) and \(\mathsf {Athlete}\) from \(\mathbf {Olympiad}\) in line 8. Given everything is satisfiable, it sets a new candidate alignment connecting a subproperty of \(\mathsf {participated}\) in \(\mathbf {Olympiad}\) with the concept \(\mathsf {Match}\) in \(\mathbf {TennisCircuit}\), and presents it to the user in a different colour as depicted in Fig. 2 (inset). Observe that the matched  in \(\mathbf {Olympiad}\) is not directly defined over the mapped class, but instead over a class higher in the hierarchy. Therefore, the suggested alignment is based on the restriction of the original . The role of the reasoner in the algorithm is essential in order to resolve which  is applicable for the alignment.

Algorithm 2 checks whether a proposed pattern A instantiation follows the formalised pattern properties. This would admit the alignment pattern to be included in the integration process. The application scenario for this algorithm is that the designer suspects the pattern is relevant for the integration, and has already set the alignments in the project. Then she asks tool to verify all conditions for the alignment pattern are met. For this algorithm there is no precondition for its execution, and it simply communicates with the reasoner checking satisfiability of the pattern formalisation within both ontologies.

figure c

Algorithms for the other patterns can be developed analogously, and are not shown due to space limitations. If the pattern references a FO, as in pattern B, D, and E, this fact can be used to shorten the algorithm execution time by restricting the search of candidates to only the descendants of the FO’s elements in the pattern. Pattern C can be detected by exhaustively analysing each  involved in a given mapped class. Pattern D can be handled by similar algorithms as Algorithms 1 and 2 by replacing the  in the first ontology (O) with a , and then the search shortened with the FO optimisation.

6 Discussion

The patterns and their alignments proposed in the previous sections allow for both specifying and finding more complex alignment than the customary 1:1 mappings and definition mappings. Reconsidering the ODP formalisation of Sect. 3, this bears similarity to the framework in [21], for it takes into account a certain ‘layering’ of components, from the actual pattern instantiations in an ontology represented in a particular language and their mapping to another one (called “ground correspondences” in [21]), a “correspondence level” where the correspondences between the patterns are represented in an abstract format cf. the ground correspondence in the application, and the abstraction of that as a correspondence pattern. Having patterns on both sides of the (equivalence or subsumption) mapping bridge essentially extends these layers to the more complex scenarios of pattern alignments considered in this paper. Further, the algorithms have been designed such that one can do a local search compared to brute force exhaustive searches across the whole ontology. This speeds up the alignment process.

The pattern alignments do not come ‘for free’ computationally, however. Some issues and consequences of aligning patterns were already mentioned in passing: one cannot assert that some relation R in ontology O is the same as \(S \circ T\) in ontology \(O'\), for \(R \equiv S \circ T\) is undecidable, and thus outside OWL 2 DL. Other combinations may also result in undecidability whilst the separate ontologies are within OWL 2 DL, especially due to the regularity constraint on role hierarchies [10]. Our alignments do remain within OWL 2 DL, but it does not guarantee to remain within the O’s or \(O'\)’s fragments; e.g., pattern alignment A adds a conjunction.

While the scope here is complex alignments of ontologies, one also could use the results obtained as a basis to replace patterns in one single ontology, i.e., moving toward a refactoring of a single ontology as a preparatory step for alignment. For instance, to prepare a domain ontology for linking to a foundational ontology, which thereby can substantially extend the entity transformations of PatOMat [25]. It is expected to be useful also for the process of transforming a foundational ontology inspired domain ontology into an ‘application ontology’ for ontologically well-founded conceptual models, whose ideas were proposed in [11, 24], but that yet still lack a formalisation and automation.

7 Conclusions

The paper introduced a first formalisation of an ontology design pattern, as a prerequisite for complex alignments between different common modelling patterns. Twelve patterns for six pattern alignments were motivated from a modelling viewpoint and formalised, augmented with two alignments inspired by definition alignments. They are supported by two efficient local search and pattern matching algorithms that can propose possible pattern alignments to the modeller. We are currently implementing the algorithms in ICOM. As future work, the proposed pattern alignments may be recast as refactoring patterns within a same ontology that may be of use in test-driven development of ontologies or facilitate the automation of the link to ontology-driven conceptual modelling.