<!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 />
    <article-meta>
      <title-group>
        <article-title>Making a Case for Formal Relations over Ontology Patterns</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Daniel P. Lupp</string-name>
          <email>danielup@ifi.uio.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leif Harald Karlsen</string-name>
          <email>leifhka@ifi.uio.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin G. Skjaeveland</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics, University of Oslo</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>There have recently been multiple frameworks proposed to formalize the definition and instantiation of recurring patterns for ontology construction and maintenance. Such formal frameworks can also provide the means necessary for discussing how such patterns can be related to one another, both syntactically and semantically. This has the potential for organizing pattern libraries, robust handling of maintenance tasks, such as redundancy removal, and defining heuristics for what constitutes a “good” pattern. This short paper aims to provide a common ground for discussions on formal relations between ontology patterns. We discuss interesting relations with motivating examples as well as state open questions concerning relations for optimizing the creation, instantiation, and maintenance of ontology patterns.</p>
      </abstract>
      <kwd-group>
        <kwd>Templating Framework for Ontology Patterns</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>head, identifying template and parameters body, representing the pattern
SUBCLASSOF(?sub : 1 class; ?super : 1 class) :: fTRIPLE(?sub; rdfs:subClassOf; ?super)g :
name parameters with type and cardinality instance with fixed and variable arguments
for optimization of their design. We believe that a richer set of template relations is both
possible and required in order to gain a more fine-grained and effective characterization
of templates and template libraries.</p>
      <p>In this paper we discuss the benefit and challenges of defining formal relations
between ontology templates and identify future directions of research in this area, with
an agnostic perspective as to which templating formalism is used. As such, the intention
is for the reader to quickly be able to translate the discussion and examples given into
the formalism of their choosing. Section 2 shows how simple relations may be used
to identify redundancies in a template library. Section 3 presents the possibilities and
potential for defining new relations over ontology templates.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Simple and Useful Template Relations</title>
      <p>Using only the first four characteristics of a template framework given in Section 1, we
can define some basic relationships between templates:
directly depends S is said to directly depend on T if S contains an instance of T in its
definition.
depends depends is the transitive closure of directly depends.
dependency-overlaps S dependency-overlaps T if there exists a template upon which
both S and T directly depend.
overlaps S overlaps T if there exist template instances iS; iT in the definition of S and T
and substitutions and of the parameters of S and T resp. such that (iS) = iT and
(iT) = iS.
contains S contains T if there exists a substitution of the parameters of T such that
applied to the pattern of T is a subset of the pattern of S.</p>
      <p>
        These relations can be used to identify redundancies in a set of templates. In [3],
two types of redundancies are considered: lack of reuse and uncaptured pattern. Lack
of reuse occurs when a template duplicates the pattern of another template rather than
instantiating it. This is exemplified by the two templates in Figure 2(a); BURGER1 contains
SUBOBJECTALLVALUESFROM (see (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) and (
        <xref ref-type="bibr" rid="ref2">2</xref>
        )). The template BURGER2 in Figure 2(b) is
the result of fixing this redundancy (replacing (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) with (4)). Uncaptured pattern is
the case when multiple templates make use of a pattern which is not represented by
a template. This is illustrated by the two templates of Figure 2(b); these templates
dependency-overlap, as seen in (
        <xref ref-type="bibr" rid="ref3">3</xref>
        )–(4) and (5)–(6). This is not an occurrence of lack of
reuse, as PIZZA cannot instantiate BURGER2 given they both use different fixed parameter
resources (e.g., hasCondiments (4) and hasTopping (6)). The uncaptured pattern may be
refactored out as a separate template; this is implemented by FOOD1 in Figure 2(c).
      </p>
      <sec id="sec-2-1">
        <title>BURGER1(?Name : 1 class; ?Condiments : + class)</title>
        <p>:: SUBCLASSOF(?Name; :Burger); OBJECTUNIONOF(_:b3; ?Condiments);</p>
      </sec>
      <sec id="sec-2-2">
        <title>SUBCLASSOF(?Name; _:b2); OBJECTALLVALUESFROM(_:b2; :hasCondiment; _:b3):</title>
      </sec>
      <sec id="sec-2-3">
        <title>SUBOBJECTALLVALUESFROM(?x : 1 class; ?Property : 1 objectProperty; ?Range : 1 class)</title>
        <p>:: SUBCLASSOF(?x; _:b1); OBJECTALLVALUESFROM(_:b1; ?Property; ?Range) :
