<!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>R-CoRe: A Rule-based Contextual Reasoning Platform for AmI ?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Assaad Moawad</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonis Bikakis</string-name>
          <email>a.bikakis@ucl.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patrice Caire</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gregory Nain</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yves Le Traon</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Information Studies, University College London</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Luxembourg</institution>
          ,
          <addr-line>SnT</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we present R-CoRe; a rule-based contextual reasoning platform for Ambient Intelligence environments. R-CoRe integrates Contextual Defeasible Logic (CDL) and Kevoree, a componentbased software platform for Dynamically Adaptive Systems. Previously, we explained how this integration enables to overcome several reasoning and technical issues that arise from the imperfect nature of context knowledge, the open and dynamic nature of Ambient Intelligence environments, and the restrictions of wireless communications. Here, we focus more on technical aspects related to the architecture of R-Core, and demonstrate its use in Ambient Assisted Living.</p>
      </abstract>
      <kwd-group>
        <kwd>contextual reasoning</kwd>
        <kwd>distributed reasoning</kwd>
        <kwd>Ambient Intelligence</kwd>
        <kwd>system development</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Ambient Intelligence (AmI) is a new paradigm of interaction among agents
acting on behalf of humans, smart objects and devices. Its goal is to transform our
living and working environments into intelligent spaces able to adapt to changes
in contexts and to their users' needs and desires. This requires augmenting the
environments with sensing, computing, communicating and reasoning
capabilities. AmI systems are expected to support humans in their every day tasks
and activities in a personalized, adaptive, seamless and unobtrusive fashion [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Therefore, they must be able to reason about their contexts, i.e. with any
information relevant to the interactions between the users and system.
      </p>
      <p>Reasoning models and methods are therefore essential to: interpret and
integrate context data from various information sources; infer useful conclusions
from the raw context data; and enable systems to make correct context-aware
decisions in order to adapt to changes in the environment and to their users' needs,
intentions and desires. The challenges in these tasks are primarily caused by the
? The present research is supported by the National Research Fund, Luxembourg,</p>
      <p>
        CoPAInS project (code: CO11/IS/1239572).
imperfection of context data, the open and dynamic nature of AmI
environments and the heterogeneity of participating devices. According to [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], context
data in AmI environments may be unknown, imprecise, ambiguous or erroneous.
It is typically distributed among devices with di erent computing capabilities
and representation models, which may join or leave the environment at random
times and without prior notice. Moreover, devices communicate using wireless
networks, which are unreliable and restricted by the range of transmitters.
      </p>
      <p>
        In previous works we classi ed existing contextual reasoning approaches into
three main categories [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]: ontological approaches, which use Description Logics to
derive implicit knowledge from the existing context data; rule-based approaches,
which are based on more expressive logics; and probabilistic approaches, which
use Bayesian networks or other probabilistic models to explicitly model
uncertainty in the context data. In the same paper we argued that, compared to
others, rule-based approaches o er signi cant advantages, such as simplicity and
exibility, formality, expressivity, modularity, high-level abstraction and
information hiding. In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] we introduced Contextual Defeasible Logic (CDL): a new
distributed, non-monotonic approach for contextual reasoning, which enables
heterogeneous entities to collectively reason with uncertain and ambiguous
information. In order to enable the deployment of CDL in real environments, in
[15] we proposed the integration of CDL in Kevoree [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] - a software framework
that facilitates the development of Distributed Dynamically Adaptive Systems.
      </p>
      <p>In this paper, we present R-CoRe, a Rule-based Contextual Reasoning
