<!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 Inconsistency Management in Reactive Multi-Context Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gerhard Brewka</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefan Ellmauthaler</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Matthias Knorr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joa˜ o Leite</string-name>
          <email>frjrgjmknjjleiteg@fct.unl.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>NOVA LINCS &amp; Departamento de Informa ́tica, Universidade NOVA de</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ricardo Gonc ̧alves</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we begin by introducing reactive multicontext systems (rMCSs), a framework for reactive reasoning in the presence of heterogeneous knowledge sources. In particular, we show how to integrate data streams into multi-context systems (MCSs) and how to model the dynamics of the systems, based on two types of bridge rules. We then discuss various methods for handling inconsistencies, a problem that occurs with reasoning based on multiple knowledge sources that need to be integrated, with a special focus on non-existence of equilibria.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The wide and increasing availability of machine-processable data
and knowledge – fueled by initiatives such as the Semantic Web,
Linked Open Data, and the Internet of Things, among others – has
prepared the ground and called for a new class of dynamic, rich,
knowledge-intensive applications. Such new applications require
automated reasoning based on the integration of several heterogeneous
knowledge bases – possibly overlapping, independently developed,
and written in distinct languages with different semantic assumptions
– together with data/event streams produced by sensors and
detectors, to support automation and problem-solving, to enforce traceable
and correct decisions, and to facilitate the internalization of relevant
dynamic data and knowledge.</p>
      <p>Consider, for example, a scenario where Dave, an elderly person
suffering from dementia, lives alone in an apartment equipped with
various sensors, e.g., smoke detectors, cameras, and body sensors
measuring relevant body functions (e.g., pulse, blood pressure, etc.).
An assisted living application in such a scenario could leverage the
information continuously received from the sensors, together with
Dave’s medical records stored in a relational database, a biomedical
health ontology with information about diseases, their symptoms and
treatments, represented in some description logic, some action policy
rules represented as a non-monotonic logic program, to name only a
few, and use it to detect relevant events, suggest appropriate action,
and even raise alarms, while keeping a history of relevant events and
Dave’s medical records up to date, thus allowing him to live on his
own despite his condition. For example, after detecting that Dave left
the room while preparing a meal, the system could warn him about
the situation in case he does not return soon. It could also even turn
the stove off in case it detects that Dave fell asleep, not wanting to
wake him up because his current treatment/health status values rest
over immediate nutrition. Naturally, if Dave is not gone long enough,
and no sensor shows any potential problems (smoke, gas, fire, etc.),
then the system should seamlessly take no action. Another illustrative
example would be a situation where the system observes that Dave’s
smart watch is indicating a high heart rate (tachycardia), in which
case it would request Dave to measure his blood pressure
(hypertension) – calling for assistance if Dave ignores the request – and, based
on the measurements, determine whether to raise an alarm, calling
an ambulance for example, or whether the readings are caused by
some infection already under treatment or a decongestant that Dave
recently took, in which case nothing would need to be done.
The requirements posed by novel applications such as the one just
described, together with the availability of a vast number of knowledge
bases – written using many different formalisms – and streams of
data/events produced by sensors/detectors, has led modern research
in knowledge representation and reasoning to face two fundamental
problems: dealing with the integration of heterogeneous data and
knowledge, and dealing with the dynamics of such novel knowledge
based systems.</p>
      <p>
        Integration The first problem stems from the availability of
knowledge bases written in many different languages and formats
developed over the last decades, from the rather basic ones, such as
relational databases or the more recent triple-stores, to the more
expressive ones, such as ontology languages (e.g., description logics),
temporal and modal logics, non-monotonic logics, or logic programs
under answer set semantics, to name just a few. Each of these
formalisms was developed for different purposes and with different
design goals in mind. Whereas some of these formalisms could be
combined to a new, more expressive formalism, with features from its
constituents – such as dl-programs [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and Hybrid MKNF [
        <xref ref-type="bibr" rid="ref27 ref31">31, 27</xref>
        ]
which, to different extent, combine description logics and logic
programs under answer set semantics –, in general this is simply not
feasible, either due to the mismatch between certain assumptions
underlying their semantics, or because of the high price to pay, often
in terms of complexity, sometimes even in terms of decidability. It is
nowadays widely accepted that there simply is no such thing as a
single universal, general purpose knowledge representation language.
      </p>
      <p>What seems to be needed is a principled way of integrating
knowledge expressed in different formalisms.</p>
      <p>
        Multi-context systems (MCSs) provide a general framework for
this kind of integration. The basic idea underlying MCSs is to leave
the diverse formalisms and knowledge bases untouched, and to use
so-called bridge rules to model the flow of information among
different parts of the system. An MCS consists of reasoning units – called
contexts for historical reasons [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] – where each unit is equipped
with a collection of bridge rules. In a nutshell, the bridge rules
allow contexts to “listen” to other contexts, that is to take into account
beliefs held in other contexts.
      </p>
      <p>Bridge rules are similar to logic programming rules (including
default negation), with an important difference: they provide means to
access other contexts in their bodies. Bridge rules not only allow for
a fully declarative specification of the information flow, but they also
allow information to be modified instead of being just passed along
as is. Using bridge rules we may translate a piece of information into
the language/format of another context, pass on an abstraction of the
original information, leaving out unnecessary details, select or hide
information, add conclusions to a context based on the absence of
information in another one, and even use simple encodings of
preferences among parent contexts.</p>
      <p>
        Historically, MCSs went through several development steps until
they reached their present form. Advancing work in [
        <xref ref-type="bibr" rid="ref21 ref30">21, 30</xref>
        ] aiming
to integrate different inference systems, monotonic heterogeneous
multi-context systems were defined in [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], with reasoning within
as well as across monotonic contexts. The first, still somewhat
limited attempts to include non-monotonic reasoning were done in [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], where default negation in the rules is used to allow for
reasoning based on the absence of information from a context.
      </p>
      <p>
        The non-monotonic MCSs of [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] substantially generalize previous
approaches, by accommodating heterogeneous and both monotonic
and non-monotonic contexts, hence capable of integrating, among
many others, “typical” monotonic logics like description logics or
temporal logics, and non-monotonic formalisms like Reiter’s default
logic, logic programs under answer set semantics, circumscription,
defeasible logic, or theories in autoepistemic logic. The semantics of
nonmonotonic MCSs is defined in terms of equilibria: a belief set for
each context that is acceptable for its knowledge base augmented by
the heads of its applicable bridge rules.
      </p>
      <p>
        More recently, the so-called managed MCSs (mMCSs) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
addressed a limitation of MCSs in the way they integrate knowledge
between contexts. Instead of simply adding the head of an applicable
bridge rule to the context’s knowledge base, which could cause some
inconsistency, mMCSs allow for operations other than addition, such
as, for instance, revision and deletion, hence dealing with the
problem of consistency management within contexts.
      </p>
      <p>Dynamics The second problem stems from the shift from static
knowledge-based systems that assume a one-shot computation,
usually triggered by a user query, to open and dynamic scenarios where
there is a need to react and evolve in the presence of incoming
information.</p>
      <p>Indeed, traditional knowledge-based systems – including the
different variants of MCSs mentioned above – focus entirely on static
situations, which is the right thing for applications such as for
instance expert systems, configuration or planning problems, where the
available background knowledge changes rather slowly, if at all, and
where all that is needed is the solution of a new instance of a known
problem. However, the new kinds of applications we consider are
becoming more and more important, and these require continuous
online reasoning, including observing and reacting to events.</p>
      <p>
        There are some examples of systems developed with the purpose
of reacting to streams of incoming information, such as Reactive
ASP [
        <xref ref-type="bibr" rid="ref18 ref19">19, 18</xref>
        ], C-SPARQL [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], Ontology Streams [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] and ETALIS
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], to name only a few. However, they are very limited in the kind
of knowledge that can be represented, and the kind of reasoning
allowed, hence unsuitable to address the requirements of the
applications we envision, such as those that need to integrate heterogeneous
knowledge bases. Additionally, reacting to the streams of incoming
information is only part of the dynamic requirements of our
applications. In many cases, the incoming information is processed only
once, perhaps requiring complex reasoning using various knowledge
bases to infer the right way to react, and does not have to be dealt
with again – e.g., concluding that nothing needs to be done after
determining that the tachycardia is caused by the decongestant recently
taken by Dave. In other cases, it is important that these observations
not only influence the current reaction of the system – do nothing
in the previous example – but, at the same time, be able to change
the knowledge bases in a more permanent way, i.e., allowing for the
internalization of knowledge. For example, relevant observations
regarding Dave’s health status should be added to his medical records,
such as for example that he had an episode of tachycardia caused by
a decongestant, and, in the future, maybe even revise such episode if
it is found that Dave had forgotten to take the decongestant after all.
Other more sophisticated changes in the knowledge bases include,
for example, an update to the biomedical health ontology whenever
new treatments are found, the revision of the policy rules whenever
some exceptions are found, etc. EVOLP [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] extends logic
programming under answer set semantics with the possibility to specify its
evolution, through successive updates, in reaction to external
observations. It is nevertheless limited to a single knowledge
representation formalism and to a single operation (update).
      </p>
      <p>In this paper, we aim to address these challenges. We develop a
