<!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>Towards Context Modeling in Space and Time</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Christian Piechnick</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georg Puschel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Gotz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thomas Kuhn</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ronny Kaiser</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Uwe A mann</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Software Technology Group, Technische Universitat Dresden</institution>
          ,
          <addr-line>Nothnitzer Str. 46, 01187 Dresden</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>One of the main problems in software development for service robots is to create systems that reliably behave as intended, even though the real eld of application and the concrete user requirements are unknown during design time. Consequently, the software controlling service robots has to be aware of its environment and has to adapt its behavior accordingly. A model representing environmental data is called a context model. Appropriate context models currently lack means for modeling temporal and spatial information simultaneously. While it is important to reason about historical context data for most of the SelfAdaptive Systems, there is an increasing need for treating the temporal dimension of context models as rst-class-citizen. In this paper, we propose a graph- and role-based context model (GRoCoMo), which includes expressive means for describing time and location. A query language enables for reasoning on current and historical data, as well as future trends. A manipulation language enables the speci cation of rewrite rules for updating context models based on situations detected within the context.</p>
      </abstract>
      <kwd-group>
        <kwd>Context Modeling</kwd>
        <kwd>Context Management</kwd>
        <kwd>Context-Awareness</kwd>
        <kwd>Temporal Context</kwd>
        <kwd>Context History</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        A service robot is a reprogrammable, sensor-based, mechatronic device which