(a) Example of lack of reuse.</p>
      </sec>
      <sec id="sec-2-4">
        <title>BURGER2(?Name : 1 class; ?Condiments : + class)</title>
        <p>:: SUBCLASSOF(?Name; :Burger); OBJECTUNIONOF(_:b1; ?Condiments);</p>
      </sec>
      <sec id="sec-2-5">
        <title>SUBOBJECTALLVALUESFROM(?Name; :hasCondiment; _:b1):</title>
      </sec>
      <sec id="sec-2-6">
        <title>PIZZA(?Name : 1 class; ?Toppings : + class; ?Country : ? individual) :: SUBCLASSOF(?Name; :NamedPizza); OBJECTUNIONOF(_:b1; ?Toppings);</title>
        <p>SUBOBJECTALLVALUESFROM(?Name; :hasTopping; _:b1);</p>
      </sec>
      <sec id="sec-2-7">
        <title>SUBOBJECTHASVALUE(?Name; :hasCountryOfOrigin; ?Country):</title>
        <p>(b) Example of uncaptured pattern.</p>
      </sec>
      <sec id="sec-2-8">
        <title>FOOD1(?Name : 1 class; ?Type : 1 class; ?Ex : + class; ?hasEx : 1 objProp)</title>
        <p>
          :: SUBCLASSOF(?Name; ?:Type); OBJECTUNIONOF(_:b1; ?Ex);
