<!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>CKR:Live Demo: Using Contexts and Exceptions for Representing Evolving Knowledge States</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Loris Bozzato</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luciano Serafini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gaetano Calabrese</string-name>
          <email>calabreseg@fbk.eu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Fondazione Bruno Kessler</institution>
          ,
          <addr-line>Via Sommarive 18, 38123 Trento</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Context representation of (description logic based) knowledge has recently gained interest in the Semantic Web community and a number of logic based solutions have been proposed. In this regard, in our previous works we have introduced the DL based Contextualized Knowledge Repository (CKR) framework: we recently proposed an extension of CKR with the possibility to represent and reason with defeasible axioms and exceptions in context dependent axioms. The goal of this demo is to demonstrate the use of contexts and exceptions in representing evolving situations: the demo visualizes the evolution of a soccer match by showing the (possibly non-monotonic) changes in the knowledge across different events composing the match.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        The interest in context representation applied to Semantic Web data (and, more in
general, in description logic knowledge bases) has led to the proposal of a number of logic
based solutions in recent years, like e.g. [
        <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7 ref8 ref9">4,5,6,7,8,9</xref>
        ]. In this direction, in our previous
works we have introduced the DL based Contextualized Knowledge Repository (CKR)
framework [
        <xref ref-type="bibr" rid="ref2 ref3 ref6">6,2,3</xref>
        ]. In the latest formulation of CKR presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we introduced an
extension of the framework with the possibility to reason with defeasible axioms and
their justifiable exceptions in context dependent axioms.
      </p>
      <p>In this demo, we demonstrate the use of contexts and local exceptions of the CKR
framework in representing a scenario evolving across several subsequent knowledge
states. We chose to model the example of the evolution of a soccer match: this allows
us to expose the potentialities of our framework inside a simple and well-understood
scenario, which, on the other hand, provides a rich set of evolving information.</p>
      <p>
        Goal of this demo is to show in practice the use of contexts and their relations for