system that allows us to integrate heterogeneous knowledge bases
with streams of incoming information and to use them for
continuous online reasoning, reacting, and evolving the knowledge bases by
internalizing relevant knowledge. To this end, we introduce reactive
Multi-Context Systems (rMCSs). These systems build upon mMCSs
and thus provide their functionality for integrating heterogeneous
knowledge sources, admitting also relevant operations on knowledge
bases. In addition, rMCSs can handle continuous streams of input
data. Equilibria remain the fundamental underlying semantic notion,
but the focus now lies on the dynamic evolution of the systems. In a
nutshell, given an initial configuration of knowledge bases, that is, an
initial knowledge base for each context, a specific input stream will
lead to a corresponding stream of equilibria, generated by respective
updates of the knowledge bases. Contrary to standard MCSs which
possess only one type of bridge rules modeling the information flow
which needs to be taken into account when equilibria are computed
(or the operations that need to be applied in case of mMCSs), rMCSs
have an additional, different type of bridge rules, distinguished by the
occurrence of the operator next in the head. These rules are used to
specify how the configuration of knowledge bases evolves whenever
an equilibrium was computed.</p>
      <p>
        The reactive Multi-Context Systems (rMCSs) presented here
combine and unify the two adaptations of multi-context systems for
dynamic environments in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], independently developed by
different subsets of the authors. The approach presented here
generalizes these earlier approaches and substantially improves on the
presentation of the underlying concepts.
      </p>
      <p>The occurrence of inconsistencies within frameworks that aim at
integrating knowledge from different sources cannot be neglected,
even more so in dynamic settings where knowledge changes over
time. Even with the power of management operations that allow the
specification of e.g. belief revision operations, many reasons remain
why rMCSs may fail to have an equilibria stream, traceable to
individual contexts, their interaction through the bridge rules, or their
interaction with the input streams, which can render the entire system
useless. In this paper, we will address the problem of inexistent
equilibria streams, also known as global inconsistency, following
different strategies, such as repairing the rMCS, or even relaxing the notion
of equilibria stream so that it can go through inconsistent states.</p>
      <p>The paper is organized as follows. In Section 2, we introduce
reactive MCSs, our framework for reactive reasoning in the presence
of heterogeneous knowledge sources. In particular, we show how to
integrate data streams into mMCSs and how to model the
dynamics of our systems, based on two types of bridge rules. Reasoning
based on multiple knowledge sources that need to be integrated faces
the problem of potential inconsistencies. Section 3 discusses various
methods for handling inconsistencies, with a special focus on
nonexistence of equilibria. We conclude and point out future directions
of work in Section 4.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Reactive Multi-Context Systems</title>
      <p>
        Reactive multi-context systems (rMCSs) make use of basic ideas