SUBOBJECTALLVALUESFROM(?Name; ?:hasEx; _:b1):
(c) Captured pattern.
(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
(4)
(5)
(6)
        </p>
      </sec>
      <sec id="sec-2-9">
        <title>FOOD2(?Name : 1 class; ?Type : 1 class; ?Ex : + class; ?hasEx : 1 objProp; ?Country : ? individual)</title>
        <p>:: SUBCLASSOF(?Name; ?:Type); OBJECTUNIONOF(_:b1; ?Ex);
SUBOBJECTALLVALUESFROM(?Name; ?:hasEx; _:b1);</p>
      </sec>
      <sec id="sec-2-10">
        <title>SUBOBJECTHASVALUE(?Name; :hasCountryOfOrigin; ?Country):</title>
        <p>(d) Captured pattern with optionals.</p>
        <p>In the analysis of the 1000 templates used for Aibel’s MMD ontology, ca. 55 million
potential redundancies were identified and 367 possibly superfluous templates found.
When deciding how to refactor the template library we used a manual approach, targeting
large templates that model specific domain facts. Fixing a single redundancy reduced the
total number of potential redundancies by more than 1.8 million. Although the analysis is
clearly useful and shows promising results, we believe these large figures show that one
has yet to find precise, effective means to characterize and repair template libraries.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Defining New Ontology Template Relations</title>
      <p>The relations defined in the previous section use only a few of the basic characteristics
for a templating mechanism given in Section 1. The following is a non-exhaustive
list of building blocks for defining formal relations between templates using both the
characteristics of a templating framework and of the underlying language. The list is
presented along with a brief summary of what kind of functionality each provides and
typical examples of possible relations defined using these characteristics:
Syntax and semantics of framework These allow syntactic and semantic relations
such as containment, entailment, and consistency, e.g., two templates could be said
to be inconsistent if for any substitutions of their parameters the use of both in
conjunction yields an inconsistent ontology.</p>
      <p>Parameters This allows for relations that take into consideration the number of
parameters, their types, and whether they are optional or not. For instance, one could say
that T strengthens the typing of S if T directly depends on S and additionally requires
a more specific type for at least one of its parameters.</p>
      <p>Expansion This allows for relations over both unexpanded and expanded templates. For
example, expanded containment could be defined to hold between T and S if the
expansion of T contains the expansion of S.</p>
      <p>Metrics Characteristics such as the template’s arity (the number of parameters), width
(the size of its pattern) and depth (the height of its expansion tree).</p>
      <p>Syntax and semantics of used vocabulary It is useful to distinguish between templates
that are completely generic (all parameters are variable) and those that use a specific
vocabulary, be it a “logical” vocabulary like RDF or OWL or a more special purpose
vocabulary. As for semantic relations such as consistency, these can be set to consider
or ignore the semantics of “external” ontologies.</p>
      <p>These building blocks give many possibilities for characterizing templates and
template libraries. We are particularly interested in identifying relations that are useful
for structuring template libraries for maintenance tasks, such as redundancy removal,
and that make it easier for the user to find the relevant template for the modeling task at
hand. In addition, finding heuristics with which libraries can be optimized according to
specific metrics, which may vary from case to case, could be a valuable asset. Ideally, the
relations and heuristics should be efficiently computable and be easily understood by
the user. Finding these requires more theoretical and empirical study. We conclude this
section by demonstrating some of the challenges of such studies.</p>
      <p>When defining relations using the above building blocks, one should proceed with
caution as some of them are incredibly powerful. For instance, allowing parameters
to be optional provides more possibilities for discovering candidates for uncaptured
patterns, as demonstrated in Figure 2: Consider the PIZZA and BURGER2 templates from
Figure 2(b). Without allowing optional parameters, a suitable template that describes the
uncaptured pattern can be seen in Figure 2(c). With optionals, however, the BURGER2
and PIZZA templates can be generalized into a single template by declaring ?Country
as an optional parameter, seen in Figure 2(d). Optionals thus provide a lot of useful
functionality; however, in general they allow for any set of templates to be summarized
into a single template. As this is likely counter-productive in most circumstances, it
would be important to identify heuristics for when optionals should or should not be used
when defining templates for uncaptured patterns.</p>
      <p>Other complex relationships can occur during the fixing of lack of reuse or uncaptured
pattern. An example that illustrates this is shown in Figure 3, where fixing one instance
T1</p>
      <p>Y
T2
X2</p>
      <p>T4
T3
T1</p>
      <p>X1
X2</p>
      <p>T4
T2</p>
      <p>T3</p>
      <p>T1</p>
      <p>T3
Y</p>
      <p>T2
of lack of reuse in Y introduces a new lack of reuse in X1. This indicates a more complex
form of lack of reuse between X1 and Y in the original library, but also, more generally,
that repairing redundancies is an iterative process. This type of composition of relations
opens the door to new types of complex relationships. Furthermore, if the template
definitions have type and cardinality restrictions set on the parameters, finding possible
optimizations or redundancies becomes even more involved: for instance, if parameter
types are too strict then the possible reuse of these templates is reduced.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion and Future Work</title>
      <p>In this paper, we introduce an abstract templating framework and the building blocks
with which formal relations over ontology patterns and templates may be defined. We
give examples of formal relations that have a demonstrable benefit to template library
maintenance (by removing redundancy) as well as provide useful functionality for tools
geared towards template creation, documentation, and discovery.</p>
      <p>
        The framework, relations and building blocks described in this paper serve primarily
as a basis for discussion. We believe it important to identify (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) what functionality we
desire for improved usability and in maintenance and creation tools, (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) what relations
these require, and (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) what properties aside from the aforementioned building blocks a
templating framework should support.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>H.</given-names>
            <surname>Forssell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Lupp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Skjaeveland</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Thorstensen</surname>
          </string-name>
          .
          <article-title>Reasonable macros for ontology construction and maintenance</article-title>
          .
          <source>In Proc. of 30th DL Workshop</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>B.</given-names>
            <surname>Krieg-Brückner</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Mossakowski</surname>
          </string-name>
          .
          <article-title>Generic ontologies and generic ontology design patterns</article-title>
          .
          <source>In Proc. of the 8th Workshop on Ontology Design and Patterns</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Skjaeveland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Lupp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. H.</given-names>
            <surname>Karlsen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Forssell</surname>
          </string-name>
          .
          <article-title>Practical ontology pattern instantiation, discovery, and maintanence with reasonable ontology templates</article-title>
          .
          <source>Accepted for ISWC 2018 research track</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>