Platform of Ambient Intelligence, which is the outcome of this integration. The main
features of R-CoRe are:
1. It is totally distributed. Entities are represented as Kevoree nodes and
communicate through dedicated communication channels.
2. It is rule-based. The local knowledge of each entity is modeled as a CDL
theory and knowledge exchange is enabled by mapping rules.
3. It enables handling inconsistencies that arise from the integration of
knowledge from di erent sources using preferences, which re ect the con dence
that each node has in the quality of knowledge imported by other nodes.
4. It is dynamic and adaptive. Using the auto-discovery capabilities of Kevoree,
it can handle cases of devices that join or leave the system at any time.</p>
      <p>
        We developed R-CoRe for the needs of the CoPAInS project1 (Conviviality
and Privacy in Ambient Intelligence Systems). CoPAInS focuses on the tradeo s
to be made in Ambient Assisted Living systems [16], particularly as they pertain
to conviviality, privacy and security [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In this framework, R-CoRe is used for
the simulation of AAL scenarios, with which we test and validate our methods.
      </p>
      <p>The remaining of the paper is structured as follows: Section 2 brie y presents
the theoretical background of this work. Section 3 describes our running AAL
example. Section 4 presents the main features of Kevoree. Section 5 presents in
detail the R-CoRe architecture, while Section 6 demonstrates its use in Ambient
Assisted Living. Section 7 concludes and presents our plans for future work.
1 http://wwwen.uni.lu/snt/research/serval/projects/copains</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>
        The underlying reasoning model of R-CoRe is Contextual Defeasible Logic (CDL
[
        <xref ref-type="bibr" rid="ref2 ref5">2,5</xref>
        ]). CDL is a non-monotonic extension of Multi-Context Systems speci cally
designed for the requirements of Ambient Intelligence systems. Multi-Context
Systems (MCS [
        <xref ref-type="bibr" rid="ref10 ref11">11,10</xref>
        ]) are logical formalizations of distributed context theories
connected through mapping rules, which enable information ow between
contexts. In MCS, a context can be thought of as a logical theory - a set of axioms
and inference rules - that models local knowledge. CDL extends the original MCS
with defeasible mapping rules to capture the uncertainty of the knowledge that
an agent imports from external sources; and with a preference ordering on the
system contexts, which is used to resolve the potential inconsistencies that may
arise from the information exchange between mutually inconsistent contexts.
      </p>
      <p>In CDL, a MCS C is a set of contexts Ci: A context Ci is de ned as a
tuple of the form (Vi; Ri; Ti), where Vi is the vocabulary of Ci (a set of positive
and negative literals of the form (ci : ai)), Ri is a set of rules, and Ti is a
preference ordering on C. Ri consists of a set of local rules, which represent
the local knowledge of an agent, and a set of mapping rules, through which
agents may share parts of their local knowledge. The body of a local rule is a
conjunction of local literals (literals that are contained in Vi), and its head is
labeled by a local literal too. A mapping rule, on the other hand, contains both
local and foreign literals (literals from the vocabularies of other contexts) in its
body, while its head is labeled by a local literal:</p>
      <p>rim : (cj : a1); : : : ; (ck : an 1) ) (ci : an)
By representing mappings as defeasible rules and by ordering contexts in terms
of preference, CDL enables handling inconsistencies that arise when importing
con icting information from di erent contexts.</p>
      <p>
        We have obtained the following results for CDL: a proof theory [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]; an