performs useful services to support human activities [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In contrast to
production robots, where the operating environment as well as all other in uencing
factors are known before deployment, the application sites of service robots are
unknown. This information can only be gathered during runtime. Therefore, the
software system controlling the service robot has to adapt its behavior
dynamically. Such a system is called a Self-Adaptive System (SAS). One example of
adaptive behavior within robotic software is the path planning of mobile robot
platforms [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. When a robot has to move to a target position, the robot's motion
model (e.g., di erential steering), as well as the environment (e.g., crowded
areas), in uence the planning strategy. Figure 1 shows an example path planning
problem with two di erent strategies. The rst strategy, Shortest Path (solid
S
Route 1
      </p>
      <p>T
Route 2
Shortest Path
Near Wall</p>
      <p>Crowded Area</p>
      <p>S Start</p>
      <p>
        T Target
lines), calculates the shortest route from the starting location (S) to the target
location (T) and provides two di erent alternatives. The other strategy, Near
Wall (dashed lines), calculates routes that lead along walls. The grey dashed
area is usually used by many persons and therefore, marked as \crowded". When
the navigation algorithm decides to use the upper oor, the Near Wall
strategy is the better option, since the probability to get in the way of humans is
decreased. On the other hand, it might be disadvantageous on the lower oor,
where the robot potentially has to drive around many open doors. Hence, the
decision should be made at runtime. An inherent property of all SAS is that they
are implementing a variant of the MAPE-K loop, rst introduced by IBM [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
The MAPE-K loop consists of four phases: in the (M) Monitor phase
environmental data is gathered and processed and, then, interpreted in the (A) Analyze
phase. The (P) Plan phase investigates the need for recon guration and creates
recon guration plans accordingly, which are applied in the (E) Execute phase.
All phases share a (K) Knowledge Base, which manages relevant information
guiding the adaptation process. An essential part of this knowledge base is
information about the execution environment (e.g., crowded areas in the upper
example), i.e., the Context Model. Because di erent domains have varying
requirements w.r.t. context modeling and management, various di erent
modeling approaches for context information were developed during the last decades.
Nevertheless, recent context modeling approaches are not su cient to handle
crucial aspects for the domain of service robots. Namely, reasoning on dynamic
collaborations like in robotic applications, requires more expressive means to
cover time and location in a processable manner. To address this problem, we
present an extended graph-based context model with time and location as rst
class citizens and, thus, extended means for modeling and managing temporal
and spatial context data for robotic applications.
      </p>
      <p>This paper is structured as follows. In Section 2, we give an overview on
context modeling and outline important properties of context models. In Section 3,
we discuss relevant context modeling approaches and their suitability w.r.t. the
identi ed properties. We present our approach in Section 4 and discuss our
prototypical implementation in Section 5. Finally, Section 6 presents our conclusion
and future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Context Modeling and Management</title>
      <p>
        To enable an application to adapt itself to changing environmental conditions,
information about the environment must be gathered and analyzed. For this
purpose, a variety of approaches have been developed, to tackle the speci c
requirements in di erent application domains of SAS [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Zimmermann et al.
identi ed six di erent modeling elements of context models [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]:
Z1 - Entities: An entity can be any real or virtual thing that is of interest for
the adaptation process (e.g., user, device, application, location, etc.).
Z2 - Individuality: The individuality encompasses any information that can
be observed about an entity (e.g., dynamic and static properties, etc.).
Z3 - Relationships: A relationship expresses a semantic dependency between
two entities. Zimmermann et al. distinguish between social-, functional-, and
compositional relationships.
      </p>
      <p>Z4 - Activities: The activities dimension encompasses any information about
an entity's past, present and future needs, goals, tasks and plans.
Z5 - Time: Statements in a context model often have a temporal dimension.</p>
      <p>Time can be expressed using time zones (e.g., Central European Time) or
virtual times (e.g., milliseconds after system start). Furthermore, overlay
models can be used for abstraction (e.g., working hours, weekends, etc.).
Z6 - Location: Since most of a context model's elements represent objects from
the physical world, which are arranged spatially, location is a major aspect
of context information. The location dimension can include real or virtual
locations (e.g., IP address in a network). Those locations can use absolute,
relative, or symbolic location models.</p>
      <p>
        Strang et al. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] identi ed six di erent types of context modeling approaches:
(1) Key-Value Models, (2) Markup Scheme Models, (3) Graphical Models, (4)
Object Oriented Models, (5) Logic Based Models, and (6) Ontology Based
Models. Depending on the speci c requirements of the application domain, di erent
advantages and disadvantages can be observed. They evaluated those types of
context models regarding their ability to (a) be composed in a distributed
computation environment, (b) the richness and quality of information, (c) the ability
to handle incompleteness and ambiguity, (d) the level of formality, and (e) their
applicability to existing environments. Considering those properties, Strang et
al. conclude that ontologies are the best-rated modeling type, while Key-Value
Models are the worst-rated. On the other hand, the construction and
management of Key-Value Models is much simpler and the performance of analysis
scales much better for simple requests. For the domain of service robots the
properties (b), (c) and (e) are crucial because of the robots complex and
unknown execution environment. The properties (a) and (d) become important
when the sensors (e.g., temperature sensor) and actuators (e.g., door opening)
are distributed across the environment, and, thus, multiple computational units
have to share knowledge based on a shared interpretation. Hence, according to
the provided evaluation, ontologies should be used for the modeling of
contextual information in the domain of service robots. Furthermore, a context model
for service robots should include the modeling elements Z1 - Z6, according to
Zimmermann et al. [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>
        The research area of SAS is still very popular, resulting in thousands of
publications each year. This is also true for research on context modeling and
management. For our related work research, we searched for papers published between
2000 and 2013 and containing the words \context model " in their title, using
Google Scholar1. The result of the indicated query was a set of 3469 papers. We
ltered the result-set manually to exclude publications that were not intended for
the application in SAS. The result was a reduced set of 1228 manually ltered
papers. Among them, we investigated ve context model survey papers [1{3, 6, 13].
We have chosen six representative context model publications, which consider
the dimensions time (Z3) and/or location (Z4). Four of those papers [
        <xref ref-type="bibr" rid="ref12 ref14 ref15 ref5">5,12,14,15</xref>
        ]
were chosen based on the description in the context model surveys. Because the
latest survey was published in 2010 by Bettini et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we have selected two
additional publications [
        <xref ref-type="bibr" rid="ref16 ref9">9, 16</xref>
        ], published between 2010 and 2014. We have
investigated their modeling capabilities w.r.t. the properties stated in Section 2. The
results are summarized in Table 3.
      </p>
      <p>
        In 2003 Strang et al. proposed the ontology-based context model CoOL
(Context Ontology Language) [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. CoOL provides the concept of an \Entity",
while type information (e.g., Person, Place) must be expressed using the
individuality dimension. Individuality (Z2) can be modeled using \Aspects" with
di erent \Scales". Relationships (Z3) can be expressed using facts. Even though
they show that the time, place and activity dimensions (Z4 - Z6) can be treated
as an aspect as well, they do not provide a special interpretation semantic for
time-bound, historical, location-, or activity-speci c data.
      </p>
      <p>
        Gu et al. presented an ontology-based context model for their service-oriented
context-aware middleware SOCAM in 2004 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. They support several types of
entities (e.g., Device, Network) as well as prede ned and user-de ned properties
and relationships (Z1 - Z3 ). Activities are also treated as rst-class-citizens (Z4).
Time (Z5 ) is partially considered, but only as start and end. The model provides
special nodes for locations (i.e., in- and outdoor locations) but does not show
how locations can be related.
      </p>
      <p>
        Wang et al. proposed the CONtext ONtology (CONON) [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] in 2004, by
extending the SOCAM context ontology. In contrast to the previous model they
provide means for describing location (Z6 ) in a more ne-grained manner and
1 Google Scholar: http://scholar.google.de/, visited 20.05.2014
      </p>
      <p>(Z1) Entities
(Z2) Individuality
(Z3) Relationships
(Z4) Activities</p>
      <p>(Z5) Time
(Z6) Location</p>
      <p>CoOL
(+)
+
+
({)
({)
({)
+
+
+
+
({)
(+)
+
+
+
+
({)
+
(+)
+
+
({)
({)
({)
+
+
+
+
{
+
+
+
+
+
{
+
SOCAM</p>
      <p>CONON</p>
      <p>MUSIC</p>
      <p>ERMHAN</p>
      <p>CACOnt
explain how those locations can be related to each other, to create hierarchical
location models.</p>
      <p>
        Reichle et al. described an ontology-based context model for the MUSIC
project in 2008 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Like the CoOL ontology, they provide an abstract type
Entity which can be categorized using special type attributes (Z1 ). The model
provides means for describing attributes and relationships (Z2 and Z3 ), but does
not treat activities as special entities (Z4 ). Hence, activities can only be modeled
by creating used-de ned activity type attributes. The model contains basic types,
such as DateTime or GPS-Coordinate, but does not provide a rst-class-citizen
interpretation semantics for time and location (Z5 and Z6 ).
      </p>
      <p>
        In 2011, Paganelli and Giuli presented a context model for the ERMHAN
service platform for Ambient Assisted Living (AAL) scenarios [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The model
provides means for describing several entity types, attributes, relationships and
activities (Z1 - Z4 ). Furthermore, they consider several types of interrelated
locations (Z6 ), but do not consider time (Z5 ) within the model. They only
consider time externally by tracking the change of context values. Based on the
type of the changed value, they interpret a time-bound sequence of values.
      </p>
      <p>In 2013, Xu et al. presented the Context-Aware Computing Ontology
CACOnt. It prede nes several types of entities, properties, relationships and
activities (Z1 - Z4 ). The authors extensively investigate the location dimension (Z6 ),
by providing di erent levels of abstraction for the speci cation of an entities
location (e.g., GPS, location hierarchies). They do not consider the time dimension
(Z5 ). Thus, a CACOnt model only provides information on the current context
state. However, like in every model with extensible attributes, it is possible to
express time information using attributes with a custom interpretation logic.</p>
      <p>As shown in Table 3, the presented context models provide means for
modeling the dimensions of entities, individuality, and relationships (Z1-Z3). The
activity dimension (Z4) is either provided, directly or can be modeled
separately, using an extensible entity-model. The most recent works consider the
location (Z6) as an essential part of a context model, and, thus, provide means
Vis6ual Paradigm CoTmmouwnityaErdditiosn [nCot oforncotmemxertcial Museo] deling in Space and Time
for handling spatial information as a rst-class-element of context models. The
time dimension (Z5), however, is considered important in state-of-the-art
literature, but current context models do not provide explicit modeling elements to
handle time appropriately.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Context Modeling in Space and Time</title>
      <p>In this section, we present our Graph- and Role-based Context-Model (GRoCoMo),
a context model supporting all modeling dimensions stated in Section 2.
4.1</p>
      <sec id="sec-4-1">
        <title>Structure</title>
        <p>As depicted in Figure 2, the context model consists of Nodes and Relations.
Both, Node and Relation inherit from the abstract type Modeling Element.
Each element has a name, a sensorId to identify values created by the same
sensor and a unique resource identi er (URI), to identify the individual
element. A Relation connects exactly one Source Element to exactly one Target
Element. Both, source and target, are of the type Modeling Element. Hence, it
dt1 : DateTime
dateTime = 25.05.2014 14:10 da
start</p>
        <p>ts 1:
Timespa
dt1 : DateTime
dateTime = 25.05.2014 14:10
example Robot</p>
        <p>: Device
start</p>
        <p>end
ts 1:
Timespan</p>
        <p>Located At</p>
        <p>Located At
Predecessor</p>
        <p>Room 1 :
Location
Floor 1 :
Location</p>
        <p>Located At</p>
        <p>Office
Building :</p>
        <p>Location</p>
        <p>Located At
ts2 :
Timespan
is possible to de ne relations on relations. A node represents an entity of the
context model. The model provides prede ned node types (e.g., Person). However,
the metamodel can be extended with domain-speci c node types by
subclassing. A Relation represents a typed, complex relationship between two entities.
Furthermore, each relationship can contain several directly assigned attributes.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Handling Time</title>
        <p>To cover temporal aspects, Timespans can be assigned to each modeling
element (i.e., nodes and relations), to state when the validity of a modeling element
started and stopped. Each modeling element with a validity timespan that has
no associated end-time, is considered valid at the current time. By default the
validity of a modeling element starts when it is created and can be invalidated by
assigning an invalidation time. Because each element can have multiple validity
times, a previously invalidated node or relation can be re-validated again. Each
modeling element may have a Predecessor Relation to another modeling
element of the same type that was replaced by the respective element w.r.t. its
validity. In the scenario described in Section 1, the robot moves from a starting
location S to a target location T. While the robot moves, a node, representing the
robot, contains an outgoing LocatedAt relation. As shown in Figure 3, when the
robot moves from room1 to floor1 the rst LocatedAt relation is invalidated
and replaced by a new relation. Because the invalidated relation is not deleted
from the model, it is still accessible and can later be analyzed (e.g., by
creating motion pro les). Furthermore, di erent representations of \time" can be
modeled. As shown in Figure 3, date and time combinations can be represented
as absolute timestamps in a given calendar. Hence, it is important to have an
associated location to every timestamp representation, which is inferred in the
provided example, because the timespan is assigned to a LocatedAt relation.
Furthermore, other representations of time (e.g., weekdays or holidays) can be
modeled and assigned to nodes and relations.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Handling Location</title>
        <p>Locations are represented by special Location nodes (see Figure 2). The model
separates physical (e.g., the main station) or logical locations (e.g., a folder
in a le system). Physical locations can further be divided into sub-symbolic
(e.g., GPS coordinates) or symbolic (e.g., Dresden Main Station) locations. To
relate an entity to a location node, the GRoCoMo metamodel provides a generic
LocatedAt relation. The target of such a relation must always be a location node.
When the source node is a location node as well, the relation represents a
partof relation for a speci ed point in time (e.g., Dresden Main Station Is Located
At Dresden). The LocatedAt relation is transitive. Lets consider for example
a person is located in a car and this car is located in the city of Dresden. In
this case, the person is located in Dresden as well. While the car changes its
location when it is moving, the driver will not change its position relative to the
car, but its location relative to the geographical location. The part-of relation
on locations forms a graph that has no cycles.
4.4</p>
      </sec>
      <sec id="sec-4-4">
        <title>Context Model Query</title>
        <p>In order to query the context model, we have created a rst prototype for a
query language (GRoCoMo-QL) based on pattern matching in graphs.
Listing 1.1 shows an example. Each query starts with a de nition of roles. Each role
has an id (e.g., node1) and represents a node with an optional type constraint
(e.g., Location). Then, relations can be de ned. Each relation has an id, an
optional type constraint, a source and a target role, as well as a temporal
constraint. The last part of the query is a restriction clause, where any restrictions
on the structure of the previously de ned roles and relations can be speci ed.
The query from Listing 1.1 will return all tuples (node1, node2, rel1), where
node1 is a location node, node2 is a device node and the name attribute of node2
has the value ``Example Robot''. Furthermore, both nodes must be connected
by a LocatedAt relation from node1 to node2. As a temporal constraint, within
all results it is guaranteed, that all nodes and relations were/are valid at the
same time and only nodes and relations are considered, that were valid within
the last 5 minutes.
1 nodes {
2 node1 : Location [ valid within last 5 min ];
3 node2 : Device [ valid within last 5 min ];
4 }
5 relations {
6 rel1 : LocatedAt ( node2 , node1 ) [ valid within last 5 min ];
7 }
8 where node2 . name = " Example_Robot ";</p>
        <p>Listing 1.1. A GRoCoMo-QL example.
4.5</p>
      </sec>
      <sec id="sec-4-5">
        <title>Context Model Manipulation</title>
        <p>The context model can be changed using a sequence of the following basic graph
rewrite operations:
Add Node/Relation: This operation adds a node/relation to the graph. The
concrete type is speci ed on the client side.</p>
        <p>Remove Node/Relation: This operation takes the id of a node/relation as an
input and will remove the corresponding node. In contrast to the invalidation
operation, a deletion will irreversibly remove the node.</p>
        <p>Invalidate Element: The invalidation operation of a modeling element (i.e.,
nodes and relations) sets the end time of the corresponding element to the
current time. Hence, it will be considered invalid.</p>
        <p>Validate Element: Analogously to the invalidation, the validation operation
will create a new valid timespan and sets the start time to either the current
or the provided time.</p>
        <p>Set Property: Some of the GroCoMo meta-classes (cf. Figure 2) de ne built-in
properties (e.g., name). Those properties can be changed using this
operation. The changes of built-in properties are not tracked (w.r.t. historical
data).</p>
        <p>From those basic operations, complex operations can be composed (e.g.,
replace node, set attribute, set location). The context model can be manipulated
by (a) sensors, (b) inference-, and (c) cleanup units. Sensors observe the
environment (physical or virtual) and update the context model accordingly. Inference
units enrich the context model with new nodes and/or relations based on analysis
of the available data in the context model. Cleanup units remove nodes and
relations based on application- and hardware-speci c rules in order to avoid memory
overloads. To express the manipulation of those di erent manipulation units, we
have created a prototypical manipulation language (GRoCoMo-ML), based on
the Query Language sketched in Section 4.4. Listing 1.2 shows an example. A
manipulation script consists of a set of labeled situations, where each situation
contains exactly one query. Then, conditions on the results of the corresponding
queries can be stated. The match/mismatch of situations can be combined using
logical operators (e.g., and, or, etc.), as well as aggregation operations stated on
the number of matches. In the provided example, the corresponding sequence of
manipulation operations is executed, when the pattern, described in the
situation "PersonInRoom1", is matched more than 5 times.</p>
        <p>The presented context model GRoCoMo provides a prede ned set of
nodetypes (e.g., Person, Activity, Location, Time), representing contextual entities
(supporting modeling dimension Z1 ). The core model introduces speci c nodes
(i.e., Attribute Node) and speci c relations (i.e., HasAttribute relation) to
model the individuality of entities (dimension Z2 ). Through this approach
dynamic complex types can be modeled by creating nested attributes. Relations
represent relationships either between entities or between other relations
(dimension Z3 ). Activities can be modeled using special Activity nodes (dimension
Z4 ). In order to express temporal and historic data (dimension Z5 ), valid times
by means of Timespans can be assigned to each node and relation, to express
when the validity of a modeling element started and ended. Beside the
represented timestamps, it is also possible to assign symbolic representations of
1 Situation " PersonInRoom1 "{
2 nodes {
3 room1 : Location ;
4 person : Person ;
5 }
6 relations {
7 rel1 : LocatedAt ( person , room1 );
8 }
9 where room1 . name == " kitchen ";
10 }
11 ON Count ( PersonInRoom1 ) &gt; 5 {
12 an = new AttributeNode ( name = " is crowded " , value = true );
13 rel = new AttributeRelation ( source = room1 , target = an );
14 }</p>
        <p>Listing 1.2. A GRoCoMo-ML Example
time (e.g., Monday, Holiday etc.). Finally, spatial information is captured by
Location nodes (dimension Z6 ).</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5 Implementation</title>
      <p>
        To investigate the feasibility of the presented approach, we have created a
prototypical implementation using the role-based self-adaptive system Smart
Application Grids (SMAGs) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. SMAGs is a component-based modeling and execution
approach for runtime recon guration. SMAGs de nes a prede ned
implementation for a MAPE-K loop, which can be adapted at runtime [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] as well. We
implemented the GRoCoMo as a special Context Model component and
integrated the Query Language and the Manipulation Language in the Sensor,
Inference and Adaptation Component. For the context model representation, we used
the JUNG2 graph framework. For the pattern matching, we used the GUERY3
framework. GUERY de nes a textual syntax for Motifs, representing patterns,
which are either provided by simple text les or can be created using an
objectoriented API. On top of GUERY, we de ned two Domain-Speci c Languages
(DSLs) for the GRoCoMo-QL and -ML using the Eclipse-based DSL-framework
Xtext4. Instances of GRoCoMo-QL, as well as the query parts from
GRoCoMoML, are transformed to valid GUERY-queries. Based on the result propositions
in the manipulation language, the results of the queries are investigated and
based on the evaluation of the situation guards, the provided recon guration
scripts are executed accordingly.
2 JUNG: http://jung.sourceforge.net/ (visited 20.05.2014)
3 GUERY: https://code.google.com/p/gueryframework/ (visited 20.05.2014)
4 Xtext: http://www.eclipse.org/Xtext/ (visited 20.05.2014)
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and Future Work</title>
      <p>
        The domain of service-robots highly requires software systems that adapt their
behavior based on past, present and potential future situations of the involved
system. The MAPE-K loop represents the adaptation process from data
acquisition, to system recon guration, based on data stored in a shared knowledge
base. An important part of this knowledge base is the context model, capturing
environmental data. It was observed, that structured knowledge representations
(e.g., ontologies) are best suited for modeling open and unknown environments.
Current approaches, however, fail to support context data analysis over time
and location simultaneously. In this paper, we have proposed the context model
GRoCoMo (Graph- and Role-Based Context Model), using a typed, attributed
and directed graph as a foundation. The model supports di erent prede ned
entities and relations, which can be extended for speci c domains. The model
treats activities, time and location as rst-class-citizens. For temporal
information, validity-timespans are attached to each modeling element, representing the
timespan when an element is/was valid (w.r.t. a speci c location). To model
locations, the model provides specialized location nodes and relations, as well
as a transitive semantics for those relations. We have outlined a rst version
of a pattern-based Query Language, as well as a Manipulation Language using
pattern-based situation detection and a set of prede ned manipulation
operations, to change the context model. For future work, the provided prototypical
implementations of the API and the corresponding languages have to be nished,
stabalized and published. In addition, the presented approach has to be
evaluated in real-world examples. Bettini et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] described additional properties of
context models that mainly focus on data quality. Those properties were already
considered, but were not described in this paper. Those properties have to be
investigated, covered and evaluated as well. Finally, it has to be investigated
how pattern recognition techniques can be used to automatically detect
situations in terms of context graph patterns, enabling machine-learning adaptation
strategies, as well as situation speci cation guidance.
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgment</title>
      <p>This work is supported by the German Research Foundation (DFG) within the
Cluster of Excellence \Center for Advancing Electronics Dresden" and the
Collaborative Research Center 912 \Highly Adaptive Energy-E cient Computing".</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baldauf</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dustdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosenberg</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A survey on context-aware systems</article-title>
          .
          <source>Int. J. Ad Hoc Ubiquitous Comput</source>
          .
          <volume>2</volume>
          (
          <issue>4</issue>
          ),
          <volume>263</volume>
          {277 (Jun
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bettini</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brdiczka</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henricksen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Indulska</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nicklas</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ranganathan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riboni</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>A survey of context modelling and reasoning techniques</article-title>
          .
          <source>Pervasive Mob. Comput</source>
          .
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <volume>161</volume>
          {180 (Apr
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bolchini</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Curino</surname>
            ,
            <given-names>C.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Quintarelli</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schreiber</surname>
            ,
            <given-names>F.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tanca</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>A dataoriented survey of context models</article-title>
          .
          <source>SIGMOD Rec</source>
          .
          <volume>36</volume>
          (
          <issue>4</issue>
          ),
          <volume>19</volume>
          {26 (Dec
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Crowley</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          :
          <article-title>Navigation for an intelligent mobile robot</article-title>
          .
          <source>Robotics and Automation</source>
          ,
          <source>IEEE Journal of 1(1)</source>
          ,
          <volume>31</volume>
          {
          <fpage>41</fpage>
          (
          <year>1985</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Gu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pung</surname>
            ,
            <given-names>H.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>D.Q.:</given-names>
          </string-name>
          <article-title>An ontology-based context model in intelligent environments</article-title>
          .
          <source>In: In Proceedings of Communication Networks and Distributed Systems Modeling and Simulation Conference</source>
          . pp.
          <volume>270</volume>
          {
          <issue>275</issue>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. yi Hong, J., ho
          <string-name>
            <surname>Suh</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>S.J.</given-names>
          </string-name>
          :
          <article-title>Context-aware systems: A literature review and classi cation</article-title>
          .
          <source>Expert Systems with Applications</source>
          <volume>36</volume>
          (
          <issue>4</issue>
          ),
          <volume>8509</volume>
          {
          <fpage>8522</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>IBM</given-names>
            <surname>Corp</surname>
          </string-name>
          .
          <article-title>: An architectural blueprint for autonomic computing</article-title>
          .
          <source>IBM Corp</source>
          ., USA (Oct
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kawamura</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pack</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iskarous</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Design philosophy for service robots</article-title>
          .
          <source>In: Systems, Man and Cybernetics</source>
          ,
          <year>1995</year>
          .
          <article-title>Intelligent Systems for the 21st Century.</article-title>
          , IEEE International Conference on. vol.
          <volume>4</volume>
          , pp.
          <volume>3736</volume>
          {3741 vol.
          <volume>4</volume>
          (Oct
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Paganelli</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giuli</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>An ontology-based system for context-aware and con gurable services to support home-based continuous care</article-title>
          .
          <source>Trans. Info. Tech. Biomed</source>
          .
          <volume>15</volume>
          (
          <issue>2</issue>
          ),
          <volume>324</volume>
          {333 (Mar
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Piechnick</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Richly</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Gotz,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Wilke</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          , A mann, U.:
          <article-title>Using role-based composition to support unanticipated, dynamic adaptation-smart application grids</article-title>
          .
          <source>In: ADAPTIVE</source>
          <year>2012</year>
          ,
          <source>The Fourth International Conference on Adaptive and SelfAdaptive Systems and Applications</source>
          . pp.
          <volume>93</volume>
          {
          <fpage>102</fpage>
          .
          <string-name>
            <surname>Nice</surname>
          </string-name>
          , France (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Piechnick</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Richly</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Kuhn, T., Gotz,
          <string-name>
            <given-names>S.</given-names>
            , Puschel, G.,
            <surname>Amann</surname>
          </string-name>
          ,
          <string-name>
            <surname>U.</surname>
          </string-name>
          :
          <article-title>Contextpoint: An architecture for extrinsic meta-adaptation in smart environments</article-title>
          .
          <source>In: ADAPTIVE</source>
          <year>2014</year>
          ,
          <article-title>The Sixth International Conference on Adaptive and SelfAdaptive Systems and Applications</article-title>
          . Venice,
          <string-name>
            <surname>Italy</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Reichle</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>M.U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Geihs</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lorenzo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fra</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paspallis</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papadopoulos</surname>
            ,
            <given-names>G.A.</given-names>
          </string-name>
          :
          <article-title>A comprehensive context modeling framework for pervasive computing systems</article-title>
          .
          <source>In: Proceedings of the 8th IFIP WG 6.1 International Conference on Distributed Applications and Interoperable Systems</source>
          . pp.
          <volume>281</volume>
          {
          <fpage>295</fpage>
          . DAIS'
          <volume>08</volume>
          , Springer-Verlag, Berlin, Heidelberg (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Strang</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Linnho -Popien,
          <string-name>
            <surname>C.</surname>
          </string-name>
          :
          <article-title>A context modeling survey</article-title>
          .
          <source>In: In: Workshop on Advanced Context Modelling, Reasoning and Management</source>
          , UbiComp - Sixth International Conference on Ubiquitous Computing, Nottingham/England (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Strang</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Linnho -Popien,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Frank</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.</surname>
          </string-name>
          :
          <article-title>Cool: A context ontology language to enable contextual interoperability</article-title>
          .
          <source>In: Distributed Applications and Interoperable Systems, Lecture Notes in Computer Science</source>
          , vol.
          <volume>2893</volume>
          , pp.
          <volume>236</volume>
          {
          <fpage>247</fpage>
          . Springer Berlin Heidelberg (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>D.Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pung</surname>
          </string-name>
          , H.:
          <article-title>Ontology based context modeling and reasoning using owl</article-title>
          .
          <source>In: Pervasive Computing and Communications Workshops</source>
          . pp.
          <volume>18</volume>
          {
          <issue>22</issue>
          (March
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>W.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>H.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>X.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xing</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Cacont: A ontology-based model for context modeling and reasoning</article-title>
          .
          <source>Applied Mechanics and Materials</source>
          <volume>347</volume>
          ,
          <issue>2304</issue>
          {
          <fpage>2310</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lorenz</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oppermann</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>An operational de nition of context</article-title>
          .
          <source>In: Modeling and Using Context, Lecture Notes in Computer Science</source>
          , vol.
          <volume>4635</volume>
          , pp.
          <volume>558</volume>
          {
          <fpage>571</fpage>
          . Springer Berlin Heidelberg (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>