<!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>Ontology Design Patterns for Representing Context in Ontologies using Aspect Orientation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>lph S</string-name>
          <email>ralph.schaefermeier@imise.uni-leipzig.de</email>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Fraunhofer FOKUS</institution>
          ,
          <addr-line>Berlin</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Freie Universitaet Berlin</institution>
          ,
          <addr-line>Berlin</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Institute for Medical Informatics, Statistics and Epidemiology, Leipzig University</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Context-sensitive knowledge is ubiquitous. Knowledge may, for example, change over time and from location to location, or it may be dependent on an observer's background knowledge, belief, or opinion. We observe that specifying context leads to recurring modeling problems. For example, the modeling of temporal context involves the specification of one or several time intervals and attaching them to the axioms or facts that are supposed to be valid during that time. The formalism for specifying the temporal context may, however, vary. As a solution, we present a catalog of parametrizable ontology design patterns (ODPs) specific to the problem of modeling context. We base the patterns on the aspect-oriented extension of OWL 2, because it allows nesting of contexts and the usage of the entirety of OWL 2 (DL) as the context description language. We evaluate the adequacy and usefulness of the approach within a real-life research project about anatomical structure recognition in 3D endoscopic imaging, in which a highly contextualized mapping ontology between the qualitative arrangement of 3D shapes, anatomical structures, and surgical situations is developed. We can show that the use of a context specification formalism leads to an adequate representation of the domain at hand and that the proposed context ODPs facilitate the modeling of contextualized knowledge. Nevertheless, the ODPs are sufficiently abstract and general to be reused in different domains and application scenarios.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontology Design Pattern</kwd>
        <kwd>Context</kwd>
        <kwd>OWL</kwd>
        <kwd>Description Logics</kwd>
        <kwd>Modal Logics</kwd>
        <kwd>Aspect-Oriented Ontology Development</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Context-sensitive knowledge is ubiquitous. Knowledge may, for example, change
over time and from location to location, or it may be dependent on an observer’s
background knowledge, belief, or opinion. Knowledge representation formalisms
accommodating context can be roughly divided into (i) those that provide means
for contextualizing knowledge implicitly (by providing similar concepts, such as
entities with a temporal extension or roles) and (ii) those that treat concept as
first-class citizens and directly include the concept of context in their language.
Focusing on the second kind of approach, we observe that specifying context
leads to recurring modeling problems. For example, the modeling of temporal
context involves the specification of one or several time intervals and attaching
them to the axioms or facts that are supposed to be valid during that time. The
formalism for specifying the temporal context may, however, vary.</p>
      <p>As a solution, we present a catalog of parametrizable ontology design patterns
(ODPs) specific to the problem of modeling context. We base the patterns on the
aspect-oriented extension of OWL 2, because it allows nesting of contexts and
the usage of the entirety of OWL 2 (DL) as the context description language. We
can show that the use of a context specification formalism leads to an adequate
representation of the domain at hand and that the proposed context ODPs
facilitate the modeling of the context knowledge.</p>
      <p>The remainder of the paper is structured as follows: In Section 2 we give an
introductional overview of the problem of context representation and different
kinds of solutions. We then introduce Aspect OWL, an extension to OWL 2 for
representing context in OWL and briefly elaborate on the principles it is built
upon. In Section 3 we discuss a set of recurring representation problems involving
different kinds of context-sensitive knowledge and present an Ontology Design
Pattern for each of them. We provide an implementation of each ODP using
the ODP template language OTTR. We draw the different context modeling
problems from a real-world project but abstract from them such that the ODPs
may be reused in different application scenarios and domains. Finally, in Section
4 we briefly discuss the results.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <sec id="sec-2-1">
        <title>Context and OWL</title>
        <p>There exist a number of approaches to the problem of representing context in
OWL (or Description Logics, with which OWL 2, being a syntactical variant of
the DL SROIQ(D), shares its semantics).</p>
        <p>
          One kind of approach uses standard OWL constructs for modeling context