from managed multi-context systems (mMCSs) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] which extend
multi-context systems (MCSs) as defined by Brewka and Eiter [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
by management capabilities. In particular, similar to mMCSs, we
will make use of a management function and bridge rules that
allow for conflict resolution between contexts as well as a fine-grained
declarative specification of the information flow between contexts.
To not unnecessarily burden the reader with repetetive material on
these common components, we abstain from recalling the details of
mMCSs first. It will be clear from the presentation when new
concepts/ideas specific to rMCSs will be presented.
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Specifying the Components of an rMCS</title>
      <p>Similar as for previous notions of MCSs, we build on an abstract
notion of a logic, which is a triple L = hKB ; BS ; acci, where KB
is the set of admissible knowledge bases of L, which are sets whose
elements are called knowledge base formulas; BS is the set of
possible belief sets, where elements in belief sets are called beliefs; and
acc : KB ! 2BS is a function describing the semantics of L by
assigning to each knowledge base a set of acceptable belief sets.3
Example 1 We illustrate how different formalisms can be
represented by the notion of a logic. The logics presented below will serve
as blueprints for the logics we use in examples throughout the
paper. First, consider the case of classical propositional logic. Given
a propositional signature , we denote by F the set of all
wellformed propositional formulas over . To represent entailment in
classical propositional logic over signature , we consider the logic
Lp = hKB p; BS p; accpi, such that the admissible knowledge bases
are given by the set KB p = 2F . Since propositional logic aims at
modeling ideal rational reasoning, we identify the set of possible
belief sets BS p with the set of deductively closed sets of formulas over
. Finally, accp maps every kb 2 KB p to fEg, where E is the set
of formulas entailed by kb.</p>
      <p>
        Quite similar in spirit are description logics (DLs) as (commonly
decidable) fragments of first-order logic [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Given a DL language
L, we consider the logic Ld = hKB d; BS d; accdi where KB d is
the set of all well-formed DL knowledge bases over L, also called
3 To ease readability, throughout the paper, we will often use the following
convention when writing symbols: single entities are lower-case, while sets
of entities and structures with different components are upper-case; in
addition, sequences of those are indicated in sans serif, while notions with
a temporal dimension are written in calligraphic letters (only upper-case,
such as S or I); finally, operators and functions are bold.
ontologies, BS d is the set of deductively closed subsets of L, and
accd maps every kb 2 KB d to fEg, where E is the set of formulas
in L entailed by kb.
      </p>
      <p>
        As an example for a non-deterministic formalism, consider logic
programs under the answer set semantics [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. Given a set of
ground, i.e., variable-free, atoms A, we consider the logic La =
hKB a; BS a; accai, such that KB a is the set of all logic programs
over A. The set of possible belief sets is given by the set BS a = 2A
of possible answer sets and the function acca maps every logic
program to the set of its answer sets.
      </p>
      <p>Given a set E of entries, a simple logic for storing elements from
E can be realized by the logic Ls = hKB s; BS s; accsi, such that
KB s = BS s = 2E , and accs maps every set E0 E to fE0g.
Such Ls can, e.g., be used to represent a simple database logic. We
will call a logic of this type a storage logic.</p>
      <p>
        In addition to a logic that captures language and semantics of a
formalism to be integrated in an rMCS, a context also describes how
a knowledge base belonging to the logic can be manipulated. To this
end, we make use of a management function similar as in managed
multi-context systems [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>Definition 1 (Context) A context is a triple C = hL; OP ; mngi
where</p>
      <p>L = hKB ; BS ; acci is a logic,
OP is a set of operations,
mng : 2OP KB ! KB is a management function.</p>
      <p>
        For an indexed context Ci we will write Li = hKB i; BS i; accii,
OP i, and mngi to denote its components. Note that we leave the
exact nature of the operations in OP unspecified. They can be seen as
mere labels that determine how the management function should
manipulate the knowledge base: we use subsets OP 0 of OP as the first
argument of the management function that maps a knowledge base
to an updated version depending on the presence or absence of
operations in OP 0. Thus, it is the management function that implements
the semantics of the operations. We use a deterministic management
function rather than a non-deterministic one as used in mMCS [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Note that it is straightforward to adapt our definitions to use
nondeterministic management functions as well. However, as they are
not essential to our approach, we here refrain from doing so to keep
notation simpler.
      </p>
      <p>Example 2 Consider the assisted living scenario from the
Introduction and remember that we target a system that recognizes potential
threats caused by overheating of the stove in Dave’s kitchen. We use
the context Cst to monitor the stove. Its logic Lst is a storage logic
taking E = fpw; tm(cold ); tm(hot )g as the set of entries,
representing the stove’s power status (on if pw is present, and off
otherwise) and a qualitative value for its temperature (cold/hot). At all
times, the current temperature and power state of the stove should be
stored in a knowledge base over Lst. Thus, the context provides the
operations</p>
      <p>OP st = fsetPower(o ); setPower(on);</p>
      <p>setTemp(cold ); setTemp(hot )g
to update the information in the knowledge base.</p>
      <p>Before defining the management function we need to clarify what
we want this function to achieve. We assume the existence of a single
temperature sensor constantly providing a measurement which
triggers exactly one of the setTemp operations. For this reason, there is
no need for the management function to care about persistence of the
temperature value, or about conflicting information. The power
information, on the other hand, is based on someone toggling a switch,
so we definitely need persistence of the fluent pw.</p>
      <p>The semantics of the operations is thus given, for OP 0 OP st,
by the management function mngst(OP 0; kb) =
fpw j setPower(on) 2 OP 0_</p>
      <p>(pw 2 kb ^ setPower(o ) 62 OP 0)g[
ftm(t ) jsetTemp(t ) 2 OP 0g:
As discussed above, the function simply inserts the current
qualitative temperature value. For the power, it ensures that the stove is
considered on whenever it is switched on, and also when it is not
being switched off and already considered on in the given
knowledge base kb. The second alternative implements persistence. Note
that whenever both conflicting setPower operations are in OP 0,
setPower(on) “wins”, that is, pw will be in the knowledge base.
This is justified by the application: the damage of, say, unnecessarily
turning off the electricity is a lot smaller than that of overlooking a
potential overheating of the stove.</p>
      <p>Assume we have a knowledge base kb = ftm(cold )g. Then, an
update with the set OP = fsetPower(on); setTemp(hot )g of
operations would result in the knowledge base mngst(OP ; kb) =
fpw; tm(hot )g.</p>
      <p>Contexts exchange information by manipulating their associated
knowledge bases using the management function. The central
device for that is given by bridge rules that are rules similar in spirit
to those in logic programming and that determine which operations
from OP i to apply to kbi in a context Ci. In this work, we are
interested in systems composed of contexts whose behavior may not only
depend on other contexts, but also on input from the outside. Like
communication between contexts, also external information is
incorporated by means of bridge rules. To keep the approach as abstract
as possible, all we require is that inputs are elements of some
formal input language IL. Moreover, we allow for situations where
input comes from different sources with potentially different input
languages and thus consider tuples hIL1; : : : ; ILki of input languages.
Definition 2 (Bridge Rule) Let C = hC1; : : : ; Cni be a tuple of
contexts and IL = hIL1; : : : ; ILki a tuple of input languages. A
bridge rule for Ci over C and IL, i 2 f1; : : : ; ng, is of the form
op
a1; : : : ; aj ; not aj+1; : : : ; not am
(1)
such that op = op or op = next(op) for op 2 OP i, j 2
f0; : : : ; mg, and every atom a`, ` 2 f1; : : : ; mg, is one of the
following:
a context atom c:b with c 2 f1; : : : ; ng and b 2 B for some B 2
BS c, or
an input atom s::b with s 2 f1; : : : ; kg and b 2 ILs.</p>
      <p>For a bridge rule r of the form (1) hd(r) denotes op, the head of r,
while bd(r) = fa1; : : : ; aj ; not aj+1; : : : ; not amg is the body of
r. A literal is either an atom or the default negation of an atom, and
we also differentiate between context literals and input literals.
Roughly, a set of bridge rules for Ci describes which operations
to apply to its knowledge base kbi depending on whether currently
available beliefs and external inputs match the literals in the body. We
define and discuss their precise semantics later in Section 2.2. Bridge
rules can be seen as the glue that binds the contexts in an rMCS
together. Thus, we are now ready to define reactive multi-context
systems.</p>
      <sec id="sec-3-1">
        <title>Definition 3 (Reactive Multi-Context System) A reactive Multi</title>
        <p>Context System (rMCS) is a tuple M = hC; IL; BRi, where
C = hC1; : : : ; Cni is a tuple of contexts;
IL = hIL1; : : : ; ILki is a tuple of input languages;
BR = hBR1; : : : ; BRni is a tuple such that each BRi, i 2
f1; : : : ; ng, is a set of bridge rules for Ci over C and IL.
Example 3 We continue by using context Cst from Example 2 as
the single context of the rMCS Mex3 = hhCsti; hILex3i; hBRex3ii.4
The input language ILex3 = fswitchg is used to report whether the
switch for changing the power state of the stove has been turned. The
bridge rules in BRex3 are given by
next(setPower(on))</p>
        <p>ex3::switch; not st:pw:
next(setPower(o ))
ex3::switch; st:pw:
and react to switching the stove on or off: depending on the current
power state of the stove that is stored in a knowledge base associated
to Cst, whenever the switch is activated, the bridge rules derive an
update of the knowledge base where the power state is reversed.
2.2</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Reacting to External Inputs - Semantics of rMCSs</title>
      <p>To define the semantics of rMCSs, we first focus on the static case
of a single time instant, and only subsequently introduce the
corresponding dynamic notions for reacting to inputs changing over time.</p>
      <p>We start with the evaluation of bridge rules, for which we need to
know current beliefs and current external information. The former is
captured by the notion of a belief state denoted by a tuple of belief
sets – one for each context – similar as in previous work on
multicontext systems.</p>
      <p>Definition 4 (Belief State) Let M = hhC1; : : : ; Cni; IL; BRi be an
rMCS. Then, a belief state for M is a tuple B = hB1; : : : ; Bni such
that Bi 2 BS i, for each i 2 f1; : : : ; ng. We use BelM to denote the
set of all beliefs states for M .</p>
      <p>In addition, to also capture the current external information, we
introduce the notion of an input.</p>
      <p>Definition 5 (Input) Let M = hC; hIL1; : : : ; ILki; BRi be an
rMCS. Then an input for M is a tuple I = hI1; : : : ; Iki such that
Ii ILi, i 2 f1; : : : ; kg. The set of all inputs for M is denoted by
InM .</p>
      <p>We are now ready to define when literals (in bridge rule bodies)
are satisfied.</p>
      <p>Definition 6 (Satisfaction of Literals) Let M = hC; IL; BRi be an
rMCS such that C = hC1; : : : ; Cni and IL = hIL1; : : : ; ILki.
Given an input I = hI1; : : : ; Iki for M and a belief state B =
hB1; : : : ; Bni for M , we define the satisfaction of literals given I
and B as:
hI; Bi j= a` if a` is of the form c:b and b 2 Bc;
hI; Bi j= a` if a` is of the form s::b and b 2 Is;
hI; Bi j= not a` if hI; Bi 6j= a`.</p>
      <p>Let r be a bridge rule for Ci over C and IL. Then
4 Throughout the paper we sometimes use labels (such as st in Cst) instead
of numerical indices in our examples.</p>
      <p>hI; Bi j= bd(r) if hI; Bi j= l for every l 2 bd(r).</p>
      <p>If hI; Bi j= bd(r), we say that r is applicable under I and B. The
operations encoded in the heads of applicable bridge rules in an rMCS
determine which knowledge base updates should take place. We
collect them in two disjoint sets.</p>
      <p>Definition 7 (Applicable Bridge Rules) Let M = hC; IL; BRi be
an rMCS such that C = hC1; : : : ; Cni and BR = hBR1; : : : ; BRni.
Given an input I for M and a belief state B for M , we define, for each
i 2 f1; : : : ; ng, the sets
appinow(I; B) = fhd(r) j r 2 BRi; hI; Bi j= bd(r); hd(r) 2
OP ig;
appinext(I; B) = fop j r 2 BRi; hI; Bi j= bd(r); hd(r) =
next(op)g.</p>
      <p>Intuitively, the operations in appinow(I; B) are used for computing
temporary changes that influence the semantics of an rMCS for a
single point in time. The operations in appinext(I; B) on the other
hand are used for changing knowledge bases over time. They are not
used for computing the current semantics but are applied in the next
point in time depending on the current semantics. This continuous
change of knowledge bases over time is the reason why, unlike in
previous work on MCSs, we do not consider knowledge bases as
part of the contexts to which they are associated but store them in a
separate configuration structure defined next.</p>
      <sec id="sec-4-1">
        <title>Definition 8 (Configuration of Knowledge Bases) Let</title>
        <p>M = hC; IL; BRi be an rMCS such that C = hC1; : : : ; Cni. A
configuration of knowledge bases for M is a tuple KB = hkb1; : : : ; kbni
such that kbi 2 KB i, for each i 2 f1; : : : ; ng. We use ConM to
denote the set of all configurations of knowledge bases for M .</p>
        <p>The semantics of an rMCS for a single time instant is given in
terms of its equilibria.</p>
        <p>Definition 9 (Equilibrium) Let M = hhC1; : : : ; Cni; IL; BRi be
an rMCS, KB = hkb1; : : : ; kbni a configuration of knowledge bases
for M , and I an input for M . Then, a belief state B = hB1; : : : ; Bni
for M is an equilibrium of M given KB and I if, for each i 2
f1; : : : ; ng, we have that</p>
        <p>Bi 2 acci(kb0); where kb0 = mngi(appinow(I; B); kbi):
Example 4 Consider rMCS Mex3 from Example 3 and the
configuration KB = hkbsti of knowledge bases for Mex3 with kbst = ;,
representing that the stove is turned off. Moreover, consider the
input I = hfswitchgi for Mex3 and the belief state B = h;i for
Mex3. As both bridge rules in BRex3 use the next operator, we
have appsntow(I; B) = ; and consequently, following the
definition of the management function mngst in Example 2, kbst
remains unchanged, i.e., mngst(appsntow(I; B); kbst) = kbst. Thus,
accst(mngst(appsntow(I; B); kbst)) = f;g. It follows that B is an
equilibrium of Mex3 given KB and I.</p>
        <p>Based on an equilibrium at the current time instant, we can
compute an updated configuration of knowledge bases using the update
function as introduced in the following.</p>
        <p>Definition 10 (Update Function) Let M = hC; IL; BRi be an
rMCS such that C = hC1; : : : ; Cni, KB = hkb1; : : : ; kbni a
configuration of knowledge bases for M , I an input for M , and
B a belief state for M . Then, the update function for M is
defined as updM (KB; I; B) = hkb01; : : : ; kb0ni, such that, for each
i 2 f1 : : : ; ng, kb0i = mngi(appinext(I; B); kbi).</p>
        <p>With all this in place, we can finally show how an rMCS behaves
in the presence of external information that changes over time. For
this purpose, we assume that an rMCS receives data in a stream of
inputs, i.e., an input for each time instant, and we represent individual
time instants by natural numbers. These can be interpreted as logical
time instants that do not necessarily represent specific physical time
points. In particular, we do not assume that every pair of consecutive
natural numbers represents equidistant physical time spans.
Definition 11 (Input Stream) Let M = hC; IL; BRi be an rMCS
such that IL = hIL1; : : : ; ILki. An input stream for M (until ) is a
function I : [1:: ] ! InM where 2 N [ f1g.</p>
        <p>We will conveniently omit the term “until ” whenever the limit of
the stream is irrelevant. Conversely, we will provide an explicit ,
when we are only interested in the first time instants or when we
want to state that the input stream is infinite (in case = 1). Clearly,
an input stream for M until also fully determines an input stream
for M until 0 for every 1 0 &lt; .</p>
        <p>For any stream, we commonly represent the functional notation by
a superscript, e.g., given an input stream I and t 2 [1:: ], we will
use It to denote I(t), i.e., the input hI1; : : : ; Iki for M at time t. We
also term stream the restriction of an input stream I to a single input
language ILi, which can be understood as a function Ii : [1:: ] !
2ILi that is fully determined by I.</p>
        <p>Note that It encapsulates (input) data for every input language of
M . Hence, we assume that, at every time instant, we have
information from every external source of the rMCS. This synchronous
approach is required since the evaluation of a bridge rule may depend
on the availability of information from multiple streams. One
possibility for modeling external sources that do not continuously provide
information is setting Ist to the empty set for representing a lack of
input from the source with language ILs at time t.</p>
        <p>The semantics of an rMCS over time is given by its equilibria
streams for a given initial configuration of knowledge bases and an
input stream for the system.</p>
        <p>Definition 12 (Equilibria Stream) Let M = hC; IL; BRi be an
rMCS, KB a configuration of knowledge bases for M , and I an
input stream for M until where 2 N [ f1g. Then, an equilibria
stream of M given KB and I is a function B : [1:: ] ! BelM such
that</p>
        <p>Bt is an equilibrium of M given KBt and It, where KBt is
inductively defined as</p>
        <p>We will also refer to the function KB : [1:: ] ! ConM as the
configurations stream of M given KB, I, and B.</p>
        <p>Note that the limit of an equilibria stream is aligned with that of
the given input stream. Following the definition, it is easy to see that
if we have an equilibria stream B of M given KB and I, then the
substream of B of size 0, with 0 , is an equilibria stream of
M given KB and I0, where I0 is the substream of I of size 0. This
implies that, conversely, each extension of the input stream can only
lead to equilibria streams that extend those obtained given the
original input stream.</p>
        <p>Example 5 Reconsider rMCS Mex3, KB, and B from Example 4, as
well as an input stream I until 3 with I1 = hfswitchgi, I2 = h;i,
and I3 = hfswitchgi. There is an equilibria stream B of Mex3
given KB and I. Note that the input I1 coincides with input I from
Example 4. As B is the only equilibrium of Mex3 given KB and I, we
have that B1 = B.</p>
        <p>As we have appsntext(I; B) = fsetPower(on)g, the update
function provides the following configuration of knowledge bases for time
instant 2 (with KB1 = KB):</p>
        <p>KB2 = updMex3 (KB1; I1; B1) =</p>
        <p>= hmngst(appsntext(I; B); kb)i = hfpwgi:
Thus, switching the power state at time 1 leads to an updated
knowledge base indicating that the stove is on at time 2. The table
in Fig. 1 summarizes the equilibria stream and the configurations
stream given KB and I. Note that, due to the choice of logic and
since all bridge rules use the next operator, equilibria necessarily
coincide with the corresponding knowledge base at each time step.
The occurrence of inconsistencies within frameworks that aim at
integrating knowledge from different sources cannot be neglected, even
more so in dynamic settings where knowledge changes over time.
There are many reasons why rMCSs may fail to have an equilibria
stream. These include the absence of an acceptable belief set for one
of its contexts given its current knowledge base at some point in time,
some occurring conflict between the operations in the heads of bridge
rules, or simply because the input stream is such that the
configuration of the flow of information within the rMCS, namely its bridge
rules, prevent the existence of such an equilibria stream. In a real
world situation, an rMCS without an equilibria stream is essentially
useless. Not only can it not be used at the first time point equilibria
ceased to exist, but it also cannot recover, even if what caused the
problem was the particular input at that time point, which is bound
to subsequently change into some other input that would no longer
cause any trouble. This is so because an equilibria stream requires
the existence of an equilibrium at every time point.</p>
        <p>In this section, we address the problem of inexistent equilibria
streams, also known as global inconsistency. We begin by defining a
notion of coherence associated with individual contexts which allows
us to first establish sufficient conditions for the existence of
equilibria streams, and then abstract away from problems due to specific
incoherent contexts and focus on those problems essentially caused
by the way the flow of information in rMCSs is organized through
its bridge rules. We introduce the notion of a repair, which
modifies an rMCS by changing its bridge rules at some particular point
in time in order to obtain some equilibria stream, which we dub
repaired equilibria stream. We establish sufficient conditions for the
existence of repaired equilibria streams and briefly discuss different
possible strategies to define such repairs. However, repaired
equilibria streams may not always exist either, e.g., because some particular
context is incoherent. To deal with such situations, we relax the
concept of equilibria stream and introduce the notion of partial
equilibria stream, which essentially allows the non-existences of equilibria
at some time points. It turns out that partial equilibria streams always
exist thus solving the problem of global inconsistency for rMCSs.</p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] the authors addressed the problem of global inconsistency
in the context of mMCSs. Just as we do here, they begin by
establishing sufficient conditions for the existence of equilibria. Then, they
define the notions of diagnosis and explanation, the former
corresponding to rules that need to be altered to restore consistency, and
the latter corresponding to combinations of rules that cause
inconsistency. These two notions turn out to be dual of each other, and
somehow correspond to our notion of repair, the main difference being
that, unlike in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], we opt not to allow the (non-standard)
strengthening of bridge-rule to restore consistency, and, of course, that fact that
our repairs need to take into account the dynamic nature of rMCSs.
        </p>
        <p>We start by introducing two notions of global consistency differing
only on whether we consider a particular input stream or all possible
input streams.</p>
        <p>Definition 13 Let M be an rMCS, KB a configuration of knowledge
bases for M , and I an input stream for M . Then, M is consistent
with respect to KB and I if there exists an equilibria stream of M
given KB and I. M is strongly consistent with respect to KB if, for
every input stream I for M , M is consistent with respect to KB and
I.</p>
        <p>Obviously, for a fixed configuration of knowledge bases, strong
consistency implies consistency w.r.t. any input stream, but not
viceversa.</p>
        <p>Unfortunately, verifying strong consistency is in general highly
complex since it requires checking all possible equilibria streams.
Nevertheless, we can establish conditions that ensure that an rMCS
M is strongly consistent with respect to a given configuration of
knowledge bases KB, hence guaranteeing the existence of an
equilibria stream independently of the input. It is based on two notions –
totally coherent contexts and acyclic rMCSs – that together are
sufficient to ensure (strong) consistency.</p>
        <p>Total coherence imposes that each knowledge base of a context
always has at least one acceptable belief set.</p>
        <p>Definition 14 A context Ci is totally coherent if acci(kb) 6= ;, for
every kb 2 KB i.</p>
        <p>The second notion describes cycles between contexts which may
be a cause of inconsistency. Acyclic rMCSs are those whose bridge
rules have no cycles.</p>
        <p>Definition 15 Given an rMCS M = hhC1; : : : ; Cni; IL; BRi, /M
is the binary relation over contexts of M such that (Ci; Cj ) 2 /M
if there is a bridge rule r 2 BRi and j:b 2 bd(r) for some b. If
(Ci; Cj ) 2 /M , also denoted by Ci /M Cj , we say that Ci depends
on Cj in M , dropping the reference to M whenever unambiguous.
Definition 16 An rMCS M is acyclic if the transitive closure of /M
is irreflexive.</p>
        <p>We can show that these two conditions together are indeed
sufficient to ensure strong consistency.</p>
        <p>Proposition 1 Let M = hhC1; : : : ; Cni; IL; BRi be an acyclic
rMCS such that every Ci, 1 i n, is totally coherent, and KB a
configuration of knowledge bases for M . Then, M is strongly
consistent with respect to KB.</p>
        <p>A similar property holds for consistent mMCSs, which indicates
that the extension to rMCSs as such does not decrease the likelihood
of existence of an equilibria stream. Nevertheless, these conditions
are rather restrictive since there are many useful cyclic rMCSs which
only under some particular configurations of knowledge bases and
input streams may have no equilibria streams.</p>
        <p>To deal with these, and recover an equilibria stream, one
possibility is to repair the rMCSs by locally, and selectively, eliminating
some of its bridge rules. Towards introducing the notion of repair,
given an rMCS M = hhC1; : : : ; Cni; IL; BRi, we denote by brM
the set of all bridge rules of M , i.e., brM = S1 i n BRi.
Moreover, given a set R brM , denote by M [R] the rMCS obtained
from M by restricting the bridge rules to those not in R.
Definition 17 (Repair) Let M = hC; IL; BRi be an rMCS, KB a
configuration of knowledge bases for M , and I an input stream for
M until where 2 N [ f1g. Then, a repair for M given KB and
I is a function R : [1:: ] ! 2brM such that there exists a function
B : [1:: ] ! BelM such that</p>
        <p>Bt is an equilibrium of M [Rt] given KBt and It, where KBt is
inductively defined as</p>
        <p>Note the generality of this notion, which considers to be a
repair essentially any sequence of bridge rules (defined by the repair
function R) that, if removed from the rMCS at their corresponding
time point, will allow for an equilibrium at that time point. This may
include repairs that unnecessarily eliminate some bridge rules, and
even the empty repair i.e. the repair R; such that Rt; = ; for
every t, whenever M already has an equilibria stream given KB and I.
This ensures that the set of repaired equilibria streams properly
extends the set of equilibria streams, since equilibria streams coincide
with repaired equilibria streams given the empty repair.</p>
        <p>Proposition 2 Every equilibria stream of M given KB and I is a
repaired equilibria stream of M given KB, I and the empty repair</p>
        <p>It turns out that for rMCSs composed of totally coherent contexts,
repaired equilibria streams always exist.</p>
        <p>Proposition 3 Let M = hhC1; : : : ; Cni; IL; BRi be an rMCS such
that each Ci, i 2 f1; : : : ; ng, is totally coherent, KB a configuration
of knowledge bases for M , and I an input stream for M until .
Then, there exists R : [1:: ] ! 2brM and B : [1:: ] ! BelM such
that B is a repaired equilibria stream given KB, I and R.</p>
        <p>
          Whenever repair operations are considered in the literature, e.g.,
in the context of databases [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], there is a special emphasis on seeking
repairs that are somehow minimal, the rational being that we want to
change things as little as possible to regain consistency. In the case
of repairs of rMCS, it is easy to establish an order relation between
them, based on a comparison of the bridge rules to be deleted at each
time point.
        </p>
        <p>Definition 18 Let Ra and Rb be two repairs for some rMCS M
given a configuration of knowledge bases for M , KB and I, an input
stream for M until . We say that Ra Rb if Ria Rib for every
i , and that Ra &lt; Rb if Ra Rb and Ria Rib for some
i .</p>
        <p>This relation can be straightforwardly used to check whether a
repair is minimal, and we can restrict ourselves to adopting minimal
repairs. However, there may be good reasons to adopt non-minimal
repairs, e.g., so that they can be determined as we go, or so that deleted
bridge rules are not reinstated, etc. Even though investigating specific
types of repairs falls outside the scope of this paper, we nevertheless
present and briefly discuss some possibilities.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Definition 19 (Types of Repairs) Let R be a repair for some rMCS</title>
      <p>M given KB and I. We say that R is a:
Minimal Repair if there is no repair Ra for M given KB and I
such that Ra &lt; R.</p>
      <p>Global Repair if Ri = Rj for every i; j .</p>
      <p>Minimal Global Repair if R is global and there is no global repair</p>
      <p>Ra for M given KB and I such that Ra &lt; R.</p>
      <p>Incremental Repair if Ri Rj for every i j .
Minimally Incremental Repair if R is incremental and there is no
incremental repair Ra and j such that Ria Ri for every
i j.</p>
      <p>
        Minimal repairs perhaps correspond to the ideal situation in the
sense that they never unnecessarily remove bridge rules. In some
circumstances, it may be the case that if a bridge rule is somehow
involved in some inconsistency, it should not be used at any time
point, leading to the notion of global repair. Given the set of all
repairs, checking which are global is also obviously less complex than
checking which are minimal. A further refinement – minimal global
repairs – would be to only consider repairs that are minimal among
the global ones, which would be much simpler to check than
checking whether it is simply minimal. Note that a minimal global repair
is not necessarily a minimal repair. One of the problems with these
types of repairs is that we can only globally check whether they are
of that type, i.e., we can only check once we know the entire
input stream I. This was not the case with plain repairs, as defined in
Def. 17, which could be checked as we go, i.e., we can determine
what bridge rules to include in the repair at a particular time point
by having access to the input stream I up to that time point only.
This is important so that rMCSs can be used to effectively react to
their environment. The last two types of repairs defined above allow
for just that. Incremental repairs essentially impose that removed
bridge rules cannot be reused in the future, i.e., that the set of
removed bridge rules monotonically grows with time, while minimally
incremental repairs further impose that only minimal sets of bridge
rules can be added at each time point. Other types of repairs could
be defined, e.g., by defining some priority relation between bridge
rules, some distance measure between subsets of bridge rules and
minimize it when considering the repair at consecutive time points,
among many other options, whose investigation we leave for future
work. Repairs could also be extended to allow for the
strengthening of bridge rules, besides their elimination, generalizing ideas from
[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] where the extreme case of eliminating the entire body of
bridge rules as part of a repair is considered.
      </p>
      <p>Despite the existence of repaired equilibria streams for large
classes of systems, two problems remain: first, computing a repair
may be excessively complex, and second, there remain situations
where no repaired equilibria stream exists, namely when the rMCS
contains contexts that are not totally coherent. The second issue
could be dealt with by ensuring that for each non-totally coherent
context there would be some bridge rule with a management
operation in its head that would always restore consistency of the context,
and that such rule could always be activated through a repair (for
example, by adding a negated reserved atom to its body, and another
bridge rule with that atom in its head and an empty body, so that
removing this latter rule through a repair would activate the
management function and restore consistency of the context). But this would
require special care in the way the system is specified, and its analysis
would require a very complex analysis of the entire system including
the specific behavior of management functions. In practice, it would
be quite hard – close to impossible in general – to ensure the
existence of repaired equilibria streams, and we would still be faced with
the first problem, that of the complexity of determining the repairs.</p>
      <p>A solution to this problem is to relax the notion of equilibria
stream so that it does not require an equilibrium at every time point.
This way, if no equilibrium exists at some time point, the equilibria
stream would be undefined at that point, but possibly defined again in
subsequent time points. This leads to the following notion of partial
equilibria stream.</p>
      <p>Definition 20 (Partial Equilibria Stream) Let M = hC; IL; BRi
be an rMCS, KB a configuration of knowledge bases for M , and
I an input stream for M until where 2 N [ f1g. Then, a
partial equilibria stream of M given KB and I is a partial function
B : [1:: ] 9 BelM such that</p>
      <p>Bt is an equilibrium of M given KBt and It, where KBt is
inductively defined as
– KB1 = KB
– KBt+1 = (uKpBdt;M (KBt; It; Bt); iofthBetrwisinseo:t undefined:
or Bt is undefined.</p>
      <p>As expected, this is a proper generalisation of the notion of
equilibria stream:
Proposition 4 Every equilibria stream of M given KB and I is a
partial equilibria stream of M given KB and I</p>
      <p>And it turns out that partial equilibria streams always exist.
Proposition 5 Let M be an rMCS, KB a configuration of knowledge
bases for M , and I an input stream for M until . Then, there exists
B : [1:: ] 9 BelM such that B is a partial equilibria stream given
KB and I.</p>
      <p>One final word to note is that partial equilibria streams not only
allow us to deal with situations where equilibria do not exist at some
time instants, but they also open the ground to consider other kinds
of situations where we do not wish to consider equilibria at some
time point, for example because we were not able to compute them
on time, or simply because we do not wish to process the input at
every time point, e.g., whenever we just wish to sample the input with
a lower frequency than it is generated. If we wish to restrict that
partial equilibria streams only relax equilibria streams when necessary,
i.e., when equilibria do not exist at some time point, we can further
impose the following condition on Def. 20:
Bt is undefined ) there is no equilibrium of M given KBt and It:
4</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>
        In this paper, we introduced reactive Multi-Context Systems (rMCSs),
a combination and unification of the two adaptations of multi-context
systems for dynamic environments in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], which
generalizes and substantially improves on the presentation of the underlying
concepts of these earlier approaches. Building upon mMCSs, rMCSs
inherit their functionality for integrating heterogeneous knowledge
sources, admitting also relevant operations on knowledge bases. In
addition, rMCSs can handle continuous streams of input data.
Equilibria remain the fundamental underlying semantic notion, but the
focus now lies on the dynamic evolution of the systems.
      </p>
      <p>Since we cannot ignore the possibility that inconsistencies may
occur, which result in the absence of equilibria at certain time points
ultimately rendering the entire system useless, we addressed this
problem first by showing sufficient conditions on the contexts and the
bridge rules that ensure the existence of an equilibria stream. In the
cases where these conditions are not met, we presented two possible
solutions, one following an approach based on repairs – essentially
the selective removal of bridge rules to regain an equilibria stream
– and a second by relaxing the notion of equilibria stream to ensure
that intermediate inconsistent states can be recovered from.</p>
      <p>There is much more to be done with respect to rMCSs, some of
which we are already working on.</p>
      <p>
        Nondeterminism is inherent to rMCSs due to, e.g., the flow of
information between contexts established by bridge rules. This can be
overcome by introducing preferences on equilibria using, e.g.,
preference functions as proposed in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], or simply by preferring equilibria
that represent minimal change between states, as proposed in [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ].
One might also adopt language constructs for expressing preferences
in ASP such as optimization statements [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] or weak constraints [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
which essentially assign a quality measure to equilibria. One way of
avoiding nondeterminism is by applying an alternative, skeptical
semantics – the well-founded semantics – along the lines of what was
proposed in [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ].
      </p>
      <p>
        An alternative to deal with inconsistent states is to follow a
paraconsistent approach, as proposed for hybrid knowledge bases in
[
        <xref ref-type="bibr" rid="ref16 ref26">16, 26</xref>
        ]. Also, just as with EVOLP [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and explored in [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ], we could
allow the bridge rules to change with time, strengthening the
evolving and adaptation capabilities of rMCSs.
      </p>
      <p>
        Finally, we need to compare our system with related work,
including two of the most relevant approaches w.r.t. stream
reasoning, namely LARS (Logic-based framework for Analyzing
Reasoning over Streams) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and STARQL [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ]. Additionally, in [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]
the authors defined Asynchronous MCSs (aMCSs) a framework for
loosely coupling knowledge representation formalisms. Contrarily
to rMCSs, the semantics is not defined in terms of equilibria but
instead an asynchronous semantics is defined assuming that every
context delivers output whenever available. Establishing bridges
between both systems would also shed new light into the
synchronization problems associated with combining dynamic knowledge bases.
      </p>
    </sec>
    <sec id="sec-7">
      <title>ACKNOWLEDGEMENTS</title>
      <p>We would like to thank the reviewers for their comments, which
helped improve this paper. R. Gonc¸alves, M. Knorr and J. Leite were
partially supported by FCT under strategic project NOVA LINCS
(PEst/UID/CEC/04516/2013). R. Gonc¸alves was partially supported
by FCT grant SFRH/BPD/100906/2014 and M. Knorr by FCT grant
SFRH/BPD/86970/2012. Moreover, G. Brewka, S. Ellmauthaler, and
J. Pu¨ hrer were partially supported by the German Research
Foundation (DFG) under grants BR-1817/7-1 and FOR 1513.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1] Jose´ Ju´ lio Alferes, Antonio Brogi, Joa˜o Alexandre Leite, and Lu´ıs Moniz Pereira, '
          <article-title>Evolving logic programs'</article-title>
          , in Procs. of JELIA, eds.,
          <string-name>
            <surname>Sergio</surname>
            <given-names>Flesca</given-names>
          </string-name>
          , Sergio Greco,
          <source>Nicola Leone, and Giovambattista Ianni</source>
          , volume
          <volume>2424</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>50</fpage>
          -
          <lpage>61</lpage>
          . Springer, (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Anicic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rudolph</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fodor</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Stojanovic</surname>
          </string-name>
          , '
          <article-title>Stream reasoning and complex event processing in ETALIS'</article-title>
          ,
          <source>Semantic Web</source>
          ,
          <volume>3</volume>
          (
          <issue>4</issue>
          ),
          <fpage>397</fpage>
          -
          <lpage>407</lpage>
          , (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Marcelo</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Leopoldo E.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          , and Jan Chomicki, '
          <article-title>Consistent query answers in inconsistent databases'</article-title>
          , in Procs. of PODS, eds., Victor Vianu and
          <string-name>
            <surname>Christos H. Papadimitriou</surname>
          </string-name>
          , pp.
          <fpage>68</fpage>
          -
          <lpage>79</lpage>
          . ACM Press, (
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>The</given-names>
            <surname>Description Logic Handbook: Theory</surname>
          </string-name>
          , Implementation, and Applications, eds.,
          <string-name>
            <surname>Franz</surname>
            <given-names>Baader</given-names>
          </string-name>
          , Diego Calvanese, Deborah L.
          <string-name>
            <surname>McGuinness</surname>
          </string-name>
          ,
          <string-name>
            <surname>Daniele Nardi</surname>
          </string-name>
          , and
          <string-name>
            <surname>Peter F. Patel-Schneider</surname>
          </string-name>
          , Cambridge University Press, 2nd edn.,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Barbieri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Braga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ceri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. Della</given-names>
            <surname>Valle</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Grossniklaus</surname>
          </string-name>
          , '
          <article-title>CSPARQL: a continuous query language for RDF data streams'</article-title>
          ,
          <source>Int. J. Semantic Computing</source>
          ,
          <volume>4</volume>
          (
          <issue>1</issue>
          ),
          <fpage>3</fpage>
          -
          <lpage>25</lpage>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Harald</given-names>
            <surname>Beck</surname>
          </string-name>
          , Minh Dao-Tran, Thomas Eiter, and Michael Fink, '
          <article-title>LARS: A logic-based framework for analyzing reasoning over streams'</article-title>
          , in Procs. of AAAI, eds.,
          <source>Blai Bonet and Sven Koenig</source>
          , pp.
          <fpage>1431</fpage>
          -
          <lpage>1438</lpage>
          . AAAI Press, (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Brewka</surname>
          </string-name>
          and Thomas Eiter, '
          <article-title>Equilibria in heterogeneous nonmonotonic multi-context systems'</article-title>
          , in Procs.
          <source>of AAAI</source>
          , pp.
          <fpage>385</fpage>
          -
          <lpage>390</lpage>
          . AAAI Press, (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Brewka</surname>
          </string-name>
          , Thomas Eiter,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Fink</surname>
          </string-name>
          , and Antonius Weinzierl, '
          <article-title>Managed multi-context systems'</article-title>
          , in Procs. of IJCAI, ed.,
          <source>Toby Walsh</source>
          , pp.
          <fpage>786</fpage>
          -
          <lpage>791</lpage>
          . IJCAI/AAAI, (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Brewka</surname>
          </string-name>
          , Stefan Ellmauthaler, and
          <article-title>Jo¨ rg Pu¨ hrer, 'Multi-context systems for reactive reasoning in dynamic environments'</article-title>
          ,
          <source>in Procs. of ECAI</source>
          , pp.
          <fpage>159</fpage>
          -
          <lpage>164</lpage>
          , (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Gerhard</surname>
            <given-names>Brewka</given-names>
          </string-name>
          , Floris Roelofsen, and Luciano Serafini, '
          <article-title>Contextual default reasoning'</article-title>
          , in Procs. of IJCAI, ed.,
          <string-name>
            <surname>Manuela</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Veloso</surname>
          </string-name>
          , pp.
          <fpage>268</fpage>
          -
          <lpage>273</lpage>
          , (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Francesco</surname>
            <given-names>Buccafurri</given-names>
          </string-name>
          , Nicola Leone, and Pasquale Rullo, '
          <article-title>Strong and weak constraints in disjunctive datalog'</article-title>
          , in Procs. of LPNMR, eds., Ju¨ rgen Dix,
          <source>Ulrich Furbach, and Anil Nerode</source>
          , volume
          <volume>1265</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>2</fpage>
          -
          <lpage>17</lpage>
          . Springer, (
          <year>1997</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Thomas</surname>
            <given-names>Eiter</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Fink</surname>
          </string-name>
          , Peter Schu¨ ller, and Antonius Weinzierl, '
          <article-title>Finding explanations of inconsistency in multi-context systems'</article-title>
          , Artif. Intell.,
          <volume>216</volume>
          ,
          <fpage>233</fpage>
          -
          <lpage>274</lpage>
          , (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Thomas</surname>
            <given-names>Eiter</given-names>
          </string-name>
          , Giovambattista Ianni, Thomas Lukasiewicz, Roman Schindlauer, and Hans Tompits, '
          <article-title>Combining answer set programming with description logics for the semantic web', Artif</article-title>
          . Intell.,
          <volume>172</volume>
          (
          <fpage>12</fpage>
          -
          <lpage>13</lpage>
          ),
          <fpage>1495</fpage>
          -
          <lpage>1539</lpage>
          , (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Stefan</surname>
            <given-names>Ellmauthaler</given-names>
          </string-name>
          , '
          <article-title>Generalizing multi-context systems for reactive stream reasoning applications'</article-title>
          , in Procs. of ICCSW, eds.,
          <string-name>
            <surname>Andrew</surname>
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Jones</surname>
          </string-name>
          and Nicholas Ng, volume
          <volume>35</volume>
          <source>of OASICS</source>
          , pp.
          <fpage>19</fpage>
          -
          <lpage>26</lpage>
          . Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, Germany, (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Stefan</given-names>
            <surname>Ellmauthaler</surname>
          </string-name>
          and Jo¨ rg Pu¨ hrer, '
          <article-title>Asynchronous multi-context systems', in Advances in Knowledge Representation, Logic Programming, and Abstract Argumentation - Essays Dedicated to Gerhard Brewka on the Occasion of His 60th Birthday, eds</article-title>
          .,
          <string-name>
            <surname>Thomas</surname>
            <given-names>Eiter</given-names>
          </string-name>
          , Hannes Strass,
          <source>Miroslaw Truszczynski, and Stefan Woltran</source>
          , volume
          <volume>9060</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>141</fpage>
          -
          <lpage>156</lpage>
          . Springer, (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Fink</surname>
          </string-name>
          , '
          <article-title>Paraconsistent hybrid theories'</article-title>
          , in Procs. of KR, eds., Gerhard Brewka, Thomas Eiter, and
          <string-name>
            <surname>Sheila</surname>
            <given-names>A. McIlraith.</given-names>
          </string-name>
          AAAI Press, (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kaufmann</surname>
          </string-name>
          , M. Ostrowski,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Thiele</surname>
          </string-name>
          ,
          <article-title>A users guide to gringo, clasp, clingo, and iclingo</article-title>
          ,
          <source>Potassco Team</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Martin</surname>
            <given-names>Gebser</given-names>
          </string-name>
          , Torsten Grote, Roland Kaminski, Philipp Obermeier, Orkunt Sabuncu, and Torsten Schaub, '
          <article-title>Stream reasoning with answer set programming: Preliminary report'</article-title>
          , in Procs. of KR, eds., Gerhard Brewka,
          <source>Thomas Eiter, and Sheila A. McIlraith</source>
          , pp.
          <fpage>613</fpage>
          -
          <lpage>617</lpage>
          . AAAI Press, (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Martin</surname>
            <given-names>Gebser</given-names>
          </string-name>
          , Torsten Grote, Roland Kaminski, and Torsten Schaub, '
          <article-title>Reactive answer set programming', in Procs</article-title>
          . of LPNMR, eds.,
          <string-name>
            <surname>James</surname>
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Delgrande</surname>
          </string-name>
          and Wolfgang Faber, volume
          <volume>6645</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>66</lpage>
          . Springer, (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and Vladimir Lifschitz, '
          <article-title>Classical negation in logic programs</article-title>
          and disjunctive databases', New Generation Comput.,
          <volume>9</volume>
          (
          <issue>3</issue>
          /4),
          <fpage>365</fpage>
          -
          <lpage>386</lpage>
          , (
          <year>1991</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Fausto</surname>
            <given-names>Giunchiglia</given-names>
          </string-name>
          , '
          <article-title>Contextual reasoning'</article-title>
          , Epistemologia, XVI,
          <fpage>345</fpage>
          -
          <lpage>364</lpage>
          , (
          <year>1993</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>Fausto</given-names>
            <surname>Giunchiglia</surname>
          </string-name>
          and Luciano Serafini, '
          <article-title>Multilanguage hierarchical logics or: How we can do without modal logics', Artif</article-title>
          . Intell.,
          <volume>65</volume>
          (
          <issue>1</issue>
          ),
          <fpage>29</fpage>
          -
          <lpage>70</lpage>
          , (
          <year>1994</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>Ricardo</given-names>
            <surname>Gonc</surname>
          </string-name>
          <article-title>¸alves, Matthias Knorr, and Joa˜o Leite, 'Evolving bridge rules in evolving multi-context systems'</article-title>
          , in Procs. of CLIMA, eds.,
          <string-name>
            <surname>Nils</surname>
            <given-names>Bulling</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leendert W. N. van der Torre</surname>
          </string-name>
          , Serena Villata,
          <source>Wojtek Jamroga, and Wamberto Weber Vasconcelos</source>
          , volume
          <volume>8624</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>52</fpage>
          -
          <lpage>69</lpage>
          . Springer, (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>Ricardo</given-names>
            <surname>Gonc</surname>
          </string-name>
          <article-title>¸alves, Matthias Knorr, and Joa˜o Leite, 'Evolving multicontext systems'</article-title>
          , in Procs.
          <source>of ECAI</source>
          , pp.
          <fpage>375</fpage>
          -
          <lpage>380</lpage>
          , (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Ricardo</given-names>
            <surname>Gonc</surname>
          </string-name>
          <article-title>¸alves, Matthias Knorr, and Joa˜o Leite, 'Minimal change in evolving multi-context systems'</article-title>
          , in Procs. of EPIA, eds., Francisco C. Pereira, Penousal Machado,
          <source>Ernesto Costa, and Am´ılcar Cardoso</source>
          , volume
          <volume>9273</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>611</fpage>
          -
          <lpage>623</lpage>
          . Springer, (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>Tobias</surname>
            <given-names>Kaminski</given-names>
          </string-name>
          , Matthias Knorr, and Joa˜o Leite, '
          <article-title>Efficient paraconsistent reasoning with ontologies and rules'</article-title>
          , in Procs. of IJCAI, eds.,
          <source>Qiang Yang and Michael Wooldridge</source>
          , pp.
          <fpage>3098</fpage>
          -
          <lpage>3105</lpage>
          . AAAI Press, (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Matthias</surname>
            <given-names>Knorr</given-names>
          </string-name>
          , Jose´ Ju´ lio Alferes, and Pascal Hitzler, '
          <article-title>Local closed world reasoning with description logics under the well-founded semantics', Artif</article-title>
          . Intell.,
          <volume>175</volume>
          (
          <fpage>9</fpage>
          -
          <lpage>10</lpage>
          ),
          <fpage>1528</fpage>
          -
          <lpage>1554</lpage>
          , (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <surname>Matthias</surname>
            <given-names>Knorr</given-names>
          </string-name>
          , Ricardo Gonc¸alves, and Joa˜o Leite, '
          <article-title>On efficient evolving multi-context systems'</article-title>
          , in Procs. of PRICAI, eds., Duc Nghia Pham and
          <string-name>
            <surname>Seong-Bae Park</surname>
          </string-name>
          , volume
          <volume>8862</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>284</fpage>
          -
          <lpage>296</lpage>
          . Springer, (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>Freddy</given-names>
            <surname>Le</surname>
          </string-name>
          <article-title>´cue´ and Jeff Z</article-title>
          . Pan, '
          <article-title>Predicting knowledge in an ontology stream'</article-title>
          , in Procs. of IJCAI, ed.,
          <source>Francesca Rossi</source>
          , pp.
          <fpage>2662</fpage>
          -
          <lpage>2669</lpage>
          . IJCAI/AAAI, (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <surname>John</surname>
            <given-names>McCarthy</given-names>
          </string-name>
          , '
          <source>Generality in artificial intelligence'</source>
          ,
          <source>Commun. ACM</source>
          ,
          <volume>30</volume>
          (
          <issue>12</issue>
          ),
          <fpage>1029</fpage>
          -
          <lpage>1035</lpage>
          , (
          <year>1987</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>Boris</given-names>
            <surname>Motik</surname>
          </string-name>
          and Riccardo Rosati, '
          <article-title>Reconciling description logics and rules'</article-title>
          ,
          <source>Journal of the ACM</source>
          ,
          <volume>57</volume>
          (
          <issue>5</issue>
          ),
          <fpage>93</fpage>
          -
          <lpage>154</lpage>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>O</given-names>
            <surname>¨zgu¨</surname>
          </string-name>
          r L. O¨zc¸ep, Ralf Mo¨ ller, Christian Neuenstadt, Dmitriy Zheleznayakow, Evgeny Kharlamov, Ian Horrocks, Thomas Hubauer, and Mikhail Roshchin, '
          <fpage>D5</fpage>
          .
          <article-title>1 Executive Summary: A semantics for temporal and stream-based query answering in an OBDA context'</article-title>
          ,
          <source>Technical report, Optique FP7-ICT-2011-8-318338 Project</source>
          , (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>Floris</given-names>
            <surname>Roelofsen</surname>
          </string-name>
          and Luciano Serafini, '
          <article-title>Minimal and absent information in contexts'</article-title>
          , in Procs. of IJCAI, eds.,
          <source>Leslie Pack Kaelbling and Alessandro Saffiotti</source>
          , pp.
          <fpage>558</fpage>
          -
          <lpage>563</lpage>
          . Professional Book Center, (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>