<!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>A Perfect Match for Reasoning, Explanation, and Reason Maintenance: OWL 2 RL and Semantic Wikis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jakub Kotowski</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francois Bry</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Informatics, University of Munich</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>1999</year>
      </pub-date>
      <abstract>
        <p>Reasoning in wikis has focused so far mostly on expressiveness and tractability and neglected related issues of updates and explanation. In this demo, we show reasoning, explanation, and incremental updates in the KiWi wiki and argue that it is a perfect match for OWL 2 RL reasoning. Explanation nicely complements the \work-in-progress" focus of wikis by explaining how which information was derived and thus helps users to easily discover and remove sources of inconsistencies. Incremental updates are necessary to minimize reasoning times in a frequently changing wiki environment.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        One of the main goals of the semantic web [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is to facilitate processing of
information on the web for example by means of reasoning. Semantic wikis [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] are
sometimes seen as semantic webs in small; they enhance traditional wikis with
semantic annotations in order to make more information directly amenable to
machine processing. On the web and even more in wikis, it is natural that
inconsistencies arise during work in progress. Users should be supported by a system
that not only tolerates inconsistencies but is also able to explain them. The focus
of reasoning in KiWi1 is therefore on a rule-based inconsistency tolerant
reasoning that can be explained to users and that also allows for e cient knowledge
base updates by the means of reason maintenance. This article describes the
state of implementation as of KiWi version 0.8.
      </p>
      <p>
        Current semantic web applications and frameworks such as Sesame [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
Semantic MediaWiki [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], or IkeWiki [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] implement either specialized RDF/S 2
reasoning or connect a specialized OWL-DL 3 reasoner such as Pellet [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to provide
more expressive reasoning. For example Sesame aims to be a general platform for
semantic software based on RDF/S and therefore provides reasoning optimized
for RDF/S data. For the Semantic MediaWiki, scalability is one of the top
priorities which is why it limits its reasoning to the most e cient forms. In contrast,
1 http://www.kiwi-project.eu/
2 http://www.w3.org/TR/rdf-mt/
3 http://www.w3.org/TR/owl2-pro les/
the Jena [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] framework, also provides custom rules and some support for dealing
with inconsistencies in a dataset via so called validation rules. Both Sesame and
Jena have only limited support for incremental updates. Jena employs a general
purpose RETE-based forward-chaining reasoner which supports incremental
additions but no incremental removals4 5. Sesame itself has a limited support for
custom rule reasoning and does not o er incremental removals in the general
case. There is a reason-maintenance-inspired implementation of incremental
updates for Sesame [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] but it is speci c to RDF/S reasoning. For Sesame, there is
also the OWLIM 6 reasoner which, however, also does not support incremental
removals7. A contribution of the described implementation is a system capable
of incremental processing of fact removals for a general monotonic rule-based
reasoner. In addition, it can be easily extended for incremental rule updates.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Introduction to KiWi and sKWRL</title>
      <p>
        KiWi is a social semantic platform that features four advanced enabling
technologies: reasoning and reason maintenance, querying, information extraction,
and personalization and has a wiki as its main application. See [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for details
about the KiWi conceptual model.
      </p>
      <p>
        sKWRL is a simple KiWi rule language the syntax of which resembles the
syntax of the N3 [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] language. It can express a subset8 of OWL 2 RL { a partial
axiomatization of the OWL 2 RDF-based semantics using rules9 { and has been
implemented to provide a starting point for reasoning, explanation, and reason
maintenance and also as a step towards the full featured KWRL rule language.
sKWRL is a triple pattern based rule language for RDF with two distinctive
features: constraint rules and new resource creation in rule heads.
      </p>
      <p>Triple pattern is a generalized RDF triple that can contain a variable in place
of subject, property, and object. Bodies of a sKWRL rule consist of a conjunction
of triple patterns. Head of a sKWRL rule contains either a conjunction of triple
patterns or the \inconsistency " keyword. Rules with the \inconsistency "
keyword in the head are called constraint rules, rules with a conjunction of triple
patterns are called construction rules. All variables are implicitly universally
quanti ed and there is no explicit quanti cation. Variables occurring in a rule
head that do not occur in the body of a rule are allowed and construct a new
URI reference for each variable binding of the rule body.</p>
      <p>One or more sKWRL rules form together a sKWRL program. sKWRL
programs can optionally use namespace de nitions in a Turtle-like style. An example
of a simple sKWRL program is a program deriving the RDF/S subclass and type
hierarchy:
4 http://tech.groups.yahoo.com/group/jena-dev/message/43618
5 The focus of this paper the focus is on forward-chaining methods.
6 http://www.ontotext.com/owlim/
7 http://www.mail-archive.com/owlim-discussion@ontotext.com/msg00496.html
8 Datatypes and OWL 2 RL rules that use a LIST[] expression are not supported yet.
9 http://www.w3.org/TR/owl2-pro les/#OWL 2 RL
rdf-type: ($1 rdf:type $2), ($2 rdfs:subClassOf $3)
-&gt; ($1 rdf:type $3)
rdf-subclass: ($1 rdfs:subClassOf $2), ($2 rdfs:subClassOf $3)
-&gt; ($1 rdfs:subClassOf $3)</p>
      <p>Following is an example of a constraint rule:
prp-irp: ($p rdf:type owl:IrreflexiveProperty), ($x $p $x)
-&gt; inconsistency</p>
      <p>The prp-irp rule is one of the OWL 2 RL rules with \false" in the head.
Currently, rules are loaded from an external le and cannot be modi ed from
within the application.</p>
      <p>
        Internally, the keyword \inconsistency" is replaced by a triple pattern
conjunction constructing an annotation for every derived inconsistency. This is
needed for explanation purposes for it allows to \track inconsistencies", see
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] for more about tracking. The inconsistency annotation is assigned to the
default RDF graph and, in future, optionally to a graph speci ed by the user.
Inconsistencies are displayed as \inconsistency" tags and are highlighted.
3 Implementation
sKWRL is implemented as a component of KiWi which is an enterprise Java
application built using Seam10 and the JBoss application server. The implemented
reasoning strategy is semi-naive forward-chaining, also called materialization,
which has already been argued to be feasible [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] for applications in the area of
semantic web.
      </p>
      <p>sKWRL reasoning is implemented by translating sKWRL rule bodies into
JQL (a Java Peristence API version of SQL). The advantage of this approach
is the database exibility provided by JPA, the disadvantage is the inability to
use a native database access, which hinders e ciency. The KiWi implementation
should therefore be seen as a proof of concept not aiming for high e ciency.</p>
      <p>
        The reasoner also stores derivations of each new derived triple in the form
of a justi cation in Doyle's sense [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], i.e. a record of which triples and rules
were used in the derivation of a triple. Justi cations are then used by reason
maintenance and explanation.
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Reason maintenance</title>
      <p>
        Reason maintenance is a technique originally devised by Jon Doyle [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] for use
in problem solvers. A reason maintenance system works closely with a reasoner.
10 http://seamframework.org/
The reasoner noti es reason maintenance about each derivation it makes and
reason maintenance stores derivations in the form of a derivation graph. In the
original systems, this graph was used as a kind of computation cache which
helped to avoid the need of recomputing in case some base facts changed (i.e.
were removed and later added again). Therefore, these systems never removed
justi cations. In contrast, KiWi uses justi cations to determine what facts can
possibly be a ected by a fact removal thus avoids the ine cient, not incremental
approach which is to remove all inferred facts and to do all reasoning anew.
      </p>
      <p>Reason maintenance in KiWi is implemented using the Neo4j 11 NoSQL
graph database which natively supports graph structured data.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Explanation</title>
      <p>Explanation is important for supporting trust of users and it provides a way
to determine the root cause of derived inconsistencies. Currently, explanation
explains the origin of a derived triple simply by rendering its justi cation records.
There are two renderings available: textual tooltips and an interactive JavaScript
explanation tree.</p>
      <p>Explanation tooltips present a simple textual explanation of a derived triple,
see Fig. 1. The tooltip shows the last step of each possible derivation of the
triple \localhost:FrontPage rdf:type foaf:Document ". The implementation uses a
minimal vocabulary to translate common properties into a more readable form.</p>
      <p>The explanation tree, see Fig. 2, enables users to explore a graph of all
possible derivations and to traverse them until explicit triples are reached. The
explanation tree is complemented by a textual explanation, parts of which are
highlighted by pointing to a tree node.</p>
      <p>Acknowledgements. The research leading to these results is part of the project \KiWi
- Knowledge in a Wiki" and has received funding from the European Community's
Seventh Framework Programme (FP7/2007-2013) under grant agreement No. 211932.
11 http://neo4j.org/</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
          </string-name>
          , J.:
          <article-title>Scienti c publishing on the semantic web</article-title>
          .
          <source>Nature</source>
          <volume>410</volume>
          (
          <year>2001</year>
          )
          <volume>1023</volume>
          {
          <fpage>1024</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. Scha ert, S.,
          <string-name>
            <surname>Bry</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baumeister</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kiesel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Semantic wikis</article-title>
          .
          <source>IEEE</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Broekstra</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kampman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Harmelen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Sesame: A generic architecture for storing and querying rdf and rdf schema</article-title>
          .
          <source>LNCS</source>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Krotzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Vrandecic</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          , Volkel, M.:
          <article-title>Semantic mediawiki</article-title>
          .
          <source>In: ISWC</source>
          . Volume
          <volume>6</volume>
          ., Springer (
          <year>2006</year>
          )
          <volume>935</volume>
          {
          <fpage>942</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Scha ert, S.:
          <article-title>IkeWiki: A semantic wiki for collaborative knowledge management</article-title>
          .
          <source>In: 1st International Workshop on Semantic Technologies in Collaborative Applications (STICA06)</source>
          , Manchester,
          <string-name>
            <given-names>UK</given-names>
            ,
            <surname>Citeseer</surname>
          </string-name>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Katz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Pellet: A practical owl-dl reasoner</article-title>
          .
          <source>Journal of Web Semantics</source>
          <volume>5</volume>
          (
          <issue>2</issue>
          ) (
          <year>2007</year>
          )
          <volume>51</volume>
          {
          <fpage>53</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>McBride</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Jena: A semantic web toolkit</article-title>
          .
          <source>IEEE Internet Computing</source>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Broekstra</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kampman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Inferencing and truth maintenance in rdf schema - exploring a naive practical approach</article-title>
          .
          <source>Workshop on Practical and Scalable Semantic Systems (PSSS)</source>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Bry</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eckert</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotowski</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiand</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>What the user interacts with: Re ections on conceptual models for sematic wikis</article-title>
          .
          <source>In: Proceedings of Semantic Wiki Workshop</source>
          , ESWC, Greece,
          <year>2009</year>
          . (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Connolly</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kagal</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scharf</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>N3Logic: A logical framework for the World Wide Web</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>8</volume>
          (
          <issue>03</issue>
          ) (
          <year>2008</year>
          )
          <volume>249</volume>
          {
          <fpage>269</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Bry</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotowski</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A social vision of knowledge representation and reasoning</article-title>
          .
          <source>In: Proceedings of SOFSEM 2010: 36th International Conference on Current Trends in Theory and Practice of Computer Science</source>
          , Spindleruv Mlyn,
          <source>Czech Republic (23rd{29th January</source>
          <year>2010</year>
          ).
          <article-title>(</article-title>
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Doyle</surname>
          </string-name>
          , J.:
          <article-title>Truth maintenance systems for problem solving</article-title>
          .
          <source>Technical Report AITR-419</source>
          , Dep. of Electrical Engineering and Computer Science of MIT (
          <year>1978</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>