argumentation semantics [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]; four algorithms for distributed query evaluation and a
complexity analysis [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The algorithms proceed roughly as follows: when a
context Ci receives a query about one of its local literals (ci : ai), it rst attempts
to evaluate its truth value using its local rules only. If this is not possible, it
generates the proof trees for (ci : ai) and its negation :(ci : ai), using the local and
mapping rules of Ci. For each of the foreign literals (cj : bj ) contained in one of
the two proof trees, it generates a similar query and sends it to the appropriate
context (Cj ). In case of con ict, i.e.. the truth values of all literals in both proof
trees are true, Ci compares the proof trees using preference information from Ti.
      </p>
      <p>
        We applied CDL in real scenarios of Mobile Social Networks [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Ambient
Intelligence [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and showed how it addresses issues that arise from the
imperfection of context data. In [15], we discussed some of its limitations with regard
to its deployment in real environments, and explained how its integration with
Kevoree enabled us to overcome several technical issues related to
communication, detection, adaptability and dynamicity. Here we focus more on technical
aspects of this integration, and demonstrate the use of the integrated framework,
R-CoRe, in an example scenario from Ambient Assisted Living.
      </p>
    </sec>
    <sec id="sec-3">
      <title>An Ambient Assisted Living Example</title>
      <p>Below we present an Ambient Assisted Living (AAL) scenario, part of a series
of scenarios validated by HotCity, the largest WI-FI network in Luxembourg, in
the Framework of the CoPAInS project.</p>
      <p>In our scenario, visualized in Figure 1, the eighty- ve years old Annette is
prone to heart failures. The hospital installed a Home Care System (HCS) at her
place. One day, she falls in her kitchen and cannot get up. The health bracelet
she wears gets damaged and sends erroneous data, e.g., heart beat and skin
temperature, to the HCS. Simultaneously, the system analyzes Annette's
activity captured by the Activity Recognition Module (ARM). Combining all the
information to Annette's medical pro le, and despite the normal values
transmitted by Annette's health bracelet, the system infers an emergency situation.
It contacts the nearby neighbors asking them to come and help.
emergency</p>
      <p>prone to
heart attack</p>
      <p>normal pulse
lying on
the floor</p>
      <p>This scenario exempli es challenges raised when reasoning with the
available context information in Ambient Intelligence environments. Furthermore, it
highlights the di culties in making correct context-dependent decisions.</p>
      <p>First, context knowledge may be erroneous. In our example, the values
transmitted by the health bracelet for Annette's heart beat and skin temperature, are
not valid, thereby leading to a con ict about Annette's current condition.
Second, local knowledge is incomplete, in the sense that none of the agents involved
has immediate access to all the available context information. Third, context
knowledge may be ambiguous; in our scenario, the HCS receives mutually
inconsistent information from the ARM and the health bracelet. Fourth, context
knowledge may be inaccurate; for example, Annette's medical pro le may contain
corrupted information. Finally, devices communicate over a wireless network.
Such communications are unreliable due to the nature of wireless networks, and
are also restricted by the range of the network. For example, the health bracelet
may not be able to transmit its readings to HCS due to a damaged transmitter.</p>
    </sec>
    <sec id="sec-4">
      <title>Kevoree - A component based software platform</title>
      <p>On the one hand, in Ambient Assisted Living (AAL), systems need to be adapted
to users preferences and contexts. They also need to combine various data and
reason about it, but the imperfect nature of context makes this task very
challenging. Returning to our use case, the HCS receives data from di erent devices,
and many situations may occur causing the data to be erroneous, e.g., Annette
may have left her health bracelet next to her bed instead of wearing it, or the
battery capability may be weak and preventing the bracelet from transmitting
any data.</p>
      <p>
        On the other hand, CDL allows to manage uncertainty and reason about
it. The problem remains to apply such theoretical tools to the AAL domain in
order to solve the very concrete challenges a ecting patients. In this section,
we present the Kevoree environment, which we use to address such issues by
implementing the CDL reasoning model. This is illustrated in Figure 2.
Kevoree [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] is an open-source environment that provides means to facilitate the
design and deployment of Distributed Dynamically Adaptive Systems, taking
advantage of Models@Runtime [17] mechanisms throughout the development
process.
      </p>
      <p>
        This development platform is made of several tools, among which the Kevoree
Modeling Framework (KMF) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], a model editor (to assemble components to
create an application), and several runtime environments, from Cloud to JavaSE or
Android platforms. The component model of Kevoree de nes several concepts.
The rest of this section describes the most interesting ones in relation to the
content of this paper.
      </p>
      <p>The Node (in grey in gure 3) is a topological
representation of a Kevoree runtime. There exist di
erent types of nodes (e.g.: JavaSE, Android, etc.) and a
system can be composed of one, or several distributed
heterogeneous instances of execution nodes.</p>
      <p>Component instances are deployed and run on a
node instance, as presented on gure 3. Components
may also be of di erent types, and one or more,
heterogeneous or not, component instances may run on
a single node. Components declare Ports (rounds on left and right sides of the
component instance) for provided and required services, and input and output
messages. The ports are used to communicate with other components of the
system.</p>
      <p>Groups (top shape in gure 4) are used to share models
(at runtime) between execution platforms (i.e. nodes). There
are di erent types of Groups, each of which implements a
different synchronization / conciliation / distribution algorithm.</p>
      <p>Indeed, as the model shared is the same for all the nodes,
there may be some concurrent changes on the same model,
that have to be dealt with.</p>
      <p>Finally (for the scope of this paper), Channels (bottom
shape in gure 4) handle the semantics of a communication
link between two or more components. In other words, each
type of channel implements a di erent means to transport a Fig. 4. An
inmessage or a method call from component A to component B, stance of Group
including local queued message list, TCP/IP sockets connec- on top, of
Chantions, IMAP/SMTP mail communications, and various other nel on the
bottypes of communication. tom
4.2</p>
      <sec id="sec-4-1">
        <title>Kevoree Critical Features</title>
        <p>Kevoree appears to be an appropriate choice to provide solutions for the
development of Ambient Intelligence systems, as it can deal with their dynamic
nature. In such systems, agents are often autonomous, reactive and proactive in
order to collaborate and ful l tasks on behalf of their users.</p>
        <p>In Kevoree, an agent is represented as a node that hosts one or more
component instances. The node is responsible for the communication with other nodes
by making use of the synchronization Group. Some group types implement
algorithms with auto-discovery capabilities, making nodes and their components
dynamically appear in the architecture model of the overall system. The fact
that a new node appears in the model means that an agent is reachable, but it
does not necessarily mean that it participates in any interaction. The component
instances of a node provide the services for the agent. Therefore, for an agent to
take part in a collaborative work, the ports of the component instances it hosts
have to be connected to some ports of other agents' components.</p>
        <p>Some features of Kevoree make it particularly suitable for our needs. First,
it enables the implementation, deployment and management of heterogeneous
entities as independent nodes. Second, it uses communication channels to enable
the exchange of messages among the distributed components. Third, it o ers a
common and shared representation model for di erent types of nodes. Finally,
it is endowed with adaptive capabilities and auto-discovery, which t with the
open and dynamic nature of AmI environments.</p>
        <p>In the next section, we detail how we exploit the features of Kevoree and
integrate them with CDL to create our AAL platform.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>R-CoRe Architecture</title>
      <p>In this section, we describe how CDL and Kevoree are integrated in the R-CoRe
architecture. We should note that the parts of CDL, which were not directly
mapped to existing elements Kevoree, were implemented in Java.
5.1</p>
      <sec id="sec-5-1">
        <title>Java Library</title>
        <p>Our Java implementation is composed of a main rcore package containing 4
subpackages: agencies, interceptor, knowledge, logic packages and the main Query
component class.
{ The logic package contains the classes that represent (in memory) the literals
and rules.
{ Finally the query package contains the QueryComponent class, which is the
main component developed to run on the Kevoree platform.
In our platform, the notion of context, is implemented by a new component type
that we developed, called Query Component. This component has two inputs:
Console In and Query In, and two outputs: Console out and Query Out. The
Query Component has three properties: a Name, an initial preference address
and an initial knowledge base address. In Kevoree, each instance must have a
unique name. In R-CoRe, we use this unique name to specify the sender or the
recipient of a query. The preference address and the knowledge base address
contain the addresses of the les to be loaded when the component starts. The
knowledge base le contains the rule set of a context, while the preference le
contains the preference order of the context implemented as a list.</p>
        <p>Each component has two console (in/out) and two query (in/out) ports. The
console input port is used to send commands to the component, e.g. to update
its knowledge base or change its preference order. The outputs of the commands
are sent out to the console output port. The query in/out ports are used when a
component is sending/receiving queries to/from other components. Queries are
sent via the \Query out" port and responses are received via \Query In".</p>
        <p>Internally, the Query Component has some private variables, which represent
its knowledge base, the preference order and a list of query servant threads
currently running on it. When the component receives a new query, it creates
a new query servant thread dedicated to solve the query and adds it to the list
of currently running query threads. When this thread reports back the result of
the query, it is killed and removed from the list.
5.3</p>
      </sec>
      <sec id="sec-5-2">
        <title>Query Servant</title>
        <p>When a query servant thread is created, it is always associated with an ID and
with the query containing the literal to be solved, and it is added to the list
of running threads of the query component. The query servant model works as
follows:
1. The rst phase consists of trying to solve the query locally using the local
knowledge base of the query component. If a positive/negative truth value
is derived locally, the answer is returned and the query servant terminates.
2. The second phase consists of enumerating the rules in the knowledge base
that support the queried literal as their conclusion. For each such rule, the
query servant initiates a new query for each of the literals that are in the body
of the rule. For foreign literals, the queries are dispatched to the appropriate
remote components. After initiating the queries, the query servant goes into
an idle state through the java command \wait()".
3. When responses are received, the query servant thread is noti ed. Phase two
is repeated again, but this time using the rules that support the negation of
the queried literal.
4. The last step is to resolve the con ict by comparing the remote components
that were queried for the two literals using the context preference order. The
result is reported back to the query component.
5.4</p>
      </sec>
      <sec id="sec-5-3">
        <title>Query Interceptor</title>
        <p>In order to monitor and control all the exchanges happening between the Query
components, we created a Query Interceptor component. It's main job is to
capture all the queries transiting on the exchange channel, display them on a
graphical interface to the users, and allow the users to forward them manually
afterwards. This component serves two purposes: It enables demonstrating the
reasoning process using a single graph that is created in a step by step fashion;
it also facilitates debugging the system by centralizing all the exchanges in one
component.</p>
        <p>The Graphical interface of the Query Interceptor has two parts: the graph on
the left that is used to visualize the information exchange; and the user controls
on the right. When a query is sent from a component a to a component b through
the interceptor, two vertices, a and b, and an edge from a to b are added to the
graph. If the Interceptor is set to the demo-mode (by selecting a check box
called "demo mode\ on the Graphical User Interface GUI), the query is paused
at the interceptor, and the user has to click the Next button in order to actually
forward the query from the interceptor to component b. The same happens when
a response is sent from b to a. If the demo-mode is not selected, all the queries
and responses are forwarded automatically without any intervention of the user
as if the Interceptor is transparent or turned o . The Interceptor also contains
Reset button, which clears the graph and restarts the monitoring.</p>
        <p>On the Kevoree platform, the Query Interceptor component has two ports:
Query In port that receives all the queries sent from the Query components,
and a Query out port to forward the query back to the components after being
displayed on the Interceptor GUI.
5.5</p>
      </sec>
      <sec id="sec-5-4">
        <title>Query class and loop detection mechanism</title>
        <p>The query Java class that we developed for R-CoRe has the following attributes:
the queried literal, the name of the component that initiated the query (query
owner ), the name of the component to which the query is addressed (query
recipient ), the id of the query servant thread that is responsible for evaluating
the query, a set of supportive sets (set of foreign literals that are used for the
evaluation of a query), and a list that represents the history of the query. The
history is used to track back to the origin of the query by a loop detection
mechanism, which we have integrated in the query evaluation algorithm.</p>
        <p>As the query evaluation algorithm is distributed, we cannot know a-priori
whether a query will initiate an in nite loop of messages. The loop detection
mechanism that we developed detects and terminates any in nite loops. The
simple case is when a literal (ci : a) in component Ci depends on literal (ck : b)
of component Ck, and vice-versa. The loop detection mechanism works as follows:
each time the query servant inquires about a foreign literal to solve the current
query, it rst checks that the foreign literal in question does not exist in the
history of the current query, and if not, it generates a new query for the foreign
literal by integrating the history of the current query into the history of the new
one. This way, a query servant is only allowed to inquire about new literals.
6</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Demonstrating R-Core</title>
      <p>Applying the above methodology on the running example described in section
3, we created 5 Query Component instances, each one representing one of the
devices or elements of the scenario: the sms module, the bracelet, the medical
pro le, the ARM and the Home Care System. According to the scenario, the sms
module must determine whether to send messages to the neighbors according to
a prede ned set of rules. Using a console component of Kevoree that we attached
to the sms module, we are able now to initiate queries on the sms module.</p>
      <p>Figure 6 shows our experimental setup, which involves the 5 query
components, the console connected to the sms module (FakeConsole) and the Query
Interceptor component. Note that all query input and output ports of the query
components are connected to the Interceptor in order to allow us to capture all
the exchanges for our demo session.
M1: (br:normalPulse) ) :(hcs:emergency)</p>
      <p>M2: (arm:lyingOnFloor), (med:proneToHA) ) (has:emergency)</p>
      <p>Before pushing the model from the Kevoree editor to the Kevoree runtime
(i.e.: the node that will host the instances), we setup the properties of the
components to initialize their knowledge bases and preference orders as described
in Table 1. For instance, the sms component is initiated with a knowledge base
containing one mapping rule (M 1) that states that if (hcs : emergency) of
hcs is true, then (sms : dispatchSM S) of the sms module will also be true.
HCSPref.txt contains the preference order of hcs, according to which the
information imported by the medical pro le is preferred to that coming from the
ARM, which is in turn preferred to that coming from the bracelet.
6.2</p>
      <sec id="sec-6-1">
        <title>Execution</title>
        <p>After pushing the model to the Kevoree runtime, a console appears allowing us to
interact with the SMS module. We initiate a query about (sms : dispatchSM S)
on the console by typing dispatchSMS on the console of the SMSModule.2</p>
        <p>The SMS module starts a new query servant which initiates in its turn a new
query about (hcs : emergency). This query is captured by the interceptor and it
2 You can run the demo and access its source code and all other necessary les at:
https://github.com/securityandtrust/ruleml13.
is displayed on the graph GUI; in fact two nodes representing the SMSModule
and HCS are added to the graph. If the demo mode of the interceptor is selected,
the user has to click on Next button each time to forward a query from one
component to another. This step-by-step mode is very useful to understand the
actual interactions and to slow down the exchanges.</p>
        <p>The knowledge base of hcs contains one rule supporting (hcs : emergency),
M 2, and another one supporting its negation, M 1. hcs evaluates both rules and
resolves the con ict using its preference order. Finally, it sends back the result
of the query to the rst query servant, which in turn computes and returns a
positive truth value for (sms : dispatchSM S). Each time a query or a query
response is generated from any component and dispatched to any other, the
interceptor captures it, adds it to the graph, and waits for the user to click Next
before forwarding the query or the response to the appropriate component.</p>
        <p>Screen-shots from the demo during di erent steps of execution are displayed
in gure 7. Following this, the SMS module will display, on the console connected
to smsModule, the answer for dispatchSM S, which in this case is true.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Conclusion and Future Work</title>
      <p>In this paper, we presented R-CoRe: a Rule-based Contextual Reasoning
framework for Ambient Intelligence and demonstrated its use Ambient Assisted
Living. Being based on Contextual Defeasible Logic, R-CoRe enables reasoning with
imperfect context data in a distributed fashion. The capabilities of the
underlying software platform, Kevoree, further enables R-CoRe to overcome several
technical issues related to communication, information exchange and detection.</p>
      <p>R-CoRe still has some technical limitations. As it deals with real components,
we must assume limited memory, battery, computation and power resources.
These limitations vary widely from a component to another depending on the
nature of the component, its size and its technical complexity. For the current
implementation, we have limited the knowledge base size to a maximum of 500
literals and rules. We have also limited the time-out for 10 seconds, so that if
a component does not receive an answer to its query within 10 seconds, the
corresponding thread server will send a time-out response, and the query will
automatically expire. This limits the maximum number of hops that a query
can make before it expires, which in turn limits the communication resources, as
some communication channel might not be free (over sms for example). With the
current settings, we can easily implement small-scale AAL scenarios. However,
dealing with more complex scenarios requires a more scalable methodology. To
address such needs, we are already working on solutions that o er trade-o s
between computation time, memory and communication between devices, and
we are redesigning our algorithms so that they are able to adapt between di erent
strategies depending on the available resources.</p>
      <p>
        Another issue is with the development of the rule theories. In this version of
R-CoRe, users have to use the syntax of CDL to create the rule and preference
bases of each node. A future plan is to develop or integrate appropriate
ruleediting tools that will enable plain users to create and con gure the rule and
preference bases using simple natural-language-based constructs. A tool that
we can use for such purposes is S2DDREd [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]: an authoring tool for Defeasible
Logic, which provides the users with semantic assistance during the development
of rule theories.
      </p>
      <p>
        In the future, we also plan to extend CDL to support shared pieces of
knowledge, which are directly accessible by all system contexts, and implement this
extension in R-CoRe using the groups feature of Kevoree (see section 4). This
will enable di erent devices operating in an Ambient Intelligence environment to
maintain a common system state. We also plan to develop and implement
reactive (bottom-up) reasoning algorithms, which will be triggered by certain events
or changes in the environment. Such types of algorithms t better with the
adaptive nature of Ambient Intelligence systems, and may be particularly useful in
AAL contexts. We will also study the integration of a low-level context layer
in R-CoRe, which will process the available sensor data and feed the rule-based
reasoning algorithms with appropriate values for the higher-level predicates. For
this layer, we will investigate the Complex Event Processing (CEP ) methodology
[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], which combines data from multiple sources to infer higher-level conclusions,
and study previous works on the integration of CEP and reaction rules [18]. We
will test and evaluate all our deployments and extensions to R-CoRe in the
Internet of Things Laboratory of the Interdisciplinary Centre for Security, Reliability
and Trust (SnT) in Luxembourg. It is also among our plans to use our platform
to evaluate tradeo s among requirements of AAL systems, e.g., privacy, security,
usability/conviviality and performance. Finally, we plan to investigate how the
same reasoning methods may be applied to other application areas with similar
requirements, such as the Semantic Web and Web Social Networks.
15. Moawad, A., Bikakis, A., Caire, P., Nain, G., Traon, Y.L.: A Rule-based Contextual
Reasoning Platform for Ambient Intelligence environments. In: RuleML. LNCS,
Springer (2013)
16. Moawad, A., Efthymiou, V., Caire, P., Nain, G., Le Traon, Y.: Introducing
conviviality as a new paradigm for interactions among IT objects. In: Proceedings of
the Workshop on AI Problems and Approaches for Intelligent Environments. vol.
907, pp. 3{8. CEUR-WS.org (2012)
17. Morin, B., Barais, O., Nain, G., Jezequel, J.M.: Taming dynamically adaptive
systems using models and aspects. In: Proceedings of the 31st International
Conference on Software Engineering. pp. 122{132. ICSE '09, IEEE Computer Society,
Washington, DC, USA (2009), http://dx.doi.org/10.1109/ICSE.2009.5070514
18. Paschke, A., Vincent, P., Springer, F.: Standards for complex event processing and
reaction rules. In: RuleML America. pp. 128{139 (2011)
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Antoniou</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papatheodorou</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Reasoning about Context in Ambient Intelligence Environments: A Report from the Field</article-title>
          .
          <source>In: KR</source>
          . pp.
          <volume>557</volume>
          {
          <fpage>559</fpage>
          . AAAI Press (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Antoniou</surname>
          </string-name>
          , G.:
          <article-title>Defeasible Contextual Reasoning with Arguments in Ambient Intelligence</article-title>
          .
          <source>IEEE Trans. on Knowledge and Data Engineering</source>
          <volume>22</volume>
          (
          <issue>11</issue>
          ),
          <volume>1492</volume>
          {
          <fpage>1506</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Antoniou</surname>
          </string-name>
          , G.:
          <article-title>Rule-based contextual reasoning in ambient intelligence</article-title>
          .
          <source>In: RuleML</source>
          . pp.
          <volume>74</volume>
          {
          <issue>88</issue>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Antoniou</surname>
          </string-name>
          , G.:
          <article-title>Contextual Defeasible Logic and Its Application to Ambient Intelligence</article-title>
          .
          <source>IEEE Transactions on Systems, Man, and Cybernetics</source>
          , Part A
          <volume>41</volume>
          (
          <issue>4</issue>
          ),
          <volume>705</volume>
          {
          <fpage>716</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Antoniou</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hassapis</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Strategies for contextual reasoning with con icts in Ambient Intelligence</article-title>
          .
          <source>Knowledge and Information Systems</source>
          <volume>27</volume>
          (
          <issue>1</issue>
          ),
          <volume>45</volume>
          {
          <fpage>84</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Cook</surname>
            ,
            <given-names>D.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Augusto</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jakkula</surname>
            ,
            <given-names>V.R.</given-names>
          </string-name>
          :
          <article-title>Ambient intelligence: Technologies, applications, and opportunities</article-title>
          .
          <source>Pervasive and Mobile</source>
          Computing pp.
          <volume>277</volume>
          {
          <issue>298</issue>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Efthymiou</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Caire</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bikakis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Modeling and evaluating cooperation in multi-context systems using conviviality</article-title>
          .
          <source>In: Proceedings of BNAIC 2012 The 24th Benelux Conference on Arti cial Intelligence</source>
          . pp.
          <volume>83</volume>
          {
          <issue>90</issue>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fouquet</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barais</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Plouzeau</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jezequel</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fleurey</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A Dynamic Component Model for Cyber Physical Systems</article-title>
          .
          <source>In: 15th International ACM SIGSOFT Symposium on Component Based Software Engineering</source>
          . Bertinoro,
          <string-name>
            <surname>Italie</surname>
          </string-name>
          (Jul
          <year>2012</year>
          ), http://hal.inria.fr/hal-00713769
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Fouquet</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nain</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daubert</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barais</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Plouzeau</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jezequel</surname>
            ,
            <given-names>J.M.:</given-names>
          </string-name>
          <article-title>An Eclipse Modelling Framework Alternative to Meet the Models@Runtime Requirements</article-title>
          .
          <source>In: Models</source>
          <year>2012</year>
          . Innsbruck, Autriche (Oct
          <year>2012</year>
          ), http://hal. inria.fr/hal-00714558
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Ghidini</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giunchiglia</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Local Models Semantics, or contextual reasoning=locality+compatibility</article-title>
          .
          <source>Arti cial Intelligence</source>
          <volume>127</volume>
          (
          <issue>2</issue>
          ),
          <volume>221</volume>
          {
          <fpage>259</fpage>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Giunchiglia</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sera</surname>
            <given-names>ni</given-names>
          </string-name>
          , L.:
          <article-title>Multilanguage hierarchical logics, or: how we can do without modal logics</article-title>
          .
          <source>Arti cial Intelligence</source>
          <volume>65</volume>
          (
          <issue>1</issue>
          ) (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Henricksen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Indulska</surname>
          </string-name>
          , J.:
          <article-title>Modelling and Using Imperfect Context Information</article-title>
          .
          <source>In: Proceedings of PERCOMW '04</source>
          . pp.
          <volume>33</volume>
          {
          <fpage>37</fpage>
          . IEEE Computer Society, Washington, DC, USA (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Kontopoulos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zetta</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bassiliades</surname>
          </string-name>
          , N.:
          <article-title>Semantically-enhanced authoring of defeasible logic rule bases in the semantic web</article-title>
          .
          <source>In: WIMS</source>
          . p.
          <volume>56</volume>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Luckham</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          :
          <article-title>The power of events - an introduction to complex event processing in distributed enterprise systems</article-title>
          .
          <source>ACM</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>