<!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>NoHR: Querying E L with Non-monotonic rules</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vadim Ivanov</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>Matthias Knorr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joa˜o Leite</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CENTRIA &amp; Departamento de Informa ́tica</institution>
          ,
          <addr-line>Universidade Nova de Lisboa</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computing Mathematics and Cybernetics, Ufa State Aviation Technical University</institution>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present NoHR, a Prote´ge´ plug-in that allows the user to take an + ontology, add a set of non-monotonic (logic programming) rules - suitable E L? e.g. to express defaults and exceptions - and query the combined knowledge base. Provided the given ontology alone is consistent, the system is capable of dealing with potential inconsistencies between the ontology and the rules, and, after an initial brief pre-processing period utilizing OWL 2 EL reasoner ELK, returns answers to queries at an interactive response time by means of XSB Prolog.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Ontology languages have become widely used to represent and reason over taxonomic
knowledge, and often such knowledge bases are expressed within the language of the
OWL 2 profile OWL 2 EL.1 For example, the clinical health care terminology SNOMED
CT,2, arguably the most prominent example in the area of medicine and currently used
for electronic health record systems, clinical decision support systems, or remote
intensive care monitoring, to name only a few, builds on a fragment of OWL 2 EL and its
underlying description logic (DL) E L++ [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Since OWL and its profiles are based on DLs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], hence monotonic by nature, which
means that once drawn conclusions persist when adopting new additional information,
the ability to model defaults and exceptions with a closed-world view is frequently
requested as a missing feature. For example, in clinical health care terminology, it would
be advantageous to be able to express directly that normally the heart is on the left side
of the body unless the person is a dextrocardiac, which matters when applying ECG or
defibrillation to a patient.
      </p>
      <p>
        In recent years, there has been a considerable amount of effort devoted to extending
DLs with non-monotonic features – see, e.g., related work in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] – many of the
existing approaches focusing on combining DLs and non-monotonic rules. The latter are
one of the most well studied formalisms (in the area of Logic Programming) that
admit expressing defaults, exceptions, and also integrity constraints in a declarative way.
As such, they are part of the RIF,3 the other language for the Semantic Web whose
standardization is driven by the W3C.4
      </p>
      <sec id="sec-1-1">
        <title>1 http://www.w3.org/TR/owl2-profiles/ 2 http://www.ihtsdo.org/snomed-ct/ 3 http://www.w3.org/TR/rif-overview/ 4 http://www.w3.org</title>
        <p>OWL File
NM Rules</p>
        <p>File</p>
        <p>XSB
Knowledge</p>
        <p>Base
Query
Answering
Tracer/
Debugger
Tables
Java Virtual Machine</p>
        <p>Protégé</p>
        <p>NoHR Plugin
Protégé
Ontology</p>
        <p>NM Rules</p>
        <p>Base
GUI</p>
        <p>
          Here, we focus on Hybrid MKNF under the well-founded semantics [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]
combining ontologies and such rules, because, as argued for the preceding semantics in [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], the
overall framework is very general and flexible, and unlike [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] has a polynomial data
complexity and admits top-down query-answering based only on the information
relevant for the query, and without computing the entire model – no doubt a crucial feature
when dealing with large ontologies such as SNOMED with over 300,000 classes.
        </p>
        <p>
          In our ISWC 2013 Research Track paper [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], we describe a system, realized as a
