<!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 C++ reasoner for the description logic DL4D; ? (work in progress)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Domenico Cantone</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marianna Nicolosi-Asmundo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniele Francesco Santamaria</string-name>
          <email>santamariag@dmi.unict.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Catania, Dept. of Mathematics and Computer Science</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present an ongoing implementation of a KE-tableau based reasoner for a decidable fragment of strati ed elementary set theory i(D) (shortly DL4D; ). The reexapsroensseirncghtehckesdtehsecrcipotnisoinstelongciyc oDf LDhL4L4DQ;S-kRn;owledge bases (KBs) represented in set-theoretic terms. It is implemented in C++ and supports DL4D; -KBs serialized in the OWL/XML format. To the best of our knowledge, this is the rst attempt to implement a reasoner for the consistency checking of a description logic that is represented via a fragment of set theory that can also classify standard OWL ontologies.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Computable set theory is a research eld rich of decidability results, however
only recently some of its fragments have been applied in the context of knowledge
representation and reasoning for the semantic web. Such e orts are motivated
by the characteristics of the considered set-theoretic fragments. These provide
very expressive and unique formalisms that combine the modelling capabilities
of a rule language with the constructs of description logics. In particular, the
set-theoretic fragment 4LQSR [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], involving variables of four sorts, pair terms,
and a restricted form of quanti cation over variables of the rst three sorts, is
appropriate for these nalities since it turned out to be e ciently implementable.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], 4LQSR-quanti er-free atomic formulae of the types x = y, x 2 X1,
hx; yi 2 X3 (with x; y variables of sort 0, hx; yi a pair term, X1 a variable
of sort 1, and X3 a variable of sort 3) and 4LQSR purely universal formulae
of the type (8z1):::(8zn)'0 (with zi variables of sort 0, for i = 1; : : : ; n, and
'0 a propositional combination of 4LQSR-quanti er-free atomic formulae) are
used to represent the expressive description logic DL4D; , thus yielding a decision
procedure for reasoning tasks for DL4D; such as the consistency of knowledge
bases (KBs) and the Higher Order Conjunctive Query Answering problem. The
latter problem, in particular, includes the most relevant ABox reasoning tasks.
      </p>
      <p>
        The description logic DL4D; admits full negation, union and intersection of
concepts and abstract roles, concept domain and range, and existential and
minimum cardinality restriction on the left-hand side of inclusion axioms. It also
? Work supported by Gruppo Nazionale per il Calcolo Scienti co (GNCS-INdAM).
supports role chains on the left-hand side of inclusion axioms and properties on
roles such as transitivity, symmetry, re exivity, and irre exivity. Thanks to its
4; can represent expressive ontologies, such as, for instance,
expressiveness, DLD
OntoCeramic [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        Since existential quanti cation is admitted only on the left-hand side of
in4; is less expressive than logics such as SROIQ(D) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] as
clusion axioms, DLD
4;
far as the generation of new individuals is concerned. On the other hand, DLD
is more liberal than SROIQ(D) in the de nition of role inclusion axioms, since
the involved roles are not required to be subject to any ordering relationship, and
the notion of simple role is not needed. For example, the role hierarchy presented
in [8, page 2] is not expressible in SROIQ(D), but can be represented in DL4D; .
      </p>
      <p>4; is a powerful rule language able to express rules with negated
In addition, DLD
atoms such as P erson(?p) ^ :hasHome(?p; ?h) =) HomelessP erson(?p).
Notice that rules with negated atoms are not supported by the Semantic Web
Rule Language (SWRL).</p>
      <p>
        By resorting to the algorithm introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], in this paper we present the
