<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>July</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Ontology Pattern Substitution: Toward their use for domain ontologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>William Leighton Dawson</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>C. Maria Keet</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Cape Town</institution>
          ,
          <country country="ZA">South Africa</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>1</volume>
      <fpage>5</fpage>
      <lpage>19</lpage>
      <abstract>
        <p>As ontologies find an ever-larger number of applications, the diversity of domain ontologies and the requirements for their intended uses increases as well, creating challenges for interoperability and tooling. There are often multiple ways of modelling the same knowledge, which have coalesced into ontology patterns and modelling styles, and pattern alignments for perceived to semantically the same domain knowledge have been identified. To facilitate interoperability and applicability of foundational ontology-based modelling choices with domain ontologies and so-called application ontologies or conceptual data models, we propose a general framework for the substitution of one pattern for another. This can be applied by various methods, including purely syntactic comparisons. A proof-of-concept tool that implements such a syntax-based approach for FOL ontologies encoded in CLIF is demonstrated and evaluated against a set of DOLCE-aligned ontologies.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Ontology Design Patterns</kwd>
        <kwd>Foundational ontologies</kwd>
        <kwd>Application ontologies</kwd>
        <kwd>Ontology Development</kwd>
        <kwd>Modelling Style</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Ontologies have found increasing use in information systems, in part due to the popularisation of the