interpretation of local knowledge and its propagation in an event structure. Moreover,
we show how a combination of knowledge import axioms and exceptions allows for
modelling a non-monotonic evolution of knowledge across states. From the point of
view of the implementation, the architecture of the demo system demonstrates how to
use the CKR datalog rewriter (CKRew) and the reasoning implemented by its datalog
translation [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to compute inferences on an input CKR with defeasibility and integrate
this reasoning in a pipeline for managing contextualized OWL/RDF data.
      </p>
      <p>In the following sections, we first briefly summarize the structure and basic ideas
of CKR with justifiable exceptions (Section 2), then we present the architecture of the
system implemented for this demo (Section 3). Finally, we present the formalization
of the soccer match scenario (Section 4) and we give an overview for the usage of the
demo web interface (Section 5).
2</p>
    </sec>
    <sec id="sec-2">
      <title>CKR with Justifiable Exceptions</title>
      <p>
        We provide an informal summary of the elements of the CKR framework with
justifiable exceptions: for a formal description and complete definitions, we refer to [
        <xref ref-type="bibr" rid="ref1 ref3">3,1</xref>
        ].
      </p>
      <p>A CKR is a two layered structure:
1. the upper layer consists of a knowledge base G, called global context, containing (a)
meta-knowledge, i.e. the structure and properties of contexts, and (b) global
(contextindependent) object knowledge, i.e., knowledge that applies to every context;
2. the lower layer consists of a set of (local) contexts that contain locally valid facts
and can refer to what holds in other contexts.</p>
      <p>The meta-knowledge of a CKR is expressed in a DL meta-language L containing
the elements that define the contextual structure: for example, it contains sets of symbols
for context names, module names and context classes. Intuitively, context classes
represent named classes of contexts, while knowledge modules are pieces of local knowledge
associated to a single context or a context class.</p>
      <p>The knowledge inside contexts of a CKR is expressed via a DL language L , called
object-language. The expressions of object language are evaluated locally to each
context: every context can interpret each symbol independently. To access the interpretation
of symbols inside a specific context or context class, we allow in local object
knowledge eval expressions of the form eval(X; C), where X is a concept or role expression
of L and C is a concept expression of L . Intuitively, eval(X; C) can be read as “the
interpretation of X in all the contexts of type C”. The global object knowledge in G
can contain statements D( ) with 2 L : this states that is a defeasible axiom.
Intuitively, in the local contexts, is applied to all its local instantiations except for those
generating a contradiction. In other words, a local “overriding” for some instances of
is tolerated. E.g., D(A v B ) 2 G states that “in general, every A is a B”: in a
local context, the axiom might be contradicted by assertions S = fA(e); :B(e)g that
override the axiom for the “exceptional” individual e.</p>
      <p>The semantics of CKR extends the model-based semantics of DL knowledge bases
to the two layered structure of the framework and provides the presented
interpretation of defeasible axioms and their local exceptions. Intuitively, a CKR interpretation I
provides DL interpretations M for G and I(c) for each context c. In the case of strict
axioms, models of a CKR verify the contents of global and local modules associated
with contexts; global object knowledge is propagated to local contexts. For
defeasible axioms, we associate to every context c a set CAS (c) of its clashing assumptions
h ; ei, i.e. local exceptional instances e of a defeasible axiom : is then applied to its
local instances except for the ones in CAS (c). An assumption is justified if there exists
a set S of local assertions showing the local unsatisfiability of the axiom instance (cfr.
example above): in CKR models, we require that all clashing assumptions are justified.</p>
      <p>InInpput</p>
      <p>Inpuutt
mmmoododuduluelelsess</p>
      <p>CKR:Live compiler
Generate
contexts
structure</p>
      <p>CKRew:
datalog
translation</p>
      <p>Add ABox
inferences</p>
      <p>OuInItnpppuuuttt
mmCooKddRuuleless
DLV system</p>
      <p>CKR:Live
interface</p>
      <p>REST service</p>
      <p>SPARQL
SPRINGLES</p>
      <p>Sesame
repository</p>
      <p>Reasoning in CKRs with defeasibility has been formalized in the form of a
translation to datalog: the resulting datalog program is interpreted under answer set semantics,
which provides the non-monotonic reading needed for the interpretation of defeasible
axioms and exceptions. The datalog translation has been implemented in a CKR datalog
rewriter (CKRew) prototype, available at http://ckrew.fbk.eu/.
3</p>
    </sec>
    <sec id="sec-3">
      <title>CKR:Live Demo System Architecture</title>
      <p>The demo system is composed by two components: a compiler, which prepares the
input RDF files and computes the inferences, and an interface, which visualizes the
results of the inferences in terms of the presented demo scenario.</p>
      <p>The architecture and process of the system is presented in Figure 1. The compiler
first loads a set of input files containing the ABox information for the global and local
modules (i.e. the global and event specific knowledge for the considered soccer match).
The compiler then generates the CKR structure by linking each input local module
to its intended context and adds a set of fixed and context dependent TBox axioms
defining the scenario (see next section) to the knowledge bases of local contexts. The
CKR so generated is then passed to CKRew, which computes its datalog translation. By
interfacing with the DLV solver1, the resulting answer sets of the datalog translation are
computed: the newly inferred ABox facts are then extracted from the computed models
and explicitly added to the generated CKR. Finally, the CKR is saved to RDF files.</p>
      <p>
        Such RDF files are then loaded via SPRINGLES [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] as a single Sesame repository.2
The CKR:Live demo web interface uses a REST interface to communicate with the
SPRINGLES platform: each update to the web interface is reflected by a SPARQL
query (targeting the currently visualized context) implemented as a REST service. As
we present in Section 5, the web interface provides an intuitive visualization of the
evolution across the states of the represented system: it gives the possibility to select
specific events and visualize the changes in their associated knowledge.
1 http://www.dlvsystem.com/dlv/
2 In this system, SPRINGLES is used only for loading the input RDF data as different named
graphs and exposing a REST interface: no further inference is applied to the loaded data.
      </p>
    </sec>
    <sec id="sec-4">
      <title>Scenario Description: Evolution of a Soccer Match</title>
      <p>In the example scenario presented in this demo, our goal is to reason on the evolution
of knowledge in the development of a soccer match. In fact, while some information is
stable during the match (e.g. the number and playing position of a player), some other
changes during the events taking place in the course of the match (e.g. the number of
yellow cards assigned to a player). Moreover, most of the information increases
monotonically (e.g. scored goals), but some other knowledge can be retracted across events:
in our example, this is the case of player substitutions, in which a player previously in
game is exchanged by a team mate previously waiting at the bench.</p>
      <p>We can now show how we represented this scenario using a CKR. The stable
information is contained as facts in the global context as global object knowledge: this
consists of the name of the host and home teams and the name, position, team
membership and number of each player. Then, local contexts represent events happening
during the match: we consider goals, substitutions, card bookings, kick-off, half-time
and end of the match. Events are ordered by their time of happening in the match: in
other words, they represent the match evolution as a discrete succession of states. In the
local knowledge of each event, the new information added by the event happening is
specified as ABox assertions: for example, in the case of a goal, the scoring player and
team are recorded. In particular, in the first state s0 corresponding to the kick-off, we
store the information about the initial team formations by classifying each Player as
PlayingNow (currently in game) or notPlayingNow (currently in the reserves).</p>
      <p>The local information of a state needs to preserve the (unchanged) information of
its predecessor state: this is achieved by means of eval axioms. In the case of monotonic
information, using eval we can “import” the instances of a predicate from the previous
state as members of the same predicate in the current state: for example, in context s2
we import previous goals using the axiom eval(GoalNow ; fs1g) v GoalNow . In the
case of non-monotonic information (i.e. substitutions), we use defeasible axioms: in the
global context, we include the axioms:</p>
      <sec id="sec-4-1">
        <title>D(Player v Unchanged )</title>
      </sec>
      <sec id="sec-4-2">
        <title>PlayingBefore u Unchanged v PlayingNow</title>
        <p>(1)
(2)
The defeasible axiom (1) states that “Players are generally unchanged (from previous
state)”, while the strict axiom (2) asserts that “If a player is unchanged and he was
playing before, then he still plays now”. In local contexts, knowledge about PlayingBefore
is obtained again using eval axioms: for example, in state s2 we can specify that
eval(PlayingNow ; fs1g) v PlayingBefore. In contexts representing substitutions, we
can create an exception to the defeasible axiom by asserting that the substituted player
is Changed (with Changed u Unchanged v ?) and notPlayingNow : the first
assertion defines an exception to (1) which is then not applied to the player, thus negating the
local application of (2). The same mechanism is used for the “defeasible propagation”
of information about players currently at the bench (i.e. notPlayingNow instances).
An online version of the demo is available at http://bit.ly/ckrlive17.</p>
        <p>In the online demo, we demonstrate the usage of the system on two example matches:
Brazil vs. Germany, semi-final of 2014 FIFA World Cup3, and Italy vs. Spain, from
round of 16 of UEFA Euro 20164. We chose these matches as they provide a fair
number of events and event types. Information about the matches has been extracted from
the official website of the competitions.</p>
        <p>Using the menu at the top of the page, the user can choose one of the represented
matches. At the left of the page, a slider gives the possibility to select a state and scroll
across the events composing the match: a short descriptive label is associated to each
event marker. At the center of the page, all of the knowledge associated to the current
3 http://www.fifa.com/worldcup/matches/round=255955/match=
300186474/
4 http://www.uefa.com/uefaeuro/season=2016/matches/round=
2000744/match=2018002/
state is visualized: at the top it is shown the current score for each team, while at the
center it is shown the current team formations (divided by currently in-game players
and substitutes). Each player is listed with his number, name and position: whenever he
scores a goal, receives a yellow/red card warning or enters/exits the field in a
substitution, an icon and time of happening appear besides its information.</p>
        <p>By moving the slider across states, it is possible to note the changes in knowledge
contents at each event. For example, consider the first match (Brazil vs. Germany): at
the initial state, the initial team formation is shown. The first event of the example match
is a goal: one can note that its information is (monotonically) preserved when passing
to next states. On the other hand, in the event of a substitution, previously in-game
players are replaced by reserve players: note for example the case of the half-time event
in the shown match, in which both teams had multiple player substitutions. Clearly, if a
player has not been involved in a substitution, then its position in-game (or at the bench)
is preserved to the subsequent states.</p>
        <p>By clicking on the Show/Hide button, it is possible to have some insights on the
underlying data retrieved from the CKR repository: a text box shows the raw results
(as JSON records) of the call to the SPRINGLES REST service, corresponding to a
SPARQL query about players information inside the currently shown context.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bozzato</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Contextualized knowledge repositories with justifiable exceptions</article-title>
          . In: Bienvenu,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Ortiz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Rosati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Simkus</surname>
          </string-name>
          , M. (eds.) 27th
          <source>International Workshop on Description Logics (DL2014)</source>
          , Vienna, Austria,
          <source>July 17-20</source>
          ,
          <year>2014</year>
          .
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>1193</volume>
          , pp.
          <fpage>112</fpage>
          -
          <lpage>123</lpage>
          . CEUR-WS.org (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bozzato</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghidini</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Comparing contextual and flat representations of knowledge: a concrete case about football data</article-title>
          . In: Benjamins,
          <string-name>
            <surname>V.R.</surname>
          </string-name>
          , d'Aquin,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 7th International Conference on Knowledge Capture (K-CAP</source>
          <year>2013</year>
          ),
          <year>2013</year>
          . pp.
          <fpage>9</fpage>
          -
          <lpage>16</lpage>
          . ACM (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bozzato</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Materialization Calculus for Contexts in the Semantic Web</article-title>
          . In: Eiter,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Glimm</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Kazakov</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          , Kro¨tzsch, M. (eds.) DL2013.
          <article-title>CEUR-WP</article-title>
          , vol.
          <volume>1014</volume>
          , pp.
          <fpage>552</fpage>
          -
          <lpage>572</lpage>
          . CEUR-WS.org (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Khriyenko</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terziyan</surname>
          </string-name>
          , V.:
          <article-title>A framework for context sensitive metadata description</article-title>
          .
          <source>Int. J. Metadata, Semantics and Ontologies</source>
          <volume>1</volume>
          (
          <issue>2</issue>
          ),
          <fpage>154</fpage>
          -
          <lpage>164</lpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Klarman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Reasoning with Contexts in Description Logics</article-title>
          .
          <source>Ph.D. thesis</source>
          , Free University of Amsterdam (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Homola</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Contextualized knowledge repositories for the semantic web</article-title>
          .
          <source>J. of Web Semantics</source>
          <volume>12</volume>
          ,
          <fpage>64</fpage>
          -
          <lpage>87</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Straccia</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lopes</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          , Luka´csy, G.,
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A general framework for representing and reasoning with annotated semantic web data</article-title>
          .
          <source>In: Proceedings of the 24th AAAI Conference on Artificial Intelligence (AAAI</source>
          <year>2010</year>
          ),
          <source>Special Track on Artificial Intelligence and the Web (July</source>
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Tanca</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Context-based data tailoring for mobile users</article-title>
          . In: Datenbanksysteme in Business,
          <source>Technologie und Web (BTW</source>
          <year>2007</year>
          ),
          <source>Workshop Proceedings</source>
          . pp.
          <fpage>282</fpage>
          -
          <lpage>295</lpage>
          . Verlagshaus Mainz (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Udrea</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Recupero</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Subrahmanian</surname>
            ,
            <given-names>V.S.</given-names>
          </string-name>
          :
          <source>Annotated RDF. ACM Transactions on Computational Logic</source>
          <volume>11</volume>
          (
          <issue>2</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>41</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>