plug-in for the ontology editor Prote´ge´ 4.X,5 that allows the user to query combinations
+ ontologies and non-monotonic rules in a top-down manner. To the best of our
of E L?
knowledge, it is the first Prote´ge´ plug-in to integrate non-monotonic rules and top-down
queries. Our approach is theoretically founded on the abstract procedure SLG(O) [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
and developed upon the usage of the consequence-driven, concurrent E L reasoner ELK
[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] to classify the ontology part, whose result is translated into rules which, together
with the non-monotonic rules, subsequently serve as input for the top-down query
engine XSB Prolog.6 Additional features of the plug-in include: the possibility to load
and edit rule bases, and define predicates with arbitrary arity; guaranteed termination
of query answering, with a choice between one/many answers; robustness w.r.t.
po+ ontology
tential inconsistencies between the ontology and the rules in case the E L?
contains DisjointW ith axioms; leveraging of XSB tabling mechanisms to improve
performance, and trace/debug features, e.g., to provide explanations.
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>System Description</title>
      <p>
        In this Section, we briefly describe the architecture of NoHR, our plug-in for Prote´ge´,
as shown in Fig. 1 and discuss some features of our implementation and querying in
XSB. For the technical details and the evaluation of our approach, we refer to [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>The input for our plug-in consists of an OWL file, which can be manipulated as
usual in Prote´ge´, and a rule file. For the latter, we provide a tab called NoHR Rules that</p>
      <sec id="sec-2-1">
        <title>5 http://protege.stanford.edu 6 http://xsb.sourceforge.net</title>
        <p>
          allows the user to load, save and edit rule files in a text panel. The syntax follows Prolog
conventions, so that one rule from Ex. 2 in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] can be represented, e.g., by
SeaSideCity(X) :- PortCity(X), not NonSeaSideCity(X).
        </p>
        <p>
          The NoHR Query tab as shown in Fig. 2 also allows for the visualization of the rules
(in the lower left corner), but its main purpose is to provide an interface for querying the
combined KB. Whenever the first query is posed by pushing “Execute”, the translator
is started, initiating the ELK reasoner to classify the ontology and return the result to
the translator. It is verified whether DisjointW ith axioms appear in O which
determines whether the transformation into rules has to contain means to check for potential
inconsistencies or not. Then, accordingly, a joint (non-monotonic) rule set is created in
which predicates and constants, i.e., all terms, are encoded using MD5. This requires
the user to write case-sensitive rules (w.r.t. to the ontology), but ensures full
compatibility with XSB Prolog’s more restrictive admitted input syntax. The resulting program
is transfered to XSB via InterProlog [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], which is an open-source Java front-end that
provides the ability to communicate between Java and a Prolog engine.
        </p>
        <p>Next, the query can be sent via InterProlog to XSB, and answers are returned to the
query processor, which collects them and sets up a table showing for which variable
substitutions we obtain true, undefined, or inconsistent valuations (or just shows the
truth value for a ground query). The table itself is shown in the Result tab of the Output
panel (see Fig. 2), while the Log tab shows measured times and system messages,
including those from XSB via InterProlog. XSB not only answers queries very efficiently
in a top-down manner, with tabling, it also avoids infinite loops.</p>
        <p>Once the query has been answered, the user may pose other queries, and the
system will simply send them to XSB directly without any repeated preprocessing. If the
user changes data in the ontology or in the rules, then the system offers the option to
recompile, but always restricted to the part that actually changed.</p>
        <p>
          During the demo exhibition, we take a given/chosen ontology loaded into Prote´ge´,
and we show, first how to edit, load, and save rules, and subsequently, run queries on the
combined knowledge base. In particular, we interactively demonstrate how changing the
ontology and the rules affects the query results, also in the presence of inconsistencies
between the ontology and the rule set. For that purpose, we use data sets of two kinds,
namely toy examples for which the query result can be verified right away and some of
the real world ontologies, utilized already during testing in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] (cf. Fig.3), to which we
add non-monotonic rules.
        </p>
        <p>Our plug-in is under active development and the most recent version is available at
https://code.google.com/p/nohr-reasoner/. The example file sets for
testing can also be found on this web page.</p>
        <p>Acknowledgments. We would like to thank Miguel Calejo for his help with
InterProlog, Pavel Klinov for his help with ELK, Terry Swift for his help with XSB, and
Gonca Gu¨ llu¨ for her collaboration. Vadim Ivanov was partially supported by a
MULTIC – Erasmus Mundus Action 2 grant. Matthias Knorr and Joa˜o Leite were
partially supported by FCT funded project ERRO – Efficient Reasoning with Rules and
Ontologies (PTDC/EIA-CCO/121823/2010) and Matthias Knorr also by FCT grant
SFRH/BPD/86970/2012.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alferes</surname>
            ,
            <given-names>J.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Knorr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Swift</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Query-driven procedures for hybrid MKNF knowledge bases</article-title>
          .
          <source>ACM TOCL 14(2)</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brandt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Pushing the E L envelope</article-title>
          .
          <source>In: IJCAI'05: 19th Int. Joint Conf. on Artificial Intelligence</source>
          . pp.
          <fpage>364</fpage>
          -
          <lpage>369</lpage>
          . Morgan Kaufmann (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F</given-names>
          </string-name>
          . (eds.):
          <article-title>The Description Logic Handbook: Theory, Implementation, and Applications</article-title>
          . Cambridge University Press, 3rd edn. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Calejo</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          : Interprolog:
          <article-title>Towards a declarative embedding of logic programming in java</article-title>
          . In: Alferes,
          <string-name>
            <given-names>J.J.</given-names>
            ,
            <surname>Leite</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.A</surname>
          </string-name>
          . (eds.)
          <source>JELIA. Lecture Notes in Computer Science</source>
          , vol.
          <volume>3229</volume>
          , pp.
          <fpage>714</fpage>
          -
          <lpage>717</lpage>
          . Springer (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ivanov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Knorr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leite</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A query tool for E L with non-monotonic rules</article-title>
          .
          <source>In: ISWC 2013</source>
          . Springer (
          <year>2013</year>
          ), to appear
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , Kro¨ tzsch, M., Simancˇ´ık, F.:
          <article-title>Concurrent classification of E L ontologies</article-title>
          . In: Aroyo,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Welty</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Alani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Taylor</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>Bernstein</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kagal</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Noy</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blomqvist</surname>
          </string-name>
          , E. (eds.)
          <source>Proceedings of the 10th International Semantic Web Conference (ISWC'11)</source>
          . LNCS, vol.
          <volume>7032</volume>
          . Springer (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Knorr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alferes</surname>
            ,
            <given-names>J.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Local closed world reasoning with description logics under the well-founded semantics</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>175</volume>
          (
          <issue>9-10</issue>
          ),
          <fpage>1528</fpage>
          -
          <lpage>1554</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
          </string-name>
          , R.:
          <article-title>Reconciling description logics and rules</article-title>
          .
          <source>J. ACM</source>
          <volume>57</volume>
          (
          <issue>5</issue>
          ) (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>