decidable Description Logic-based languages with their standardised serialisations, such as the Web
Ontology Language (OWL) family [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and as ontologies such as the Gene Ontology [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] as well as
recent developments with the adoption of FIBO in the banking industry, ontologies for cultural heritage,
among many others, and their connection with popular knowledge graphs [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ]. The more expressive but
undecidable first-order logic (FOL) is often used as a common superset within which to describe other
logics, but it is also used for its expressiveness to describe foundational ontologies and for computational
knowledge representation such as in Colore [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Further, also conceptual data models have been given
logic-based reconstructions in various logics, including Description Logics (DLs) (e.g., [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]), OWL
(e.g., [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]), and three flavours of FOL, being common logic interchange format (CLIF) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], Alloy [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
and Z [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>Since much like conceptual data modelling for software engineering, ontology engineering is a human
practice, design patterns and modelling styles have arisen. These are patterns of expression which
reflect either their users’ preferred ontological view of the semantic relationships they must describe or
pragmatics for the prospective application. For instance, representing ‘marriage’ as a class Marriage or
as a relationship married to and the colour of a car as Colour as a subtype of Quality or as an attribute
hasColour.</p>
      <p>
        In many cases, the same knowledge may be represented in multiple, nearly equivalent, ways, and which
design pattern is used depends on factors such as preference or customs, affordance of the modelling
language or modelling tool, of model quality, and/or intended purpose of the artefact. For instance,
biological and biomedical ontologies typically follow the modelling style as in BFO [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and
ontologybased data access systems [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] require a so-called “applied” style [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] for more efficient computational
processing. This causes problems both in ontology development and in ontology-driven conceptual
modelling, notably when developing multiple conceptual data models from a single ontology to ensure
system interoperability upfront [
        <xref ref-type="bibr" rid="ref16 ref17">16, 17</xref>
        ] or, vice versa, align multiple conceptual data models to a domain
or foundational ontology [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], they will likely mismatch. Aligning ontologies that overlap but have
different modelling styles—and thus use different design patterns in their representations—requires
identifying alignments of such patterns, so that mappings may be described from one onto the other.
      </p>
      <p>
        Several patterns and pattern alignments have been identified [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] which are de facto special cases of
carefully curated complex alignments [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. Instead of finding alignments, as in [
        <xref ref-type="bibr" rid="ref19 ref20">19, 20</xref>
        ], we are interested
in transforming one axiom pattern into another. Pattern-based transformations are useful in a number
of applications, including 1) simplification, by transforming foundational ontology-inspired elaborate
representations of high complexity that also make ontologies harder to verbalise into compacter patterns
that need fewer language features and are easier to implement; 2) harmonisation of modelling style to
facilitate current or prospective ontology alignment; or 3) substitution of one foundational ontology for
another [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. This requires direct substitution of one design pattern for another within an ontology, rather
than aligning two disparate ontologies. Pat-O-Mat [22] proposes this for OWL ontologies by exploiting
SPARQL queries. Since such queries are constrained by the logic on which they operate (OWL), such an
approach does not generalise to full FOL or above to cover more and more expressive ontologies and
conceptual data models, whose expressiveness is at least popular for several ontologies, such as those in
Colore [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and conceptual data modelling languages, such as ORM [23]. While DLs are used due to their
decidability, limitations are well-known and there is still interest in knowledge representation in FOL
(e.g., [
        <xref ref-type="bibr" rid="ref6">24, 6</xref>
        ]). Additionally, most new logics are presented in the literature with mappings into FOL (e.g.,
recently in [25]), and reasoners such as Vampire [26] continue to receive attention for their relevance to
theorem proving and software/hardware verification [27].
      </p>
      <p>
        We resolve these issues in a two-step approach. First, we propose a broadly applicable framework for
pattern substitution in ontology transformation that can be implemented not only by querying an ontology
for axiom satisfaction, but also by other methods, including purely syntactic comparisons. Second, we
apply this framework, along with devising algorithms for, the substitution of the vfie ontology pattern
(OP) alignments in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] that list pairs of patterns of an applied style and foundational ontology-inspired
modelling style. The framework and algorithms were implemented in a proof-of-concept tool 1 named
Humusha (from Zulu: to translate/interpret), availing of ontologies in FOL encoded in CLIF or converted
into it, and using the parsing facilities of the Heterogeneous Tool Set (HETS) [28]. Since this is, to the
best of our knowledge, the first solution to this problem, we use a preliminary use case-based evaluation
to demonstrate its usefulness and usability. It showed correctness of encoding, but also that alignments of
domain ontologies to foundational ontologies are partial, which limits the number of pattern substitutions.
      </p>
      <p>The remainder of the paper is structured as follows. After introducing the running example in Section 2,
we present the framework and algorithms in Section 3. The implementation and evaluation is presented
in Section 4. We discuss in Section 5 and conclude in Section 6.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Running Example: The Representing Roles Pattern</title>
      <p>
        Besides the pattern pairs collected and formalised in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], we also consider those in [29]. One of the
patterns of [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] will be used as a running example, being the Representing Roles pattern, and, in the case
of patterns that reference classes and relationships from a foundational ontology, DOLCE [30] will be
used. The other patterns are included in the supplementary material (see details at the end of paper).
      </p>
      <p>The Representing Roles (RR) pattern concerns the modelling choice to represent a role as either
a subclass or a separate class with their relationship described by classes and relationships from a
foundational ontology. In the latter case, One-sided (Generic) Constant Dependence (OD and OGD,
respectively) relates two classes that are subclasses of Physical object (POB) and Social Object (SOB),
respectively, which also share the OD or OGD relation. This is illustrated in Fig. 1.</p>
      <sec id="sec-2-1">
        <title>1Available at: https://github.com/wleightond/humusha</title>
        <p>dolce:Social</p>
        <p>Object
ex:Employee
dolce:one-sided
dependence
dolce:one-sided
generic dependence
dolce:Physical</p>
        <p>Object</p>
        <p>ex:Person
substitution
ex:Person
ex:Employee</p>
        <p>After formalising each pair of complex and simplified ontology patterns, the question is thus of how to
achieve that algorithmically, and in such a way that the system is adaptable to addition of new pattern
pairs.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Framework and Architecture</title>
      <p>OP substitution in general consists of a notion of patterns, substitutions, and the processes for pattern
instance identification and substitution. An OP is comprised of a templated set of axioms (also called
axiom types) that must hold over an ontology. For OWL, identification of the satisfaction of axioms
may be done using SPARQL or SPARQL-OWL queries, but for FOL and other logics, other approaches
are needed. A general framework for substitution therefore requires first the specification of its key
components, such as the logic being operated on, its encoding, and the criterion for satisfaction and how
such satisfaction is assessed. Taking these considerations into account, we declare the components of the
framework to be as listed in Definition 1.</p>
      <sec id="sec-3-1">
        <title>Definition 1.</title>
        <p>An ontology pattern substitution framework consists of:
• The logic L and encoding (its particular syntax or serialisation) being used, Ls;
• A logical theory represented in language Ls, which is an ontology, O;
• A representation for axioms in the given logic, A ;
• A representation for patterns as constrained templated combinations of axioms, P ;
• A representation for substitutions S as pairs of valid pattern instances and their replacements;
• A set of pattern substitution specifications U such that for each pattern k there exists an element
uk = ⟨Pk, Sk⟩, a pair of pattern specifications for the pattern Pk = ⟨Ck, Rk, Fk⟩ and its substitution
Sk = ⟨Ck′, R′k, Fk′⟩, where:
– each pattern specification p ∈ P is a tuple ⟨C, R, F ⟩ of sets of elements (classes, relations,
and axioms) of the ontology O, where:
* C ⊆</p>
        <p>OC, a subset of classes in the ontology,
* R ⊆ OR, a subset of relationships in the ontology, which are used in a set of logical
formulae F such that:
* F ⊆ OA, a subset of the axioms in the ontology using only the classes and relationships
in C and R, respectively.
• An architecture for identifying pattern instances in P and substituting them using specifications in
U . Such an architecture must necessarily consist of, at least:
– A manner of identifying valid axiom instances;
– A manner of identifying valid pattern instances and generating substitutions from them;
– A manner of applying those substitution transformations to an ontology.
where these manners are assumed to be algorithms.
♢
While this framework is fixed, certain components can be instantiated in many different ways for a
particular application, in particular regarding the logic one chooses, which patterns to include for
substitutions, the pattern-finding algorithms, and the ‘manner’, or ordering of, applying the substitutions.
One could also conceive of an optional add-on to introduce a human-in-the-loop during the application of
the substitutions, but this is strictly not necessary to solve the task at hand.</p>
        <p>The set of pattern substitution specifications ( U ) is extensible and contains formal specifications
such as for the RR pattern of the running example. In this paper, we focus on foundational-to-applied
pattern substitutions. Others are, among others, the following ones, illustrated with an example each (see
supplementary material for the formal specifications):
• Class vs Object Property (COP): Marriage can be represented either as a class which a Person
participates in, or directly as a relationship between two people.
• Perdurant Class vs Object Property (PCOP): One could model a marathon as something which a</p>
        <p>Runner runs, or reify running into a class Running that is involved in (part of) a Marathon.
• Class vs Data Property (CDP): In OWL a person having a skill could be modelled with an object
property the range of which is a class Skill, or a data property hasSkill with data type String.
• Qualities vs Data Properties (QDP): an apple having a colour could be modelled with a data
property with range RGBvalue, or could make use of a foundational ontology’s classes and
relationships to model the Apple as an Endurant which has quality some Colour which has quale
some physical region.
• Class-Relationship-Attribute (CRA): a person could be modelled as having a name either by a
relationship has name some class which in turn has a data property name, or by associating such a
data property directly with the person class.
• Intrinsic descriptive property (IDP) truth-making pattern [29]: a rose having a colour could be
modelled as a Rose which participates in some ColorOccurence which has f ocus some Color
which inheres in the Rose, or as a Rose with a data property color.</p>
        <p>
          Adapting the OP to FOL from the original formalisation in Description Logics [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ], the pattern
specification for the running example RR pattern is the tuple ⟨C, R, F⟩—where C denotes the unary
predicates, R the n-ary predicates where n ≥ 2, and F the set of axioms—that constitute the pattern,
where, for the RR pattern:
        </p>
        <p>Cr = {D, E, POB, SOB} where POB, SOB ∈ ODOLCE and D, E ∈ OS
Rr = {OD, OGD} where OD, OGD ∈ ODOLCE
Fr = {∀x(D(x) → POB(x)), ∀x(E(x) → SOB(x)),</p>
        <p>∀x(E(x) → ∃y(D(y) ∧ OGD(x, y)))}
where D and E are unary relations in the source ontology OS, such as Employee, and ODOLCE the
DOLCE ontology specifically. A similar pattern could be specified for other foundational ontologies. To
demonstrate that the three axioms in F can be encoded into CLIF:
(forall (x) (if (D x) (POB x)))
(forall (x) (if (E x) (SOB x)))
(forall (x) (if (E x) (exists (y) (and (D y) (OGD x y)))))
The candidate substitution for the RR pattern is accordingly ⟨C′, R′, F′⟩ where:</p>
        <p>Cr′ ={D, E}
R′r ={}</p>
        <p>Fr′ ={∀x(D(x) → E(x))}
which is encoded into CLIF as: (forall (x) (if (D x) (E x))).</p>
        <p>Another well-known OP substitution is n-nary into n binary relations, which could occur when
converting an expressive ontology in FOL into OWL. Another one at the expressiveness vs implementation
pareto frontier includes simplifying property chains, such as from contain ∘ hasPart ⊑ contains to
asserting contains directly, i.e., materialising the deductions and removing the original chain. They
may be motivated also by language feature usage conflicts when integrating ontologies or converting an
expressive ontology into a simpler one in a language that does not have property chains, not only from a
foundational ontology-inspired style to an applied style.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Implementation and Evaluation</title>
      <p>
        To test the framework, we designed an architecture, implemented it, tested it, and evaluated it, which is
described in this section.
4.1. Design and implementation
For our instantiation of the framework and a proof-of-concept implementation, the logic used is FOL
as encoded in CLIF. The architecture for the proof-of-concept application consists of the following
components:
• A CLIF parser;
• A generator for axiom instance identifiers which takes a set of pattern specifications and generates
binaries which take in an ontology and output axioms which are instances of the given axiom, with
the templated variables extracted;
• A substitution generator which takes the set of valid axiom instances, identifies combinations of
those which form valid pattern instances, and outputs the appropriate substitution for each in the
form of ADD/DELETE commands;
• Encodings of the patterns [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] and substitutions generated for them ;
• A substitution program which executes ADD/DELETE commands in series on the original input
ontology.
      </p>
      <p>These components fit best together in a pipeline architecture to execute a sequence of steps in a set of
modules, which is depicted in Fig 2.</p>
      <p>For pattern instance detection, we devised one generic algorithm with an extensible set of
instancePatterns, which goes through the ontology to find axiom matches (Algorithm 1). Each supported
pattern has its own tailored algorithm; the one for the RR OP is included in Algorithm 2. Then, with the
set of patterns found in the input ontology, it applies the pattern-specific substitutions.</p>
      <p>Tooling for Common Logic is not as widespread as the software ecosystem of OWL. We resorted to
the CLIF parser from HETS, the Heterogeneous ToolSet [28]. The proof-of-concept was implemented
mainly in Python; however, since the only available CLIF parser useful for the task was implemented in
Haskell, the generator creates and compiles Haskell programs for identifying axiom instances.</p>
      <p>The correctness of the implementation has been evaluated against a series of synthetic test ontologies
containing individual instances of the currently supported patterns. Here, we illustrate the algorithms for
the running example.
4.2. Walking fully through an example
Let us take as example an ontology containing the axioms as listed at position ○ 1 in Fig. 3. Running
Algorithm 1, it calls Algorithm 2, which finds this to be a formula instance for RR and isolates the</p>
      <p>Input
Ontology
Finders</p>
      <p>CDP
COP
CRA
PCOP
QDP
RR
...</p>
      <p>Axioms
Instance
Finders</p>
      <p>Pattern
Instances
Substitution
Generator</p>
      <p>Substitutions
Substitutor</p>
      <p>Output
Ontology
QDP, and RR are the abbreviations of the pattern substitutions currently included in the architectures (see text
for details), which is, by design, extensible to additional substitution patterns.</p>
      <p>Algorithm 1 Axiom instance detection
Require: sentences, instancePatterns
1: procedure FINDAXIOMINSTANCES(axioms, instancePatterns)
m ←</p>
      <p>0/
for s ∈ axioms do
2:
3:
4:
5:
6:
7:
8:
9:
10:
for (name, p) ∈ instancePatterns do
vars ←
m ←</p>
      <p>variables extracted from s
m ⋃︁ {(name, vars)}
▷ by pattern matching
follows:</p>
      <p>INSTANCE
INSTANCE
INSTANCE
Just ("RR_f1",["Person","POB"])
(forall (x) (if (Person x) (POB x)))
Just ("RR_f2",["Employee","SOB"])
(forall (x) (if (Employee x) (SOB x)))
Just ("RR_f3",["Employee","Person","OGD"])
(forall (x) (if (Employee x)
variables, after which the pattern instance checker finds that it is a pattern instance, and generates the
substitution for it, and the substitution can be performed in turn.</p>
      <p>The relevant function in the axiom checker matches on the syntactic structure of the axiom and ensures
that the role of the second component of the and inside the first
exists has the name PC, and returns
the formula name and list of variables; see ○ 2 in Fig. 3. The output from the axiom checking step is as
(exists (y) (and (Person y) (OGD x y)))))</p>
      <p>The INSTANCE line marks the start of a new instance, followed by the particular formula identified
and the variables extracted from it, and thereafter the exact text of the axiom identified (interrupted only
by the next instance). When this is processed in the next stage, the function to identify RR instances
Algorithm 2 Get RR pattern instances</p>
      <sec id="sec-4-1">
        <title>Require: matches</title>
      </sec>
      <sec id="sec-4-2">
        <title>1: procedure GETRR(matches)</title>
        <p>instances ←
S f 3 ←
for f3 ∈ S f 3 do</p>
        <p>0/
f1, f2 = ⟨⟩, ⟨⟩</p>
        <p>
          f ilter(matches, name = ”RR_ f 3”)
for ⟨name, ob js, ax⟩ ∈ matches do
if name = ”RR_ f 1” ∧ ob js[0] = f3.ob js[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] then
name, ob js, ax⟩
name, ob js, ax⟩
if name = ”RR_ f 2” ∧ ob js[0] = f3.ob js[0] then
if f1 ̸= ⟨⟩ ∧ f2 ̸= ⟨⟩ then
instance ← ⟨
instances ←
instances ∪ {instance}
”RR”, f3.ob js, { f1.ax, f2.ax, f3.ax}⟩
for ⟨command, axiom⟩ ∈ substitutions do
if command = DELET E then
        </p>
        <p>Replace axiom in Oc with 0/
else if command = ADD then</p>
        <p>Append axiom to Oc
2:
3:
4:
5:
6:
7:
8:
9:
10:
checks for matches on RR_f1, RR_f2, and RR_f3 and adds to the list of valid pattern instances if the
in sequence to the input ontology, rendering the output ontology (see ○ 4 in Fig. 3).
extracted variables match, after which the substitutions are generated (see ○ 3 in Fig. 3). These are applied
4.3. Evaluation
The aim of the evaluation is to ascertain the correct functioning of the OP substitution architecture.</p>
        <p>Our evaluation is carried out in two parts. We evaluate the full pipeline against a set of synthetic
ontologies containing valid instances of each pattern and against a set of DOLCE-aligned ontologies
converted from OWL to CLIF.
4.3.1. Materials
To ensure that each pattern is tested from detection through substitution, ontologies which are both
guaranteed to contain the patterns and for which a correct substitution is easily predictable are necessary.
To this end a set of test ontologies was created manually in CLIF, one per pattern containing one instance
of that pattern, and one larger ontology combining them. The former contain minimal axioms necessary to
constitute a pattern instance, while the latter contains the concatenation of all the individual patterns. The
combined synthetic ontology was carefully constructed to ensure that various phenomena do not affect
pattern detection or substitution, notably: interlacing axioms from various patterns to avoid grouping, the
use of additional spurious axioms with similar structure to those expected to match, and use of the same
class name in axioms of multiple patterns.</p>
        <p>
          For the second part of the evaluation, a collection of DOLCE-aligned ontologies was sourced from the
corpus2 used in testing SUGOI [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ], which was used to:
1. assess the occurrence of these patterns in real-world ontologies (and thus the immediate applicability
of these pattern alignments);
2. ensure that the conversion pipeline conserves patterns present in OWL ontologies, allowing them
to be detected.
        </p>
        <p>Three of the 12 ontologies in the SUGOI DOLCE-aligned corpus failed to parse in HETS and thus could
not be converted into CLIF ontologies, leaving nine with which to evaluate. The largest of them is a
version of the data mining optimization ontology (DMOP).
2Available at: http://www.thezfiles.co.za/ROMULUS/ontologyInterchange.html
4.3.2. Methodology
The test procedure for each synthetic test ontology is as follows:
1. Normalise the ontology text
2. Apply axiom instance finder binary for target pattern
3. Apply substitution generator to valid axiom instances
4. Run substitution commands over normalised input ontology
5. Compare output ontology with predicted result
The DOLCE-aligned ontologies are encoded in OWL, and so the above procedure is preceded by a step
to first ‘0. convert the ontology from OWL to CLIF using HETS’ and step 5 is replaced by ‘5. Inspect
output and discuss’. Conversion with HETS was done with manual assistance as its output format is
incompatible with its input parser, and as such some portions of the output required manual removal. The
remainder of the process from normalisation of the CLIF representation through substitution was timed
end-to-end using the bash time command, with the real time recorded to include both processing and
I/O.
4.3.3. Results
The extraction of axioms and pattern instances, and computation and execution of substitutions are
successful over all input ontologies. Fig. 3 displays the process in action for the RR pattern used in the
running example. Furthermore, the execution times for both the synthetic and real-world ontologies are
included in Table 2, demonstrating the tractability of the syntactic approach with FOL ontologies.</p>
        <p>Of the real-world ontologies, MDMOP matched the CDP pattern in three places, generating three
substitutions. The CDP pattern’s original formulation in Description Logics refers to data properties, and
thus is less applicable in FOL. The structure is nonetheless preserved upon conversion to FOL and is both
detected and substituted.</p>
        <p>To test that other patterns would also be found in these real-world ontologies, an instance of the RR
pattern was introduced to MSceneOntology and the steps above repeated. The axioms added to the OWL
ontology prior to conversion:</p>
        <p>Plant ⊑ agentive-physical-object
PetPlant ⊑ agentive-social-object</p>
        <p>PetPlant ⊑ ∃generically-dependent-on.Plant
The pattern was detected and correctly substituted:
COMMAND: DELETE
(forall (a) (if (Plant a) (agentive-physical-object a)))
COMMAND: DELETE
(forall (a) (if (PetPlant a) (agentive-social-object a)))
COMMAND: DELETE
(forall (a) (if (PetPlant a) (exists (b)</p>
        <p>(and (generically-dependent-on a b) (Plant b)))))
COMMAND: ADD
(forall (x) (if (PetPlant x) (Plant x)))</p>
        <p>To account for this apparent lack of pattern instances, we investigate the usage of the key classes and
relationships from DOLCE in the ontologies by counting usage as assessed by Protégé for the original
OWL files. As this metric includes imports, imported axioms from DOLCE that do not contain references
to the domain ontology nonetheless contribute. As such, the presence of axioms containing the same
classes as a pattern confirms only that the pattern may possibly be present. This data is presented in
Table 1.</p>
        <p>Inspecting the alignments, we observe several interesting cases. One concerns improper DOLCE
reuse. For instance, and besides that the Naive Animal Ontology is multilingual and so most IRIs use a
UUID and encode names in labels, DOLCE terms must have been manually added as one was spelled
incorrectly (as Non-Agentive_Phisical-Object), and thus not picked up by our algorithm. Another issue
is that several ontologies appear not to import DOLCE correctly, or have incorrect representations of the
DOLCE taxonomy, such as physical object not having been declared a subclass of physical endurant in
the Spatial Action ontology, but which it is in DOLCE. Also, in some cases, only a very small fragment of
DOLCE turned out to have been reused, such as only physical object, physical quality and non-physical
endurant out of the 37 classes in DOLCE, neither of which participates directly in either of the six
patterns.</p>
        <p>In addition, since the tool is using syntactic comparison, a granularity mismatch can cause a pattern
to fail to be identiefid. As such, pattern specifications would require all relevant subclasses (here, all
subclasses of the class specified within the pattern which are within the DOLCE taxonomy) to be included
in the constraint specification for the pattern. Our tool can be configured to do this, but additional tooling
is required to streamline the pattern specification process to make pattern specification manageable when
the list of subclasses is long.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion</title>
      <p>The current algorithms cover the Class vs Object Property (COP), Perdurant Class vs Object Property
(PCOP), Class vs Data Property (CDP), Qualities vs Data Properties (QDP), Representing Roles (RR),
and Class-Relationship-Attribute (CRA) pattern pairs, and can execute the substitutions for these correctly.
They work in isolation, but axiom patterns may overlap in real world ontologies. The current insights in
ontology patterns, including ontology design patterns, do not provide sufficient insights into what to do in
those cases. This may require a human-in-the-loop during the substitution process, or a ranking of priority
on the pattern pairs. In addition, variability in axiom encoding limits simple comparison, requiring more
sophisticated pattern matching.</p>
      <p>Other considerations include the technologies used. Ontologies already in CLIF exhibited version
mismatch. The change in encodings between the first [ 31] and second [32] edition practically means that
being a .clif file is not enough to ensure that it can be parsed successfully. HETS’ CLIF parser applies
to first edition CLIF files, and thus so does our tool. More generally, while the expressiveness is a distinct
advantage regarding pattern principles and precision of substitutions, tooling for CLIF (and FOL more
generally) is limited. In addition, the representations are sufcfiiently heterogeneous that operating on
native CLIF ontologies (cf. the output of OWL-to-FOL tools) requires different treatment depending on
which CLIF version is being used and whether the ontology is CLIF-native or is part of a DOL ontology.</p>
      <p>Finally, it is noteworthy that a corpus of DOLCE-aligned ontologies contains so few instances of the
core ontology design patterns expected. In some cases technical obstacles such as the use of UUID IRIs or
import failures prevented the assessment of the presence of these patterns, but more research is necessary
to determine why they are not present in the rest and, subsequently, how they can be aligned more
systematically and comprehensively. In in broader view, this then also may facilitate ontology quality,
promoting general, application-independent ontologies for the sought-after interoperability in a principled
theory-based “foundational ontology style”, and making it easier for ontology-driven information system
developers through an automatic conversion into an ‘applied style” of modelling that more closely
matches the needs of a particular application whilst maintaining the links for interoperability and reuse.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>We have introduced an ontology pattern substitution framework that enables alternative approaches to OP
substitution, extensible to multiple logics and substitution patterns. This was realised in a proof-of-concept
tool that applies syntactic pattern matching algorithms to successfully perform substitutions on FOL
ontologies for six pattern alignments. Evaluation showed correctness of encoding and it revealed limited
practical use of well-known foundational ontology-inspired modelling patterns for those ontologies
aligned to DOLCE.</p>
      <p>
        Future work includes permutations, such as devising similar foundational ontology-inspired patterns
for BFO and UFO, and evaluation with a corresponding set of real-world ontologies. The approach may
also be extended to work in different scenarios, such as expanding the algorithms to include identification
of syntactically equivalent axioms (a ∧ b vs b ∧ a, de Morgan, etc.) and embedding in other applications,
such as the swapping an entire foundational ontology for another as in SUGOI [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] and developing a
GUI with feedback for domain experts.
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work was financially supported in part by the National Research Foundation (NRF) of South Africa
(Grant Number 120852).
K. Janowicz, S. Schlobach (Eds.), Proc. of EKAW’14, volume 8876 of LNAI, Springer, 2014, pp.
225–237. 24-28 Nov, 2014, Linkoping, Sweden.
[22] O. Zamazal, V. Svátek, Patomat: Versatile framework for pattern-based ontology transformation,</p>
      <p>Computing and Informatics 34 (2015) 305–336.
[23] T. Halpin, T. Morgan, Information modeling and relational databases, 2nd ed., Morgan Kaufmann,
2008.
[24] F. Freitas, F. Lins, The Limitations of Description Logic for Mathematical Ontologies: An Example
on Neural Networks, in: ONTOBRAS-MOST, 2012, pp. 84–95.
[25] L. Gómez Álvarez, S. Rudolph, Standpoint logic: Multi-perspective knowledge representation, in:
F. Neuhaus, B. Brodaric (Eds.), Proc. of FOIS’21, volume 344 of FAIA, IOS Press, 2021, pp. 3–17.
doi:10.3233/FAIA210367.
[26] L. Kovács, A. Voronkov, First-Order Theorem Proving and Vampire, in: D. Hutchison, et al. (Eds.),
Computer Aided Verification, volume 8044, Springer Berlin Heidelberg, Berlin, Heidelberg, 2013,
pp. 1–35. doi:10.1007/978-3-642-39799-8_1.
[27] G. Sutcliffe, The TPTP Problem Library and Associated Infrastructure, Journal of Automated</p>
      <p>Reasoning 59 (2017) 483–502. doi:10.1007/s10817-017-9407-7.
[28] T. Mossakowski, C. Maeder, K. Lüttich, The heterogeneous tool set, Hets, in: International
Conference on Tools and Algorithms for the Construction and Analysis of Systems, Springer, 2007,
pp. 519–522.
[29] N. Guarino, T. P. Sales, G. Guizzardi, Reification and truthmaking patterns, in: Proc. of ER’18,</p>
      <p>Springer, 2018, pp. 151–165.
[30] C. Masolo, S. Borgo, A. Gangemi, N. Guarino, A. Oltramari, WonderWeb deliverable D18 ontology
library (final), ICT project 33052 (2003) 31.
[31] International Organization for Standardization, Common Logic (CL): A framework for a family of
logic-based languages, 2007. URL: https://www.iso.org/standard/39175.html.
[32] International Organization for Standardization, Common Logic (CL): A framework for a family of
logic-based languages, 2018. URL: https://www.iso.org/standard/66249.html.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Motik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Patel-Schneider</surname>
          </string-name>
          ,
          <string-name>
            <surname>B. Parsia,</surname>
          </string-name>
          <article-title>OWL 2 Web Ontology Language Structural Specification</article-title>
          and
          <string-name>
            <surname>Functional-Style</surname>
            <given-names>Syntax</given-names>
          </string-name>
          ,
          <source>W3C Recommendation, W3C</source>
          ,
          <year>2009</year>
          . http://www.w3.org/TR/ owl2-syntax/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ashburner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. A.</given-names>
            <surname>Ball</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Blake</surname>
          </string-name>
          , et al.,
          <string-name>
            <surname>Gene</surname>
            <given-names>Ontology</given-names>
          </string-name>
          :
          <article-title>Tool for the unification of biology</article-title>
          ,
          <source>Nature genetics 25</source>
          (
          <year>2000</year>
          )
          <fpage>25</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>The</given-names>
            <surname>Gene Ontology Consortium</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Carbon</surname>
          </string-name>
          , et al.,
          <article-title>The Gene Ontology resource: Enriching a GOld mine</article-title>
          ,
          <source>Nucleic Acids Research</source>
          <volume>49</volume>
          (
          <year>2021</year>
          )
          <fpage>D325</fpage>
          -
          <lpage>D334</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Tudorache</surname>
          </string-name>
          , Ontology engineering: Current state, challenges, and future directions,
          <source>Semantic Web</source>
          <volume>11</volume>
          (
          <year>2020</year>
          )
          <fpage>125</fpage>
          -
          <lpage>138</lpage>
          . doi:
          <volume>10</volume>
          .3233/SW-190382.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C. M.</given-names>
            <surname>Keet</surname>
          </string-name>
          ,
          <article-title>An introduction to ontology engineering</article-title>
          , volume
          <volume>20</volume>
          of Computing, College Publications, UK,
          <year>2018</year>
          . 334p.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gruninger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Chui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Katsumi</surname>
          </string-name>
          , Upper ontologies in COLORE, in: S.
          <string-name>
            <surname>Borgo</surname>
          </string-name>
          , et al. (Eds.),
          <source>Proc. of the Joint Ontology Workshops</source>
          <year>2017</year>
          , volume
          <volume>2050</volume>
          <source>of CEUR-WS</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ryzhikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>Reasoning over extended ER models</article-title>
          , in: C.
          <string-name>
            <surname>Parent</surname>
          </string-name>
          , et al. (Eds.),
          <source>Proc. of ER'07</source>
          , volume
          <volume>4801</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2007</year>
          , pp.
          <fpage>277</fpage>
          -
          <lpage>292</lpage>
          . Auckland, New Zealand, Nov 5-
          <issue>9</issue>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Berardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          , G. De Giacomo,
          <article-title>Reasoning on UML class diagrams</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>168</volume>
          (
          <year>2005</year>
          )
          <fpage>70</fpage>
          -
          <lpage>118</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>E.</given-names>
            <surname>Franconi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mosca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Solomakhin</surname>
          </string-name>
          ,
          <article-title>The formalisation of ORM2 and its encoding in OWL2</article-title>
          ,
          <source>KRDB Research Centre Technical Report KRDB12-2</source>
          , Faculty of Computer Science, Free University of Bozen-Bolzano, Italy,
          <year>2012</year>
          . URL: http://www.inf.unibz.it/krdb/pub/TR/KRDB12-2.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>W.-L. Pan</surname>
          </string-name>
          , D.-x. Liu,
          <article-title>Mapping object role modeling into common logic interchange format</article-title>
          ,
          <source>in: Proc. of ICACTE'10</source>
          , volume
          <volume>2</volume>
          , IEEE Computer Society,
          <year>2010</year>
          , pp.
          <fpage>104</fpage>
          -
          <lpage>109</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>B. F. B.</given-names>
            <surname>Braga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P. A.</given-names>
            <surname>Almeida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Guizzardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. B.</given-names>
            <surname>Benevides</surname>
          </string-name>
          ,
          <article-title>Transforming OntoUML into Alloy: towards conceptual model validation using a lightweight formal methods</article-title>
          ,
          <source>Innovations in Systems and Software Engineering</source>
          <volume>6</volume>
          (
          <year>2010</year>
          )
          <fpage>55</fpage>
          -
          <lpage>63</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Jahangard Rafsanjani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.-H.</given-names>
            <surname>Mirian-Hosseinabadi</surname>
          </string-name>
          ,
          <article-title>A Z approach to formalization and validation of ORM models</article-title>
          , in: E.
          <string-name>
            <surname>Ariwa</surname>
          </string-name>
          , E. El-Qawasmeh (Eds.),
          <source>Digital Enterprise and Information Systems</source>
          , volume
          <volume>194</volume>
          <source>of CCIS</source>
          , Springer,
          <year>2011</year>
          , pp.
          <fpage>513</fpage>
          -
          <lpage>526</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>R.</given-names>
            <surname>Arp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Spear</surname>
          </string-name>
          ,
          <article-title>Building Ontologies with Basic Formal Ontology</article-title>
          , The MIT Press, USA,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Cogrel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Komla-Ebri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lanti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rezk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rodriguez-Muro</surname>
          </string-name>
          , G. Xiao,
          <article-title>Ontop: Answering SPARQL queries over relational databases</article-title>
          ,
          <source>Semantic Web Journal</source>
          <volume>8</volume>
          (
          <year>2017</year>
          )
          <fpage>471</fpage>
          -
          <lpage>487</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Fillottrani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. M.</given-names>
            <surname>Keet</surname>
          </string-name>
          , Dimensions Affecting Representation Styles in Ontologies, in: B.
          <string-name>
            <surname>Villazón-Terrazas</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Hidalgo-Delgado</surname>
          </string-name>
          (Eds.),
          <source>Knowledge Graphs and Semantic Web</source>
          , volume
          <volume>1029</volume>
          <source>of CCIS</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>186</fpage>
          -
          <lpage>200</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>M.</given-names>
            <surname>Jarrar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Demy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Meersman</surname>
          </string-name>
          ,
          <article-title>On using conceptual data modeling for ontology engineering</article-title>
          ,
          <source>Journal on Data Semantics</source>
          <volume>1</volume>
          (
          <year>2003</year>
          )
          <fpage>185</fpage>
          -
          <lpage>207</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>V.</given-names>
            <surname>Sugumaran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. C.</given-names>
            <surname>Storey</surname>
          </string-name>
          ,
          <article-title>The role of domain ontologies in database design: An ontology management and conceptual modeling environment</article-title>
          ,
          <source>ACM Transactions on Database Systems</source>
          <volume>31</volume>
          (
          <year>2006</year>
          )
          <fpage>1064</fpage>
          -
          <lpage>1094</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Z. C.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>M. Keet, ROMULUS: a Repository of Ontologies for MULtiple USes populated with foundational ontologies</article-title>
          ,
          <source>Journal on Data Semantics</source>
          <volume>5</volume>
          (
          <year>2016</year>
          )
          <fpage>19</fpage>
          -
          <lpage>36</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Fillottrani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. M.</given-names>
            <surname>Keet</surname>
          </string-name>
          ,
          <article-title>Patterns for heterogeneous tbox mappings to bridge different modelling decisions</article-title>
          , in: E.
          <string-name>
            <surname>Blomqvist</surname>
          </string-name>
          , et al. (Eds.),
          <source>Proc. of ESWC'17</source>
          , volume
          <volume>10249</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2017</year>
          , pp.
          <fpage>371</fpage>
          -
          <lpage>386</lpage>
          . 30 May - 1
          <source>June</source>
          <year>2017</year>
          , Portoroz, Slovenia.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>E.</given-names>
            <surname>Thiéblin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Haemmerlé</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Hernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Trojahn</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Sabou, Survey on complex ontology matching</article-title>
          ,
          <source>Semantic web 11</source>
          (
          <year>2020</year>
          )
          <fpage>689</fpage>
          -
          <lpage>727</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>Z. C.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. M.</given-names>
            <surname>Keet</surname>
          </string-name>
          ,
          <article-title>Feasibility of automated foundational ontology interchangeability</article-title>
          , in:
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>