rst e ort to implement a KE-tableau based decision procedure for the
consistency problem of DL4D; -KBs. Implementation is being carried out in C++, as
C++ allows for low level directives and can be easily compiled in several
environments. The choice of KE-tableau systems [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] in place of traditional semantic
tableaux [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is motivated by the fact that KE-tableau systems introduce an
analytic cut rule allowing the construction of trees whose distinct branches
dene mutually exclusive situations, thus preventing the proliferation of redundant
branches (typical of Smullyan's semantic tableaux). Thus, when a consistent KB
is given in input, the procedure yields a KE-tableau whose open branches induce
distinct models of the KB. Otherwise, a closed KE-tableau is returned.
      </p>
      <p>Our reasoner, still in beta-testing, is available at the following address:
https://github.com/dfsantamaria/DL4xD-Reasoner.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Overview of the reasoner</title>
      <p>
        The input of the reasoner is an OWL ontology, serialized in the OWL/XML
syntax (see Figure 1). If the ontology meets the DL4D; requirements, then a
parser produces the internal coding of all axioms and assertions of the ontology
in set-theoretic terms as a list of strings. Such translation exploits the function
used in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] to map DL4D; -KBs to 4LQSR-formulae. Each such string represents
either a 4LQSR-quanti er free formula or a 4LQSR purely universally
quantied formula whose quanti ers have been moved as inward as possible. In the
subsequent step, the reasoner builds the data-structures required to execute the
algorithm, and then it constructs the expansion of each 4LQSR purely universally
quanti ed formula according to [4, page 9] yielding an expanded (ground) KB,
      </p>
      <p>
        KB. Subsequently, a KE-tableau TKB, representing the saturation of KB, is
constructed according to Procedure saturate-DL4D; -KB in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Initially a one-branch
KE-tableau TKB for KB is constructed. Then, TKB is expanded till saturation by
sistematically applying the E-Rule (elimination rule) and the PB-Rule (principle
of bivalence rule) in Figure 2 to formulae of type 1 _ : : : _ n, giving priority to
the application of the E-Rule. Once such rules are no longer applicable, for each
open branch # of the resulting KE-tableau, literals of type x = y occurring in #
are dealt with by storing in # the equivalence class of x and y.
where Si := f 1; :::; ng n f ig,
for i = 1; :::; n
A j A
with A a literal
      </p>
      <p>PB-Rule
We rst show how the internal coding of DL4D; -KBs represented in terms of
4LQSR is de ned and how data-structures for the representation of formulae,
nodes, and KE-tableaux are implemented. Then we describe the most relevant
functions that implement the algorithm.</p>
      <p>4LQSR elements such as variables, pairs, relators, logic connectors, and
quanti ers are internally mapped as strings.</p>
      <p>The class Var describes 4LQSR variables by means of a string representing the
name, an integer representing the sort of the variable, and an integer indicating
whether the variable is bound or free. Purely universally quanti ed variables
and free variables are collected in the vectors VQL and VVL, respectively, which
provide a subvector for each sort of variable.</p>
      <p>The operators admitted in 4LQSR and internally coded as strings are mapped
in three distinct vectors that are elds of the class Operator.</p>
      <p>4LQSR atomic formulae are stored using the class Atom. The latter has two
elds: the integer atomOp representing the operator of the formula, and the
vector components, whose elements point to the variables involved in the atomic
formula. 4LQSR formulae are represented by the class Formula having a binary
tree-shaped structure, whose nodes contain an object of type Atom. The left and
the right children contain the left and the right subformula, respectively. The
class Formula contains a pointer to an object of Atom, representing the atomic
formula.</p>
      <p>The KE-tableau decision procedure exploits the class Tableau. This class uses
the instances of the class Node that represents the nodes of the KE-tableau. Node
has a tree-shaped structure with four elds: a vector of Formula that collects
the formulae of the current node, and three pointers to instances of the class
Node that are the left, the right, and the father node. The set of open branches
is collected in the eld openbranches, whereas the set of closed branches is
maintained in the vector closedbranches. In addition, the class Tableau is
provided with a three-dimensional vector of integers EqSet, which stores the
equivalence classes induced by the atomic formulae of type X0 = Y 0, for each
branch # of the tableau and for each variable in # occurring in any atomic
formula of type X0 = Y 0.</p>
      <p>The task of parsing the ontology from the OWL/XML le is performed by the
function readOWLXML. The latter takes as input the string obtained by reading the
OWL/XML le and returns a vector of strings representing the internal coding
of the KB. Once all input formulae have been parsed, the reasoner constructs
the expansion of the KB by means of the procedure expandKB, which yields the
vector of the output formulae (out) from the vector of the input formulae (inpf).
In order to instantiate all the quanti ed variables, expandKB exploits a stack and
the vectors VVL and VQL. After this step, the reasoner checks for atomic clashes
in the expanded KB by means of the procedure checkNodeClash.</p>
      <p>The construction of the KE-tableau is performed by procedure
expandTableau, which exploits two stacks of type vector of pointers to Node.
The stack noncomBranches, keeps track of the non-complete branches, while
nonfulFormula keeps track of the non-ful lled disjunctive formulae. Initially,
expandTableau attempts to empty the stack nonfulFormula by selecting
iteratively its elements and applying either the procedure ERule or the procedure
PBRule, respectively implementing the E-Rule and the PB-Rule in Figure 2. The
disjuncts of the current formula are stored in a temporary vector and selected
iteratively. If a disjunct has its negation on the branch, it is removed from the
vector. Once all disjuncts of the formula have been selected, if there is only
one element in the stack, then the procedure ERule is applied to the
disjunctive formula. If the stack contains more than one element, then the procedure
PBRule is applied. Finally, if the stack is empty, a contradiction is detected,
and the branch is added to closedbranches. The procedure expandTableau
terminates when either noncomBranches or nonfulFormula are empty. When
the procedure terminates with some element in noncomBranches, such branches
are added to the vector openbranches. The subsequent phase consists in
constructing the set of equivalence classes EqSet for each open branch computed by
expandTableau. EqSet is computed by the procedure computeEqT. For each open
branch in openbranches, the procedure searches for formulae of type X0 = Y 0,
where X0 and Y 0 are selected with respect to the ordering provided by the
vector VVL, and, for each variable, stores the equivalence class in EqSet.</p>
      <p>The procedure terminates when all open branches of the vector openbranches
have been analysed. If the vector is not empty, the KB is declared to be
consistent.</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusions</title>
      <p>We have presented an ongoing implementation of a KE-tableau based decision
procedure for the consistency problem of DL4D; -KBs in terms of set-theoretical
4LQSR-formulae. The reasoner, developed in C++, takes as input OWL
ontologies serialized in the OWL/XML format.</p>
      <p>
        Currently, the tool is in its beta-testing phase. We plan to compare it with
existing reasoners such as Hermit [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and Pellet [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], and to provide some
benchmarking. Then, we intend to extend the reasoner with the HOCQA procedure [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ],
thus providing ABox reasoning services. We also plan to allow data type
reasoning by integrating Satis ability Modulo Theories solvers. Moreover, techniques
developed in [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] will be used to include reasoning for description logics
admitting full existential and universal restrictions. Finally, we intend to implement
a parallel version of the software by exploiting Message Passing Interface, since
each branch of the KE-tableau can be computed by a single processing unit.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          .
          <article-title>On the satis ability problem for a 4-level quanti ed syllogistic and some applications to modal logic</article-title>
          .
          <source>Fundamenta Informaticae</source>
          ,
          <volume>124</volume>
          (
          <issue>4</issue>
          ):
          <volume>427</volume>
          {
          <fpage>448</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and E.</given-names>
            <surname>Orlowska</surname>
          </string-name>
          .
          <article-title>Dual tableau-based decision procedures for some relational logics</article-title>
          .
          <source>In Proceedings of the 25th Italian Conference on Computational Logic</source>
          , CEUR-WS Vol.
          <volume>598</volume>
          ,
          <string-name>
            <surname>Rende</surname>
          </string-name>
          ,
          <source>Italy, July 7-9</source>
          ,
          <year>2010</year>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and E.</given-names>
            <surname>Orlowska</surname>
          </string-name>
          .
          <article-title>Dual tableau-based decision procedures for relational logics with restricted composition operator</article-title>
          .
          <source>Journal of Applied Non-Classical Logics</source>
          ,
          <volume>21</volume>
          (
          <issue>2</issue>
          ):
          <volume>177</volume>
          {
          <fpage>200</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Santamaria</surname>
          </string-name>
          .
          <article-title>A set-theoretic approach to ABox reasoning services</article-title>
          . In Costantini S., Franconi E.,
          <string-name>
            <given-names>Van Woensel W.</given-names>
            ,
            <surname>Kontchakov</surname>
          </string-name>
          <string-name>
            <given-names>R.</given-names>
            , Sadri F.,
            <surname>Roman</surname>
          </string-name>
          <string-name>
            <given-names>D.</given-names>
            <surname>Rules</surname>
          </string-name>
          and
          <article-title>Reasoning</article-title>
          .
          <source>RuleML+RR 2017., Lecture Notes in Computer Science</source>
          , vol
          <volume>10364</volume>
          . Springer,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Santamaria. A C+</surname>
          </string-name>
          <article-title>+ reasoner for the description logic DL4D;</article-title>
          . CoRR, abs/1707.07545,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>D.</given-names>
            <surname>Cantone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nicolosi-Asmundo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Santamaria</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Trapani</surname>
          </string-name>
          .
          <article-title>Ontoceramic: an OWL ontology for ceramics classi cation</article-title>
          .
          <source>In Proc. of CILC</source>
          <year>2015</year>
          ,
          <article-title>CEUR-WS</article-title>
          , vol.
          <volume>1459</volume>
          , pp.
          <volume>122</volume>
          {
          <issue>127</issue>
          ,
          <string-name>
            <surname>Genova</surname>
          </string-name>
          ,
          <source>July 1-3</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>B.</given-names>
            <surname>Glimm</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Horrocks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Motik</surname>
          </string-name>
          , G. Stoilos, and
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          .
          <source>HermiT: An OWL 2 Reasoner. Journal of Automated Reasoning</source>
          ,
          <volume>53</volume>
          (
          <issue>3</issue>
          ):
          <volume>245</volume>
          {
          <fpage>269</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>I.</given-names>
            <surname>Horrocks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Kutz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>U.</given-names>
            <surname>Sattler</surname>
          </string-name>
          .
          <article-title>The even more irresistible SROIQ</article-title>
          .
          <source>In Proc. 10th Int. Conf. on Princ. of Knowledge Representation and Reasoning</source>
          , (Doherty,
          <string-name>
            <given-names>P.</given-names>
            and
            <surname>Mylopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            and
            <surname>Welty</surname>
          </string-name>
          , C. A.,
          <source>eds.)</source>
          , pages
          <fpage>57</fpage>
          {
          <fpage>67</fpage>
          . AAAI Press,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>M. Mondadori M. D'Agostino.</surname>
          </string-name>
          <article-title>The taming of the cut</article-title>
          .
          <article-title>Classical refutations with analytic cut</article-title>
          .
          <source>Journal of Logic and Computation</source>
          ,
          <volume>4</volume>
          :
          <fpage>285</fpage>
          {
          <fpage>319</fpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. E.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B. C.</given-names>
          </string-name>
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Kalyanpur</surname>
            , and
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Katz. Pellet</surname>
          </string-name>
          :
          <article-title>A practical OWL-DL reasoner</article-title>
          . J. Web Sem.,
          <volume>5</volume>
          (
          <issue>2</issue>
          ):
          <volume>51</volume>
          {
          <fpage>53</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>R. M. Smullyan.</surname>
          </string-name>
          First-order
          <string-name>
            <surname>Logic</surname>
          </string-name>
          .
          <source>Dover books on advanced Math. Dover</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>