information. An example of this kind of approach is the Context Slices pattern4,
where a context is represented by an OWL individual, which is connected to a
4 http://ontologydesignpatterns.org/wiki/Submissions:Context_Slices
pair of individuals that take part in a context-dependent object property
assertion [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. This context individual may then be referenced by other individuals
representing, for example, an agent playing a role in that context (e.g. a person
believing that the relation represented by the object property assertion holds).
        </p>
        <p>
          Upper ontologies that have an OWL axiomatization use similar patterns
for representing context. For example, the General Formal Ontology (GFO) [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
defines the abstract category of a role an agent may play in a certain context.
Roles may be processual roles, representing memberships in a process that may
take part in a temporal context (a time interval), social roles, or relational roles
that contextualize participants in a relation and with respect to relators, which
represent instances of a relation.
        </p>
        <p>Approaches of this type have in common that the subject of the
contextualization are (binary or n-ary) relations between instances of the discourse domain
(object property assertions in OWL terms). There exist more general approaches
in terms of expressivity, which extend the contextualization facility to ABox and
even TBox axioms and are thereby capable of formalizing context not only on
the individual but also on the concept level.</p>
        <p>The most basic approach of this kind, which is already built into the OWL
language, are axiom annotations, which allow ABox and TBox axioms to be
annotated with either an anonymous individual, an IRI (which might refer to
another OWL entity) or a literal, which, in turn, might carry contextual
information. OWL Annotations, however, do not have any formal semantics, which
leaves the relation between the contextual information and its subject undefined
and makes the development of formal reasoning procedures impossible.</p>
        <p>
          Formal approaches for contexualizing OWL axioms naturally require an
extension of the OWL language and an extended semantics since it is not possible
to represent arbitrary statements about concepts (classes) in OWL. They usually
deploy multidimensional Description Logics, either a Description Logic combined
with a domain specific logic, such as temporal logics, or combinations of
standard Description Logics, such as ALC and SROIQ. A significant work in this
field is the PhD thesis by Klarman [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] who investigates different combinations
of DLs for representing context and delivers important complexity results.
        </p>
        <p>In the following we introduce a formalism for representing context in OWL
that builds on the results of Klarman but alleviates some of the shortcomings
of multi-dimensional DLs, for example conserving decidability by restricting the
interaction between the different logics. The approach is inspired by the
AspectOriented Programming paradigm and is hence named Aspect-Oriented Ontology
Development.</p>
        <p>The ODPs we present later in Section 3 are based on this approach, but (with
one exception) are general enough to be used in different context formalisms
without change.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Aspect-Oriented Ontologies</title>
        <p>
          Aspect-Oriented Ontology Development (AOOD) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] is an extension to the OWL 2
language, which allows context (here called aspects) to be added to (TBox and
        </p>
        <p>
          ABox) axioms in an OWL ontology. It is inspired from the Aspect-Oriented
Programming (AOP) paradigm [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. AOOD uses Modal Logics as a context language
and makes use of the fact that Modal Logics are syntactic variants of
Description Logics, i.e., (almost) every Modal Logic can be translated to a particular
Description Logic and thereby to OWL.
        </p>
        <p>In the remainder of this subsection we will give a brief overview of
AspectOriented Programming and Modal Logics and then introduce Aspect-Oriented
Ontology Development, which is built on top of these two notions.
Aspect-Oriented Programming AOP is an extension to Object Oriented
Programming (OOP). Its primary purpose is to increase modularity in software
code by separating so called cross-cutting concerns, such as authentication and
logging, from the actual business logic of the application. Cross-cutting concerns
lead to scattered and tangled code and cannot be modularized by the
decomposition mechanisms of object-oriented or procedural languages. AOP introduces
aspects as a solution to this problem.</p>
        <p>An aspect (in the following referred to as software aspect in order to
distinguish it from an ontology aspect, which we will describe in the next subsection)
is an isolated code module representing exactly one concern. In order to connect
these isolated modules AOP provides a join point model. A join point is a place
in the code, described, for example, by the signature of a procedure and
additional qualifiers, such as “before”, “after”, “before return”, or “after exception”.
The join point model also allows the abstract specification of sets of join points,
which are called pointcuts.</p>
        <p>A pointcut specification is a quantified query over the set of potential join
points. A pointcut language may allow to select sets of join points on the lexical
level (e.g. using regular expressions over method names) or by their signature
(by matching parameter types), or both. A pointcut may, for example, consist
of all getter methods (all methods whose names start with “get”) of all classes
in a certain package that take a string and an integer as arguments.</p>
        <p>
          An advice is the code belonging to a concern that should be executed at
each join point of another concern. Each software aspect consists of a pointcut
and an advice. The advice code is said to be advising the target code, selected
by the pointcut. Due to the fact that the advice code is invisible to its target
and that the target is selected by quantification, quantification and obliviousness
were identified as the two main principles of AOP [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>Since software aspects are classes (in OOP terms) with executable methods,
they carry potential join points themselves. Therefore, software aspects may be
arbitrarily nested.</p>
        <p>Modal Logics Modal logics are propositional logics extended with two
additional operators □ and ♦. Depending on the type of modal logic, the operators
are named differently.</p>
        <p>For example, in basic modal logic, □ is simply named box, and ♦ is named
diamond. In logics that study necessity and possibility, □ is named necessarily,
and ♦ is named possibly. In epistemic logics, □ stands for “it is known that”,
and ♦ stands for “it is believed that”. In temporal logics, □ may stand for “it has
always been the case that” or “it will always be the case that”, and ♦ may stand
for “it was the case that” or “it will be the case that”, although it is common
practice to use different symbols for the different types of logics.</p>
        <p>
          Modal Logics are a syntactic variant of Description Logics [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. This makes
them easily combinable with DL based languages, since the languages’ primitives
may be mapped to either logic’s features. Yet, the semantics of Modal Logics
provide a more intuitive access to the notion of ontology aspects.
Definition 1. A Kripke frame is a tuple F = (W, Ri), where W is a set of
possible worlds, and Ri ⊆ W × W an accessibility relation between worlds.
        </p>
        <p>Furthermore, a Kripke model is a tuple (W, Ri, L), with W again a set of
possible worlds, Ri an accessibility relation, and L : W → P(P rop) a labeling
function, where P is a valuation function P rop → {T, F } that maps
propositional symbols to truth values. Moreover, let □i and ♦i be modal operators.</p>
        <p>Then, the truth value of the propositional formula φ at a possible world w :
M, w |= φ is defined in the following way:
– M, w |= T and M, w ∕|= ⊥
– M, w |= p iff p ∈ L(x)
– M, w |= ¬φ iff M, w ∕|= φ
– M, w |= φ1 ∨ φ2 iff M, w |= φ1 or M, w |= φ2
– M, w |= φ1 ∧ φ2 iff M, w |= φ1 and M, w |= φ2
– M, w |= □iφ iff ∀w‘ ∈ W : wRiw‘ → M, w‘ |= φ
– M, w |= ♦iφ iff ∃w‘ ∈ W : wRiw‘ → M, w‘ |= φ</p>
        <p>Analogously to Description Logics, there exist different types of Modal
Logics. The type is determined by adding certain axioms, and it is possible to alter
the behavior of the logic and obtain a particular type of modal logic. According
to the correspondence theorem, each axiom corresponds to a particular condition
which is imposed on the frame. This in turn corresponds to (a combination of)
characteristic of the accessibility relation of the frame. For example, temporal
modal logics have accessibility relations that represent the notions of before and
after (with the related possible worlds representing instances in time). These
relations are transitive. Depending of the conceptualization of time they might
also be dense and reflexive.</p>
        <p>In summary, it is possible to determine a certain type of Modal Logic by
defining an accessibility relation and fixing its characteristics. Table 1 shows the
correspondences between logic types, modal, conditions on frames,
characteristics of the accessibility relation, and the corresponding DL axiom(s).</p>
      </sec>
      <sec id="sec-2-3">
        <title>Aspect-Oriented Ontology Development and Aspect OWL Aspect-Oriented</title>
        <p>
          Ontology Development [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] is a formalism for contextualizing OWL axioms. It
comprises a development methodology (that allows for context-sensitive,
modular ontology development) and a representation formalism, which consists of an
extended version of the OWL 2 language and is called Aspect OWL.
        </p>
        <sec id="sec-2-3-1">
          <title>Name Modal Axiom Condition on Frames R is... DL Axiom</title>
          <p>(D) □A → ♦A ∀w∃u : wRu Serial ⊤ ⊑ ∃R.⊤
(M ) □A → A ∀w : wRw Reflexive ⊤ ⊑ ∃R.Self
(4) □A → □□A (wRv ∧ vRu) ⇒ wRu Transitive Trans(R)
(B) A → □♦A wRv ⇒ vRw Symmetric Sym(R)
(5) ♦A → □♦A (wRv ∧ wRu) ⇒ vRu Euclidean R−1 ◦ R ⊑ R a
(CD) ♦A → □A (wRv ∧ wRu) ⇒ v = u Functional ⊤ ⊑ (1R.⊤)
(□M ) □(□A → A) wRv ⇒ vRv Shift Reflexive ∃R−1.⊤ ⊑ ∃R.Self
(C4) □□A → □A wRv ⇒ ∃u(wRu ∧ uRv) Dense R◦R ⊑ R∧⊤ ⊑ ∄R.Self a
(C) ♦□A → □♦A wRv∧wRx ⇒ ∃u(vRu∧ Convergent — b</p>
          <p>xRu)
a falls under OWL 2 restriction
b Not possible in pure DL. See Section 3 for a workaround involving SWRL.</p>
          <p>Table 1. Modal Logic axioms and corresponding conditions on frames and OWL
axioms</p>
          <p>The principle idea behind AOOD is to use ontology pointcuts (as described
in subsection 2.2), which define ontology modules (sets of OWL axioms) and
aspects in order to attach additional context knowledge (advice) to each of these
modules. In Aspect OWL, an advice is an OWL class expression. The semantics
of an OWL axiom advised by such a class expression is defined as follows: Each
instance of the advice class expression is interpreted as a possible world. The
advised axiom is valid for each possible world that is an instance of the advice
class expression.</p>
          <p>Furthermore, the advised axiom is possibly valid (in terms of modal
possibility) if there exists an accessibility relation R that connects at least one individual
to an instance of the advice class expression. The advised axiom is necessarily
valid (again, in terms of modal neccessity) for all individuals that can access
instances of the advice class via R.</p>
          <p>As an example, consider the OWL class assertion</p>
          <p>German Chancellor(Angela Merkel)</p>
          <p>This assertion reflects a part of reality valid at the time of writing this paper,
but it obviously is only valid in a certain temporal context (Angela Merkel has
not always been the German chancellor, and she will cease to be chancellor at
some, yet unknown, point in time).</p>
          <p>In order to represent the statement in its temporal context, we define an
OWL class Merkels Chancellorship and an individual MC beginning representing
the point in time of the beginning of Merkel’s chancellorship. Furthermore, we
need to define an accessibility relation after and declare it transitive. Then we
can define Merkels Chancellorship as:</p>
          <p>Merkels Chancellorship ≡ ∃after.{MC beginning}</p>
          <p>This represents the temporal context as a half-open interval that begins at
time point MC beginning (excluding the time point itself) and including every
time point that comes after it.</p>
          <p>An obvious advantage of this approach is that it is possible to reuse existing
vocabulary for representing the context. For instance, the W3C time ontology5
is fully compatible with the above example and can be used for defining the
involved entities in the following manner:</p>
          <p>Merkels Chancellorship ≡ ∃time : after.{MC beginning},
time : Instant(MC beginning),
time : inXSDDateTime(MC beginning, ”2005 − 11 − 22T00 : 00 : 00”ˆˆxsd : dateTime)</p>
          <p>What still needs to be done is to connect the advice class representing the
context to its pointcut (in this case the single class assertion axiom).</p>
          <p>For this purpose, Aspect OWL introduces a new axiom type called aspect
assertion axiom. An aspect assertion is a binary relation between an OWL axiom
and an advice class expression (the context of the axiom). Syntactically, aspect
assertion axioms resemble annotation assertion axioms. They differ from the
latter in that they have a defined model theoretic semantics, which makes use
of combined interpretations, which we call a SROIQKripke interpretation.
Definition 2. A SROIQKripke interpretation is a tuple J := (W, R, L, ·J , ∆, (·Iw )w∈W )
with W being a nonempty set, called possible worlds, and L a Kripke
interpretation, assigning truth values to propositional symbols in each world w ∈ W as
described in the subsection about Modal Logics.</p>
          <p>For every A ⊆ W , IA is a DL interpretation.</p>
          <p>The semantics of an aspect of an axiom is then defined as follows:
Definition 3. Let J := (W, R, L, ·J , ∆, (·Iw )w∈W ) be a possible-world DL
interpretation. We interpret an aspect under which an axiom α holds as follows:
(hasAspect(α, A))J → AJ ⊆ CJ := {w ∈ W | Iw |= α}. Because of the
correspondence as described in the subsection about Modal Logics we can set W =
CJ , such that on the semantic level each individual corresponds to a possible
world. Furthermore, we set L such that L(α)J := AJ .</p>
          <p>The resulting contextualized axiom is depicted in Figure 1.</p>
          <p>A further advantage of this approach is that it keeps OWL’s monotonicity
intact. If in the future after the end of Angela Merkel’s chancellorship someone
closes the interval by adding a corresponding individual MC end and the
axiom Merkels Chancellorship ≡ ∃time : before.{MC end}, no information is erased.
While the fact alone that Angela Merkel is chancellor becomes invalid the
contextualized fact that Angela Merkel is chancellor during a specified time interval
will remain valid independently of the current point in time.
5 http://www.w3.org/TR/owl-time/</p>
          <p>German_Chancel or</p>
          <p>We explicitly restrict the interaction between the logics in such a way that
only aspects can “see” their advice. That means that each aspect results in
a local interpretation of an axiom. Even if a contextualized axiom has entity
names from its advice in its signature, these entities are interpreted differently
from the ones on the advice level. This corresponds to the obliviousness principle
of Aspect-Oriented Programming.</p>
          <p>Aspect OWL has more expressive features. For example, it is possible to
define pointcuts using queries over axioms, by either providing a signature (a set
of entity names), a DL query or, for selecting axioms on the RDF graph level,
a SPARQL construct query. Due to space constraints it is not possible to cover
these facilities in detail.</p>
          <p>
            For a more thorough description of the features and semantics of Aspect
OWL 2, we refer the reader to [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ] and [
            <xref ref-type="bibr" rid="ref8">8</xref>
            ]6.
3
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>ODPs for Different Kinds of Context</title>
      <p>In this section, we present a set of Ontology Design Patterns for representing
different kinds of context as defined above. The selection of kinds of context is
driven by the requirements identified in the research project COMPASS
(Comprehensive Surgical Landscape Guidance System for Immersive Assistance in
Minimally-invasive and Microscopic Interventions)7.</p>
      <p>
        The aim of the project is to build a markerless system that helps surgeons
navigate through a situs during endoscopic surgical interventions by providing
useful, context-sensitive real-time information but avoiding information overload
that might overwhelm the surgeon. For this purpose, the system requires an
internal model of the spatial structure of the situs (e.g. the arrangement of
anatomical features), which needs to be mapped to a model of navigational
situations of the surgeon and her endoscope. To this end, several ontologies
are being developed. Among them are an ontology of geometrical arrangements
6 For an overview over the complete abstract/functional style syntax of Aspect OWL 2,
see http://www.aspectowl.xyz/syntax/.
7 https://www.iccas.de/projekte/compass-2/?lang=en
of anatomical structures and an ontology of basic geometric shapes, which are
aligned to the OWL version of the GFO ontology. Furthermore, ontologies from
a predecessor project are reused, such as the ontology of endoscopic situations
and risk structures in FESS interventions [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It turns out that a significant
amount of concepts captured in our model are context-dependent and may be
represented using Aspect OWL.
      </p>
      <p>We use the correspondence of modal axioms and the respective conditions
on modal frames in order to represent the modal axioms in OWL. We do this by
translating the frame conditions to Description Logic axioms. The column DL
Axiom in Table 1 shows the corresponding DL axioms.</p>
      <p>Note that convergent frames cannot be modeled using pure DL. It is however
possible to represent convergence using SWRL and the SWRLX extensions
builtin makeOWLThing8. This would reduce the entire matter to a single SWRL rule:
R(?s, ?d1), R(?s, ?d2), DifferentFrom (?d1, ?d2), swrlx:makeOWLThing(?c, ?s)
→ R(?d1, ?c), R(?d2, ?c)</p>
      <p>
        The swrlx:makeOWLThing extension, in turn, is not supported by all OWL
reasoners or rule engines. A facility supporting this extension is the SWRL
API8 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], which comes with a Drools-based forward chaining OWL 2 RL reasoner
and SWRL engine.
      </p>
      <p>
        The formalism we selected for the representation of the ODPs is OTTR [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
OTTR is a framework for designing parametrizable ontology templates. The
selection is based on the nature of Modal Logics and the fact that instances
of the same Modal Logic family are structurally very similar and differ only
in accessibility relation names and characteristics as well as the number and
names of possible worlds. This makes our contexts, which highly depend on
these structures, a perfect candidate for a template language.
      </p>
      <p>Furthermore, although our modeling problems are derived from our real world
project and cater concrete scenarios tackled in this project, they are sufficiently
general to be relevant in other contexts.
3.1</p>
      <sec id="sec-3-1">
        <title>Named Contexts: Endoscopic Perspective</title>
        <p>The simplest and most general kind of context the AOOD framework can
represent is that of named contexts. This kind of context may be used to represent
views on a domain, or any other categorization of axioms.</p>
        <p>The underlying Modal Logic is the simple system K. It has an irreflexive
frame (which corresponds to the lack of the axiom □A → A). In this simple
model, we ignore the existence of any accessibility relation (which is the reason
why the lack of the axiom is not harmful).</p>
        <p>An advice class is simply defined by a singleton nominal A ≡ {I}. The
intended meaning is that the individual I represents the simple context.</p>
        <p>https://github.com/protegeproject/swrlapi/wiki/ExtensionsBuiltInLibrary</p>
        <p>Listing 1.1. OTTR template for a simple named aspect. The template takes as input
arguments a class IRI for the advice class and an individual IRI and constructs the
singleton nominal class equivalence for the advice class.
: NamedAspect [ ! owl : Class ? NamedAspectClass , ! owl : Individual ?</p>
        <p>NamedAspectIndividual ] :: {
o - rdf : Type (? NamedAspectClass , owl : Class ) ,
o - rdf : Type (? NamedAspectIndividual , owl : Individual ) ,
o -owl - ax : EquivObjectOneOf (? NamedAspectClass , (? NamedAspectIndividual ))
} .</p>
        <p>Figure 2 shows an example of two named aspects, and Listing 1.1 shows the
ODP written in stottr9.</p>
        <p>nav:Nasal_entry_Position
rdf:type (inferred)
We have already introduced temporal context in Section 2.2 and provided an
example. With time being one of the most fundamental concepts pervading every
aspect of existence, temporal contexts play a role in the COMPASS system as
well. For example, the structure of the situs may change over time (parts may
be resected during the surgical intervention) and may hence be present before a
certain point in time and absent after that point in time.</p>
        <p>It is interesting to note that temporal context may be described as a closed
or a half open interval (left or right, depending on whether the beginning or the
end are fixed). If the interval is half open, it only necessary to define one of the
two accessibility relations that correspond to the notions of before and after. As
a consequence of one being the inverse of the other, it is in fact not necessary to
define both at all, since one can always refer to e.g. the property time : right one
9 Due to space constraints we are not able to provide an introduction to the STOTTR
syntax. We ask the reader to refer to https://dev.spec.ottr.xyz/stOTTR/.
Listing 1.2. OTTR template for a temporal aspect. The arguments it accepts are a
class IRI for the advice class, two object properties for the relations before and after
(one of which is optional) and individual names for the left and right boundaries (start
and end points), respectively (one of which is optional as well).
: TemporalAspect [ ! owl : Class ? TemporalAspectClass , ! owl : ObjectProperty ?
BeforeRelation , ! owl : ObjectProperty ? AfterRelation , ? owl : Individual ?
LeftBoundary , ? owl : Individual ? RightBoundary ] :: {
o - rdf : Type (? TemporalAspectClass , owl : Class ) ,
o -owl - ax : SubClassOf (? TemporalAspectClass , aspect - owl : TemporalAspect ) ,
o - rdf : Type (? BeforeRelation , owl : ObjectProperty ) ,
o - rdf : Type (? BeforeRelation , owl : TransitiveProperty ) ,
o - rdf : Type (? AfterRelation , owl : ObjectProperty ) ,
o - rdf : Type (? AfterRelation , owl : TransitiveProperty ) ,
util : EqiuvUnionHasValueOneOf (? TemporalAspectClass , ? AfterRelation , ?</p>
        <p>LeftBoundary ) ,
util : EqiuvUnionHasValueOneOf (? TemporalAspectClass , ? BeforeRelation , ?</p>
        <p>RightBoundary )
} .
as time : lef t−1. It is therefore merely for convenience that we included both
relations in the pattern. One of the two may, however, be omitted if the interval
that the template instance is supposed to represent is half open.</p>
        <p>Listing 1.2 shows the ODP written in stottr. Note that in the template, we
include the start and end points in the interval, whereas in the example above
they were not included for the sake of simplicity. This makes the axioms and
the corresponding pattern somewhat more complicated since the advice class is
now equivalent to the union of the value restriction and the singleton nominal
containing the start (or end) point itself. Also note that the template makes
call to an auxiliary template EqiuvUnionHasValueOneOf, which we defined for
the purpose of instantiating the union and the restrictions/class expressions it
comprises.</p>
        <p>Note that, depending on the application, it might be necessary to represent
time with different properties, for example, dense (between each arbitrary pair of
time points fit infinitely many time points). OTTR in its current state, however,
does not provide means for parametrization on that level. As a workaround, we
provide a template for each possible combination notions of time.
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>Epistemic Context: Knowledge about Knowledge</title>
        <p>As mentioned in the introduction to this section, one requirement for the
COMPASS system is to avoid information overload. In order to capture the
information need (and, in turn, knowledge about what information is not needed), we
developed a model of knowledge about the knowledge of a group of agents, one
agent being the surgeon and the other agents being system components with the
capability of providing certain types of information.</p>
        <p>We use Epistemic Logic, which is also a type of Modal Logic in order to
model this situation. Epistemic Logic may be used to model epistemic states of
a group of agents from an outside point of view.</p>
        <p>Suppose a navigation component is able to provide the information that the
next landmark that will be reached by the endoscope is the uncinate process of</p>
        <sec id="sec-3-2-1">
          <title>Listing 1.3. OTTR template for an epistemic aspect</title>
          <p>: EpistemicAspect [ ! owl : Class ? AgentsGlobalEpistemicAspectClass , ! owl :
ObjectProperty ? AgentsEpistemicCompatibilityRelation , ! owl : Individual ?
AgentsLocalEpistemicWorld ] :: {
o - rdf : Type (? AgentsGlobalEpistemicAspectClass , owl : Class ) ,
o -owl - ax : SubClassOf (? AgentsGlobalEpistemicAspectClass , aspect - owl :</p>
          <p>EpistemicAspect ) ,
o - rdf : Type (? AgentsEpistemicCompatibilityRelation , owl : ObjectProperty ) ,
o - rdf : Type (? AgentsEpistemicCompatibilityRelation , owl : ReflexiveProperty ) ,
o - rdf : Type (? AgentsEpistemicCompatibilityRelation , owl : TransitiveProperty ) ,
o - rdf : Type (? AgentsEpistemicCompatibilityRelation , owl : SymmetricProperty ) ,
o - rdf : Type (? AgentsLocalEpistemicWorld , owl : Individual ) ,
o -owl - ax : EquivHasValue (? AgentsGlobalEpistemicAspectClass , ?</p>
          <p>AgentsEpistemicCompatibilityRelation , ? AgentsLocalEpistemicWorld )
} .
ethmoid bone, but due to previous information provided we can assume that the
surgeon is aware of that particular fact. Then the system and the surgeon are in
compatible epistemic states and the information may be unnecessary.</p>
          <p>In Epistemic Logic, possible worlds represent those epistemic states. The
accessibility relations (there exists one such relation per agent) express
compatibility between epistemic states (by stating that, from the particular agent’s
point of view, two worlds connected by them are epistemically indistinguishable
for that agent). One possible world individual represents the actual epistemic
“world” of each agent.</p>
          <p>The indistinguishable from relations are transitive (intuitively, if A is
indistinguishable from B, and B is indistinguishable from C, then A is
indistinguishable from C), reflexive (every epistemic state is indistinguishable from itself)
and symmetric (if A is indistinguishable from B for an agent, then so is B from
A). Listing 1.3 shows the epistemic context ODP for one agent written in stottr.
In order to represent multiple agents, it is necessary to instantiate the template
multiple times, one time for each agent. The possible epistemic states and their
connections must be added manually.
3.4</p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Dynamic Context: Change of Anatomical Situations</title>
        <p>Dynamic context is related to temporal context in that it represents changes of
the state of affairs. However, instead of change over defined time points, dynamic
context captures change as a consequence of actions.</p>
        <p>Dynamic context is represented using Dynamic Logic, which is a multimodal
logic. Multimodal logics have multiple (indexed) accessibility relations. In
Dynamic Logics, each accessibility relation represents an action that might or might
nor result in changes of the state of the world. A possible world represents the
world in a certain combination of states.</p>
        <p>Figure 4 depicts a dynamic context with two actions (a navigation action that
leaves the world unchanged and an action “Resection of orbital plate of ehmoid
ABA</p>
        <p>AAA
BAA
AAB
hasAspect
Surgeons_World</p>
        <p>Risk_sys_World</p>
        <p>Nav_sys_World
rdf_type
Surgeon_knows
≡ indistinguishable_for_Surgeon
value Surgeons_World
hasAspect</p>
        <p>rdf_type
Risk_system_knows
≡ indistinguishable_for_Risk_sys
value Risk_sys_World</p>
        <p>rdf_type
Nav_system_knows
≡ indistinguishable_for_Nav_sys
value Nav_system_World
fma:Uncinate_process_of_ethmoid</p>
        <p>fma:Maxilary_sinus_ostium</p>
        <p>hasAspect
categorial_spatial_folower_of</p>
        <p>A
fma:Uncinate_process_of_ethmoid</p>
        <p>A
fma:Maxilary_sinus_ostium</p>
        <p>categorial_spatial_folower_of
Fig. 3. Epistemic contexts of three agents (a surgeon and two systems). The names
of the epistemic state individuals at the top encode possible knowledge of an agent
about one of the assertions at the bottom (note that the leftmost and the rightmost
assertions are the same. They are named “A”. The assertion in the middle is named
“B”). The colors and line patterns represent agents (red/dashed: surgeon, green/dotted:
risk system, blue/dash dotted: navigation system). A red B represents the possible
assumption that the surgeon knows fact B. There exists a blue/dash dotted path from
the nav system’s world to a state in which the surgeon knows fact A. However, there
is no green/dotted path leading from the risk system’s world to a state where the
surgeon knows fact B. Therefore, fact B (risk structure ahead) might be unknown to
the surgeon, and it might be useful to provide her with that information.
bone”, which has as a consequence that the orbital plate of ehmoid is not the
spatial follower of the sphenoial sinus while navigating the endoscope1011.
3.5</p>
      </sec>
      <sec id="sec-3-4">
        <title>Topological Context: Overlapping of Anatomical Structures</title>
        <p>
          The Modal Logic S4 may be interpreted in terms of topological relations between
points and their location inside, on the boundary, or outside of a geometric
structure, where □P means that point P is inside the structure (excluding its
boundary), whereas ♦P describes the boundary (closure) [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]12.
10 Due to space constraints we are not able to list this ODP. All ODPs are, however,
available at http://ontologydesignpatterns.org/wiki/Category:LogicalOP and
http://odp.aspectowl.xyz
11 The ODP for dynamic aspects is available at http://odp.aspectowl.xyz/aspect/
0.1/DynamicAspect
12 available at http://odp.aspectowl.xyz/aspect/0.1/TopologicalAspect
        </p>
        <p>inverse cp:ope_resection
cp:navigate_to_ope</p>
        <p>cp:ope_resection
Initial_state</p>
        <p>State_OPE_present</p>
        <p>State_OPE_removed
cp:navigate_to_ope
The analysis of the application domain of automatic assistance for endoscopic
surgeons revealed that there exist a number of knowledge representation
problems where context of different kinds plays a crucial role. Aspect-Oriented
Ontology Development which uses different kinds of (multi-)modal logics proves to
be an adequate solution to this problem. The recurring nature of context (there
is, for example, not just one temporal context, but many facts have their own
temporal context) makes it a good candidate for an ODP.</p>
        <p>
          We could show that different kinds of context may be represented by an
ODP that instantiates a particular context in the form of an aspect. However,
there are some caveats. On the representation side, directly interpreting Modal
Logics in terms of DL axioms may lead to an inadvertent combination of object
property characteristics that violate OWL 2 restrictions and lead to reasoners
aborting the reasoning process with an error message. See [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] for an in-depth
discussion of the problem (and possible work-arounds).
        </p>
        <p>One shortcoming that we encountered is a lack of expressivity in the ODP
template languages. To our knowledge, OTTR is the most advanced species of
these formalisms at the time of writing this paper. However, even OTTR has
limited support for parametrization of patterns. For example, it is not possible to
branch pattern construction depending on the presence of an optional argument.
Another issue we had with OTTR is the construction of singleton lists from
optional IRI parameters. If a template constructs a list from an argument, and
the argument is empty, OTTR will still create a non-empty list, containing the
resource ottr : none, which is, at least for our purposes, not the desired behavior.</p>
        <p>Finally, not everyone might agree to the way we formalize context, and there
are different formalisms for context representation. We think, however, that our
formalism has the advantage of being general and applicable in many domains
and to many kinds of context. Except for the case of Dynamic Context, the
patterns presented in this paper may be decoupled from the aspect-oriented
ontology approach in which we used them, and combined with a different approach,
as long as the alternative approach provides some mechanism for attaching the
context entities to the domain knowledge.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. van Benthem,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Bezhanishvili</surname>
          </string-name>
          , G.:
          <article-title>Modal Logics of Space</article-title>
          . In: Aiello,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>PrattHartmann</surname>
          </string-name>
          , I., Van Benthem,
          <string-name>
            <surname>J</surname>
          </string-name>
          . (eds.) Handbook of Spatial Logics, pp.
          <fpage>217</fpage>
          -
          <lpage>298</lpage>
          . Springer Netherlands, Dordrecht (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Filman</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Aspect-Oriented Programming Is Quantification and Obliviousness</article-title>
          . Workshop on Advanced Separation of Concerns, OOPSLA (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Herre</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heller</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Burek</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hoehndorf</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loebe</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Michalek</surname>
          </string-name>
          , H.:
          <article-title>General Formal Ontology (GFO): A Foundational Ontology Integrating Objects and Processes. Part I: Basic Principles</article-title>
          .
          <source>Tech. rep.</source>
          , Research Group Ontologies in
          <source>Medicine (Onto-Med)</source>
          , University of Leipzig (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kiczales</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamping</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendhekar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maeda</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lopes</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loingtier</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Irwin</surname>
          </string-name>
          , J.:
          <article-title>Aspect-Oriented Programming</article-title>
          . In: Aksit,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Matsuoka</surname>
          </string-name>
          , S. (eds.) ECOOP'
          <fpage>97</fpage>
          -
          <string-name>
            <surname>Object-Oriented</surname>
            <given-names>Programming</given-names>
          </string-name>
          ,
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>1241</volume>
          , pp.
          <fpage>220</fpage>
          -
          <lpage>242</lpage>
          . Springer Berlin / Heidelberg (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Klarman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Reasoning with Contexts in Description Logics</article-title>
          .
          <source>Ph.D. thesis</source>
          , Vrije Universiteit Amsterdam (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>O</given-names>
            <surname>'Connor</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Shankar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Musen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Nyulas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            :
            <surname>The</surname>
          </string-name>
          <string-name>
            <surname>SWRLAPI</surname>
          </string-name>
          :
          <article-title>A Development Environment for Working with SWRL Rules</article-title>
          . (01
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Sch¨afermeier, R.,
          <string-name>
            <surname>Paschke</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Aspect-Oriented</surname>
            <given-names>Ontologies</given-names>
          </string-name>
          :
          <article-title>Dynamic Modularization Using Ontological Metamodeling</article-title>
          . In: Garbacz,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Kutz</surname>
          </string-name>
          ,
          <string-name>
            <surname>O</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 8th International Conference on Formal Ontology in Information Systems (FOIS</source>
          <year>2014</year>
          ).
          <source>Frontiers in Artificial Intelligence and Applications</source>
          , vol.
          <volume>267</volume>
          , pp.
          <fpage>199</fpage>
          -
          <lpage>212</lpage>
          . IOS Press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. Sch¨afermeier, R.,
          <string-name>
            <surname>Paschke</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Aspect-Oriented Ontology</surname>
          </string-name>
          Development, pp.
          <fpage>3</fpage>
          -
          <lpage>30</lpage>
          . Springer International Publishing,
          <string-name>
            <surname>Cham</surname>
          </string-name>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Schild</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>A Correspondence Theory for Terminological Logics: Preliminary Report</article-title>
          . In: Mylopoulos,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Reiter</surname>
          </string-name>
          ,
          <string-name>
            <surname>R</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 12th International Joint Conference on Artificial Intelligence. Sydney, Australia, August 24-30</source>
          ,
          <year>1991</year>
          . pp.
          <fpage>466</fpage>
          -
          <lpage>471</lpage>
          . Morgan Kaufmann (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rudolph</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sutcliffe</surname>
          </string-name>
          , G.:
          <article-title>Modeling in OWL 2 without Restrictions</article-title>
          .
          <source>In: OWLED. CEUR Workshop Proceedings</source>
          , vol.
          <volume>1080</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Siemoleit</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uciteli</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bieck</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herre</surname>
          </string-name>
          , H.:
          <article-title>Processual Reasoning over Sequences of Situations in Endoscopic Surgery</article-title>
          .
          <source>In: German Medical Data Sciences: Visions and Bridges, Studies in Health Technology and Informatics</source>
          , vol.
          <volume>243</volume>
          , pp.
          <fpage>222</fpage>
          -
          <lpage>226</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Skjaeveland</surname>
            ,
            <given-names>M.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Forssell</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , Klu¨wer,
          <string-name>
            <given-names>J.W.</given-names>
            ,
            <surname>Lupp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.P.</given-names>
            ,
            <surname>Thorstensen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Waaler</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Pattern-Based Ontology Design and Instantiation with Reasonable Ontology Templates</article-title>
          . In: WOP@ISWC (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Welty</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fikes</surname>
          </string-name>
          , R.:
          <article-title>A Reusable Ontology for Fluents in OWL</article-title>
          .
          <source>In: Proceedings of the 2006 Conference on Formal Ontology in Information Systems: Proceedings of the Fourth International Conference (FOIS</source>
          <year>2006</year>
          ). pp.
          <fpage>226</fpage>
          -
          <lpage>236</lpage>
          . IOS Press, Amsterdam, The Netherlands, The
          <string-name>
            <surname>Netherlands</surname>
          </string-name>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>