<!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>Enumerating Justifications using Resolution</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yevgeny Kazakov</string-name>
          <email>yevgeny.kazakov@uni-ulm.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter Skocˇovský</string-name>
          <email>peter.skocovsky@uni-ulm.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The University of Ulm</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We propose a new procedure that can enumerate justifications of a logical entailment given a set of inferences using which this entailment can be derived from axioms in the ontology. The procedure is based on the extension of the resolution method with so-called answer literals. In comparison to other (SAT-based) methods for enumerating justifications, our procedure can enumerate justifications in any user-defined order that extends the subset relation. The procedure is easy to implement and can be parametrized with ordering and selection strategies used in resolution. We describe an implementation of the procedure provided in PULi-a new Java-based Proof Utility Library, and provide an empirical comparison of (several strategies of) our procedure and other SAT-based tools on popular E L ontologies. The experiments show that our procedure provides a comparable, if not better performance than those highly optimized tools. For example, using one of the strategies, we were able to compute all justifications for all direct subsumptions of Snomed CT in about 1.5 hour. No other tool used in our experiments was able to do it even within a much longer period.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Axiom pinpointing, or computing justifications—minimal subsets of axioms of the
ontology that entail a given logical consequence—has been a widely studied research
topic in ontology engineering [
        <xref ref-type="bibr" rid="ref10 ref11 ref2 ref3 ref4">2–4, 10, 11, 17, 19, 23, 21</xref>
        ]. Most of the recent methods
focus on the so-called E L family of description logics (DLs), in which logical
consequences can be proved by deriving new axioms from existing ones using inferences
rules. The resulting inferences are usually encoded as propositional (Horn) clauses, and
justifications are computed from them using (modifications of) SAT solvers. To ensure
correctness, the input inference set must be complete, that is, the inferences are enough
to derive the consequence from any subset of the ontology from which it follows.
      </p>
      <p>
        In this paper, we present a new resolution-based procedure that enumerates all
justifications of an entailment given a complete set of inferences. Apart from requiring
completeness, the form of inferences can be arbitrary and does not depend on any
logic. For example, our method can be used with the inferences provided by existing
consequence-based procedures [
        <xref ref-type="bibr" rid="ref14 ref5">5, 16, 14, 22</xref>
        ]. The procedure can enumerate
justifications in any given order, provided it extends the proper subset relation on sets of axioms.
Performance of the procedure depends on the strategy it follows while enumerating
justifications. We have empirically evaluated three simple strategies and experimentally
compared our procedure with other highly optimized justification computation tools.
      </p>
      <p>The paper is organized as follows. In Section 2 we describe related work. Section 3
defines basic notions such as inferences and resolution. In Section 4 we present the new
procedure, and in Section 5 we describe its implementation and empirical evaluation.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>There are, generally, two kinds of procedures for computing justifications [19] using a
reasoner. Black-Box procedures use a reasoner solely for entailment checking, and thus
can be used for any reasoner and DL. Glass-Box procedures require some additional
information provided from a reasoner, such as inferences that the reasoner has used,
and thus can only work with such reasoners.</p>
      <p>
        In a nutshell, Black-Box procedures [
        <xref ref-type="bibr" rid="ref11 ref12 ref13 ref6">6, 11–13</xref>
        ] add or remove axioms from a set of
axioms (a justification candidate) while maintaining the invariant that the set entails the
given goal logical consequence. An external reasoner is used for checking this
invariant. Finding one justification is relatively easy and can be done by trying to remove each
axiom once and check if the result still entails the goal. If it does not, the removed
axiom is added back. Provided the entailment check takes polynomial time in the number
of all axioms, e.g., in the case of E L, this procedure runs in polynomial time. However,
finding all justifications is hard also in the case of E L, because there may be
exponentially many of them [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Should a procedure for finding one justification be extended to
a procedure for justification enumeration, the main problem is how to prevent repetition
of justifications. Most techniques rely on the hitting set duality that was introduced in
the field of Model Based Diagnosis [
        <xref ref-type="bibr" rid="ref9">9, 20</xref>
        ] and later adapted for DLs [
        <xref ref-type="bibr" rid="ref10 ref13">10, 13</xref>
        ]. Having a
collection of sets, its hitting set contains some element from each of them. A minimal
hitting set of a set of all justifications of some goal is its repair—when removed from
the ontology, the goal is no longer entailed. Having a number of justifications of some
goal, we can find a new one by removing one of their hitting sets from the ontology and
applying the procedure for finding one justification.
      </p>
      <p>
        Many Glass-Box procedures focus on E L, because E L reasoning is relatively
simple and efficient. Some of them employ propositional satisfiability (SAT) solvers. Their
input are inferences recorded by the reasoner during classification of an ontology. The
inferences are used to reduce entailment to satisfiability of Horn clauses. This approach
was first used by EL+SAT [21, 23], that includes an E L reasoner which records the
inferences plus a few optimizations for reducing the set of inferences relevant to the goal.
A common feature of the SAT-based procedures is enumeration of the candidate
axiom sets exploiting the hitting set duality and further minimization of these candidates.
EL+SAT and EL2MUS [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] use two instances of a SAT-solver—one for enumeration of
candidates and the other one for checking whether a candidate entails the goal.
SATPin [17] uses one SAT-solver for both of these tasks and encodes a candidate as the set
of axiom atoms currently assigned true. Enumeration of the same candidate twice is
avoided by adding a blocking clause to the enumerating solver. If a candidate contains
a justification, its blocking clause consists of negated atoms that encode axioms from
that justification. EL+SAT and SATPin block candidates that do not entail the goal in
the same way as justifications. EL2MUS does it in a different way. When its specialized
enumeration solver finds a non-entailing candidate, its complement is automatically a
repair. A repair is blocked by adding a clause consisting of positive atoms of its axioms.
Further differences are that in EL2MUS the entailment checking solver is specialized
for Horn clauses and that EL+SAT and SATPin extract justifications by a deletion-based
procedure, while EL2MUS uses more efficient insertion-based procedure. EL2MCS [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
uses MaxSAT [
        <xref ref-type="bibr" rid="ref1">1, 18</xref>
        ] to enumerate all repairs and extracts justifications from them using
the hitting set duality. BEACON [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a tool that integrates the justification procedure
of EL2MUS.
      </p>
      <p>Up to few optimizations, the mentioned SAT-based procedures use inferences only
for the entailment check. Had they delegated the entailment check to a separate DL
reasoner, they could be considered Black-Box. Our approach uses a similar encoding
of derivability check, however, it does not rely on the hitting set duality and, instead,
manipulates the inferences directly.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Preliminaries</title>
      <p>3.1 Inferences, Supports, and Justifications
In this section, we introduce a general type of inferences that can manipulate any
types of objects, that we call axioms. An inference is an expression inf of the form
h 1; : : : ; n ` i where 1; : : : ; n is a (possibly empty) sequence of axioms called
the premises of inf, and is an axiom called the conclusion of inf. An ontology is a
finite set of axioms.</p>
      <p>Let I be an inference set. An I-derivation from O is a sequence of inferences d =
hinf1; : : : ; infki from I such that for every i with (1 i k), and each premise 0 of
infi that is not in O, there exists j &lt; i such that 0 is the conclusion of infj . An axiom
is derivable from O using I (notation: O `I ) if either 2 O or there exists an
Iderivation d = hinf1; : : : ; infki from O such that is the conclusion of infk. A support
for O `I is a subset of O0 O such that O0 `I . A subset-minimal support for
O `I is called a justification for O `I .</p>
      <p>
        Suppose that j= is an entailment relation between ontologies and axioms. A support
for O j= is a subset of O0 O such that O0 j= . A subset-minimal support for
O j= is called a justification for O j= (also called a minimal axiom set MinA [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]).
An inference h 1; : : : ; n ` i is sound if f 1; : : : ; ng j= . A set of inferences I is
complete for the entailment O j= if O0 j= implies O0 `I for every O0 O.
Note that if I is a set of sound inferences that is complete for the entailment O j=
then O0 j= iff O0 `I for every O0 O. In particular, supports and justifications for
O `I coincide with supports and, respectively, justifications for O j= .
Oe j=
Example 1. Consider the ontology Oe = fA v B u C; A v B; A v Cg over DL
axioms and the axiom e = A v C u B. Assume that some consequence-based
procedure performed inferences Ie = fhA v B u C ` A v Bi, hA v B u C ` A v Ci,
hA v C; A v B ` A v C u Big in order to derive e from O. It is easy to see that
Oe0 = fA v B; A v Cg `Ie e and Oe00 = fA v B u Cg `Ie e, but fA v Bg 6`Ie e
and fA v Cg 6`Ie e. Hence, Oe0 and Oe00 are justifications for Oe `Ie e. All inferences
in Ie are also sound for the standard entailment relation j=. Since Oe0 and Oe00 are the
only two justifications for Oe j= e, the inference set Ie is complete for the entailment
e.
      </p>
      <sec id="sec-3-1">
        <title>Resolution c _ a</title>
        <p>:a _ d
c _ d</p>
      </sec>
      <sec id="sec-3-2">
        <title>Factoring c _ a _ a</title>
        <p>
          c _ a
In this section we introduce the resolution calculus, which is a popular method for
automated theorem proving [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. We will mainly use resolution for propositional Horn
clauses. A (propositional) atom is a propositional variable a. A (propositional) literal is
either an atom l = a (positive literal) or a negation of atom l = :a (negative literal).
A (propositional) clause is a disjunction of literals c = l1 _ _ ln, n 0. As usual,
we do not distinguish between the order of literals in clauses, i.e., we associate clauses
with multisets of literals. Given two clauses c1 and c2, we denote by c1 _ c2 the clause
consisting of all literals from c1 and all literals from c2. A clause is Horn if it has at
most one positive literal. The empty clause is the clause containing n = 0 literals. The
inference rules for the propositional resolution calculus are given in Figure 1. We say
that a set of clauses S is closed under the resolution rules, if every clause derived by the
rules in Figure 1 from S already occurs in S. The resolution calculus is refutationally
complete: a set of clauses S that is closed under the resolution rules is satisfiable if and
only if it does not contain the empty clause. This means that for checking satisfiability
of the input set of clauses, it is sufficient to deductively close this set of clauses under
the resolution rules and check if the empty clause is derived in the closure.
        </p>
        <p>
          To reduce the number of resolution inferences (and hence the size of the closure)
several refinements of the resolution calculus were proposed. The rules in Figure 1 can
be restricted using orderings and selection functions [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. In particular, for Horn clauses,
it is sufficient to select one (positive or negative) literal in each clause, and require that
the resolution inferences are applied only on those (Theorem 7.2 in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]).1 This strategy
is called resolution with free selection. In addition to rule restrictions, one can also use
a number of simplification rules that can remove or replace clauses in the closure S. We
will use two such rules. Elimination of duplicate literals removes all duplicate literals
from a clause (including duplicate negative literals). Subsumption deletion removes a
clause c from S if there exists another sub-clause c0 of c in S, i.e., c = c0 _ c00 for some
(possibly empty) clause c00. In this case we say that c0 subsumes c.
        </p>
        <p>Example 2. Consider the set of Horn clauses 1-7 below. We apply resolution with free
selection that selects the underlined literals in clauses. Clauses 8-10 are obtained by
resolution inferences from clauses shown on the right.</p>
        <p>1: :p1 _ p2
2: :p1 _ p3
3: :p2 _ :p3 _ p4
4: p1
5: p2
6: p3
7: :p4
8: :p3 _ p4 h3; 5i
9: p4 h6; 8i
10: h7; 9i</p>
        <p>Note that the resolution rule was not applied, e.g., to clauses 3 and 6 because literal
:p3 in clause 3 is not selected. Also note that many clauses in the closure above can
be derived by several resolution inferences. For example, clause 5 can be obtained by
1Note that the factoring rule cannot apply to Horn clauses.
resolving clauses 1 and 4 and clause 6 by resolving 2 and 4. Therefore the empty clause
10 can be derived from several subsets of the original clauses 1-7.</p>
        <p>
          Although the resolution calculus is mainly used for checking satisfiability of a
clause set, it can be also used for finding unsatisfiable subsets of clauses. To do this,
it is sufficient to add to every input clause a fresh positive answer literal [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. Resolution
rules can then be applied to the extended clauses on the remaining (ordinary) literals
using the usual orderings and selection functions. Thus, if a clause with answer
literals is derived, then this clause with the answer literals removed, can be derived from
the clauses for which the answer literals were introduced. In particular, if a clause
containing only answer literals is derived, then the set of clauses that corresponds to these
answer literals is unsatisfiable. Completeness of resolution means that all such
unsatisfiable sets of clauses can be found in this way. If answer literals are added to some but not
all clauses and a clause with only answer literals is derived, then the set of clauses that
corresponds to the answer literals plus clauses without answer literals is unsatisfiable.
Example 3. Consider the clauses 1-7 from Example 2. Let us add answer literals a1-a3
to clauses 4-6 and apply the resolution inferences on the remaining (underlined) literals
like in Example 2, eliminating duplicate literals if they appear.
        </p>
        <p>1: :p1 _ p2
2: :p1 _ p3
3: :p2 _ :p3 _ p4
4: p1 _ a1
5: p2 _ a2
6: p3 _ a3
7: :p4
8: p2 _ a1 h1; 4i
9: p3 _ a1 h2; 4i
10: :p3 _ p4 _ a2 h3; 5i
11: :p3 _ p4 _ a1 h3; 8i
12: p4 _ a2 _ a3 h6; 10i
13: p4 _ a1 _ a2 h9; 10i
14: p4 _ a1 _ a3 h6; 11i
15: p4 _ a1 h9; 11i
16: a2 _ a3 h7; 12i
17: a1 _ a2 h7; 13i
18: a1 _ a3 h7; 14i
19: a1 h7; 15i</p>
        <p>The framed clauses 16-19 contain only answer literals, so the corresponding sets of
clauses are unsatisfiable in conjunction with the input clauses without answer literals.
For example, clause 16 means that clauses 1-3, 5-7 are unsatisfiable and clause 19
means that clauses 1-4, 7 are also unsatisfiable. Note that clause 19 subsumes clauses
17-18; if subsumed clauses are deleted, we obtain only clauses with answer literals that
correspond to minimal subsets of clauses 4-6 that are unsatisfiable in conjunction with
the remaining input clauses 1-3, 7.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Enumerating Justifications using Resolution</title>
      <p>In this section, we present a new procedure that, given an ontology O, an inference set I
and a goal axiom g, enumerates justifications for O `I g. It uses the usual reduction
of the derivability problem O `I g to satisfiability of propositional Horn clauses in
combination with the resolution procedure with answer literals.</p>
      <p>Given the derivability problem O `I g, we assign to each axiom i occurring in
I a fresh atom p i . Each inference h 1; : : : ; n ` i 2 I is then translated to the Horn
clause :p 1 _ _ :p n _ p . In addition, for each axiom 2 O that appears in I, we
introduce a (unit) clause p . Finally, we add the clause :p g encoding the assumption
that g is not derivable. It is easy to see that O `I g if and only if the resulting set of
clauses is unsatisfiable.</p>
      <p>We now extend this reduction to find justifications for O `I g. Recall that a subset
O0 O is a support for O `I g if O0 `I g. Hence, the subset of clauses p for
2 O0 is unsatisfiable in combination with the clauses for the encoding of inferences
and :p g . We can find all such minimal subsets (corresponding to justifications) by
adding a fresh answer literal to every clause p with 2 O, and applying resolution on
non-answer literals together with elimination of redundant clauses.</p>
      <p>Example 4. Consider the ontology Oe, inferences Ie and axiom e from Example 1.
To encode the derivability problem Oe `Ie e we assign atoms p1–p4 to the axioms
occurring in Ie as follows:
p1 : A v B u C;
p2 : A v B;
p3 : A v C;
p4 : A v C u B:
The encoding produces clauses 1-7 from Example 3: the inferences Ie are encoded
by clauses 1-3, the axioms in Oe result in clauses 4-6 with answer literals, and the
assumption that e is not derivable is encoded by clause 7. The derived clauses 16-19
correspond to supports of Oe `Ie e, and by eliminating redundant clauses 17-18, we
obtain clauses 16 and 19 that correspond to justifications Oe0 and Oe00 from Example 1.</p>
      <p>One disadvantage of the described procedure is that it requires the closure under the
resolution rules to be fully computed before any justification can be found. Indeed, since
derived clauses may be subsumed by later clauses, one cannot immediately see whether
a clause with only answer literals corresponds to a justification or not. For example,
clauses 17-18 in Example 3 are subsumed by clause 19 that is derived later, and hence
do not correspond to justifications. We address this problem by using non-chronological
application of resolution inferences. Intuitively, instead of processing clauses in the
order in which they are derived, we process clauses containing fewer answer literals
first. Thus, in Example 3, we process clause 15 before clauses 12-14.</p>
      <p>The improved procedure can enumerate justifications, i.e., return justifications one
by one without waiting for the algorithm to terminate. The procedure is described in
Algorithm 1. It is a minor variation of the standard saturation-based procedure for
computing the closure under (resolution) rules, which uses a priority queue to store
unprocessed clauses instead of an ordinary queue. Let - be a total preorder on clauses (a
transitive reflexive relation for which every two clauses are comparable). As usual, we
write c1 c2 if c1 - c2 but c2 6- c1. We say that - is admissible if c1 c2
whenever the set of answer literals of c1 is a proper subset of the set of answer literals of c2.
For example, it is required that :p3 _ p4 _ a1 p4 _ a1 _ a2, but not necessary that
p4 _ a1 p4 _ a2 _ a3. Note that if c is derived by resolution from clauses c1 and c2
then c1 - c and c2 - c since c contains the answer literals of both c1 and c2.</p>
      <p>We say that a clause d (not necessarily occurring in Q) is minimal w.r.t. Q if there
exists no clause c 2 Q such that c d. A priority queue based on - is a queue in which
the remove operation can take out only minimal elements w.r.t. Q.2 Given such a queue
Q, Algorithm 1 initializes it with the translation of the input problem O `I (line 3)
2If there are several minimal elements in the queue, one of them is chosen arbitrarily.
Algorithm 1: Enumeration of justifications using resolution</p>
      <p>Enumerate(O `I , -): enumerate justifications for O `I
input : O `I – the problem for which to enumerate justifications,</p>
      <p>- – an admissible preorder on clauses
1 S createEmptyList() ; // for processed clauses
2 Q createEmptyQueue(-) ; // for unprocessed clauses
3 Q:addAll(encode(O `I )); // add the clause encoding of the problem
4 while Q 6= ; do
5 c Q:remove(); // take one minimal element out of the queue
6 c simplify(c); // remove duplicate literals from c
7 if c is not subsumed by any c0 2 S then
8 S:add(c);
9 if c contains only answer literals then
10 report decode(c); // a new justification is found
11 else // apply resolution rules to c and clauses in S
12 for c0 2 resolve(c,S) do
13 Q:add(c0);
and then repeatedly applies resolution inferences between minimal clauses taken out
of this queue (loop 4-13) and the clauses in S that were processed before. Specifically,
the removed minimal clause c is first simplified by removing duplicate literals (line 6)
and then checked if it is subsumed by previously processed clauses in S (in particular,
if c was processed before). If c is subsumed by some c0 2 S, it is ignored and the next
(minimal) clause is taken from the queue Q. Otherwise, c is added to S (line 8). If c
contains only answer literals, then it corresponds to a justification (as we show next),
which is then reported by the algorithm (line 10). Otherwise, resolution inferences are
then applied on the selected non-answer literal in c (line 12). The new clauses derived
by resolution are then added to Q (line 13) and the loop continues.</p>
      <p>We now prove that Algorithm 1 in line 10 always returns a (new) justification. It is
easy to see that if a clause d was minimal w.r.t. Q in the beginning of the while loop
(line 4) then it remains minimal w.r.t. Q at the end of the loop (line 13). Indeed, for the
clause c taken from the queue (line 5), we have c 6 d. For all clauses c0 obtained by
resolving c with clauses from S (line 12) we have c - c0. Hence c0 6 d for all c0 added
to Q (line 13) (for otherwise, c - c0 d). This, in particular, implies that each clause
in S is always minimal w.r.t. Q and, consequently, if c1 was added to S before c2 then
c1 - c2 (for otherwise c2 c1 and c1 would not be minimal w.r.t. Q when c2 2 Q).
Hence, there cannot be two clauses c1 and c2 in S that contain only answer literals such
that c1 is a proper sub-clause of c2 since in this case c1 c2, thus c2 must be added to
S after c1, but then c2 would be subsumed by c1 (see line 7). Hence each result returned
in line 10 is a (new) justification.</p>
      <p>Since clauses are added to S in the order defined by -, the justifications are also
returned according to this order. Hence Algorithm 1 can return justifications in any
user-defined order - on subsets of axioms as long as s1 ( s2 implies s1 s2. Indeed,
any such an order - can be lifted to an admissible order on clauses by comparing the
sets of answer literals of clauses like the corresponding sets of axioms. For example,
one can define s1 - s2 by jjs1jj jjs2jj where jjsjj is the cardinality of s. Instead of jjsjj
one can use any other measure m(s) that is monotonic over the proper subset relation
(i.e., s1 ( s2 implies m(s1) &lt; m(s2)), e.g., the length of s—the total number of
symbols needed to write down all axioms in s.</p>
    </sec>
    <sec id="sec-5">
      <title>5 Implementation and Evaluation</title>
      <p>We have implemented Algorithm 1 as a part of the new Java-based Proof Utility Library
(PULi).3 In our implementation, we used the standard Java priority queue for Q, and
employed a few optimisations to improve the performance of the algorithm.</p>
      <p>First, we have noticed that our implementation spends over 95% of time on checking
subsumptions in line 7. To improve subsumption checks, we developed a new
datastructure for storing sets of elements and checking if a given set is a superset of some stored
set. In a nutshell, we index the sets by 128 bit vectors, represented as a pair of 64 bit
integers, where each element in a set sets one bit of the bit vector to 1 using its hash
value. This idea is reminiscent of Bloom filters.4 We store the sets in a trie5 with the
bit vector as the key, and use bitwise operations to determine if one vector has all bits
of the other vector, which gives us a necessary condition for set inclusion. Using this
datastructure, we were able to significantly improve the subsumption tests.</p>
      <p>We have also noticed that the queue Q often contains about 10 times more elements
than the closure S. To improve the memory consumption, we do not create the resolvents
c0 immediately (see line 12), but instead store in the queue Q the pairs of clauses (from
S) from which these resolvents were obtained. This does not reduce the number of
elements in the queue, but reduces the memory consumed by each element to essentially
a few pointers.</p>
      <p>
        We have evaluated our implementation on inferences computed for entailed
axioms in some large E L ontologies, and compared performance with SAT-based tools
for enumeration of justifications from inferences EL2MUS [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], EL2MCS [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and
SATPin [17]. The inferences were extracted by EL+SAT [21, 23] (in the following called sat
inferences) and ELK [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] (in the following called elk inferences). Both are capable of
computing small inference sets that derive particular entailed axioms and are complete
for these entailments (see Section 3.1). See Table 2 for statistics about the inferences
obtained for the entailments.
      </p>
      <p>For our evaluation, we chose ontologies GO-PLUS, GALEN and SNOMED, which
contain (mostly) E L axioms. GO-PLUS is a recent version of Gene Ontology,6 which
imports a number of other ontologies. The provided distribution included subsumption
axioms that were inferred (annotated with is_inferred), which we have removed.
GALEN is the version 7 of OpenGALEN.7 We did not use the more recent version 8,</p>
      <sec id="sec-5-1">
        <title>3https://github.com/liveontologies/puli</title>
        <p>4https://en.wikipedia.org/wiki/Bloom_filter
5https://en.wikipedia.org/wiki/Trie
6http://geneontology.org/page/download-ontology
7http://www.opengalen.org/sources/sources.html
because the other tools were running out of memory. SNOMED is the version of Snomed
CT8 released on 2015-01-31. From the first two ontologies we removed non-E L axioms,
such as functional property axioms, and axioms that contain inverse property
expressions and disjunctions. We have also adapted the input ontologies, so that they could
be processed by (the reasoner of) EL+SAT. We removed disjointness axioms and
replaced property equivalences with pairs of property inclusions. Duplicate axioms were
removed by loading and saving the ontologies with OWL API. With these ontologies,
we have computed justifications for the entailed direct subsumptions between atomic
concepts (in the following called the queries) using various tools. All queries were
processed by tools in a fixed random order to achieve a fair distribution of easy and hard
problems. We used a global timeout of one hour for each tool and a local timeout of
one minute per query. To run the experiments we used a PC with Intel Core i5 2.5 GHz
processor and 7.7 GiB RAM operated under 64-bit OS Ubuntu 14.04. Table 1 shows the
numbers of axioms, atomic concepts, atomic roles, and queries of each input ontology.</p>
        <p>
          As an admissible order on clauses for our implementation of Algorithm 1, we chose
the relation - that compares the number of different answer literals in clauses. When
using this order, cardinality-minimal justifications are found first. Note that finding such
justifications is NP-hard [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], however, practically, our algorithm with this order found
first justifications of all the queries of GO-PLUS, GALEN and SNOMED respectively
in about 13 minutes, 2 hours and 1.5 hours. To control resolution inferences, we used
three different selection strategies (for Horn clauses) that we detail next. For a
propositional atom p, let #(p) be the number of input clauses in which p appears as a (positive)
literal. Given a clause c, the BottomUp strategy, selects a negative literal :p of c whose
value #(p) is minimal; if there are no negative literals, the (only) positive literal of c is
selected. The TopDown strategy selects a positive literal, if there is one, and otherwise
selects a negative literal like in BottomUp. Finally, the Threshold strategy selects a
negative literal :p with the minimal value #(p) if #(p) does not exceed a given threshold
value or there is no positive literal in c; otherwise the positive literal is selected. In our
experiments we used the threshold value of 2. Intuitively, the BottomUp strategy
simulates the Unit resolution, the TopDown simulates the SLD resolution, and the Threshold
is a combination thereof.
        </p>
        <p>Table 3 shows for how many queries all justifications were computed within the
global and local timeouts.9 The first six rows correspond to experiments on sat
infer</p>
      </sec>
      <sec id="sec-5-2">
        <title>8http://www.snomed.org/</title>
        <p>9All experimental data is available at https://osf.io/9sj8n/
ences and the other six rows to experiments on elk inferences. Note that every tool
processed more queries and had less relative timeouts on elk inferences. Notice that the
resolution procedure with the Threshold selection strategy processed the most queries
and had the least number of timeouts on all ontologies. In particular, for SNOMED it
timed out only in one case. It turns out, that without any timeout Threshold was able
to find all justifications for all queries of SNOMED within about 1.5 hours, with the
longest query taking less than 4 minutes. None of the SAT-based tools was able to find
all justifications for all queries of SNOMED even within 24 hours.</p>
        <p>To determine whether the Threshold strategy was the best among the resolution
strategies on all queries, we have plotted in Figure 2 the distributions of the query times
for all resolution strategies. Each point hx; yi of a plot represents the proportion x of
queries that were solved by the method in under the time y. For instance, TopDown
solved about 90% of the queries of GALEN in under 0.1 seconds. Each plot considers
only queries attempted by all tools on that plot. Since each plot represents the
distribution of times and not a direct comparison of times for each query, even if one line
is completely below another one, this does not mean that the corresponding method
is faster for every query. To get a more detailed comparison, we have also plotted the
distribution of minimum query times with a thin black line. For a query, minimum time
is the time spent by the tool that was the fastest on that query (among the tools on the
same plot). If a plot for some tool coincides with this black line at point (x; y), then
all queries solved within time y by some tool were also solved within time y by this
tool. In particular, this tool is the fastest for all queries with the minimal time y. This
analysis shows, for example, that TopDown was the best tool for easy queries (solved
under 0.1 seconds by some tool) in GALEN, and Threshold was the best tool for hard
queries (solved over 1 second by all tools) on all ontologies.</p>
        <p>In Figure 3 we present a similar comparison of Threshold with the SAT-based
tools. Threshold comes as the winner for hard queries (solved over 0.1 seconds) in
% of queries
80 90
GO-PLUS
% of queries
80 90</p>
        <p>GALEN
10 scond
e
s
n
i
1 iem</p>
        <p>t
10 scond
e
s
n
i
1 iem</p>
        <p>t
10 scond
e
s
n
i
1 iem</p>
        <p>t
10 scond
e
s
n
i
1 iem</p>
        <p>t
% of queries
80 90
SNOMED
% of queries
80 90
minimum
% of queries
80 90</p>
        <p>SATPin
SNOMED.11 EL2MUS wins on queries solved between about 10 and 50 milliseconds in
GALEN. For all other query ranges, there appears to be no absolute winner.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6 Summary</title>
      <p>We presented a new procedure that enumerates justifications using inferences that
derive the goal consequence from an ontology. The inferences are encoded as Horn clauses
and resolution with answer literals is applied. Our procedure can be parameterized by
an ordering in which the justifications should be enumerated (as long as it extends
the subset relation) and by a strategy that selects literals for resolution. The algorithm
is relatively easy to implement and it can be easily used also with non-Horn and
nonpropositional clauses. Our empirical evaluation shows that the procedure provides
comparable, if not better performance than other tools that also use inferences as input. We
were able to compute all justifications for all direct subsumptions of Snomed CT in
about 1.5 hours. Currently, we cannot explain the difference in the performance of the
evaluated selection strategies. We hope to explore this question in the future.
10Plots on sat inferences have the same shape, except that all lines are shifted up.
11For other ontologies Threshold times out on some query for which some other tool does not.
16. Kazakov, Y., Krötzsch, M., Simancˇík, F.: The incredible ELK: From polynomial procedures
to efficient reasoning with E L ontologies. J. of Automated Reasoning 53(1), 1–61 (2014)
17. Manthey, N., Peñaloza, R., Rudolph, S.: Efficient axiom pinpointing in EL using SAT
technology. In: Lenzerini, M., Peñaloza, R. (eds.) Proc. 29th Int. Workshop on
Description Logics (DL’16). CEUR Workshop Proceedings, vol. 1577. CEUR-WS.org (2016),
http://ceur-ws.org/Vol-1577/paper_33.pdf
18. Morgado, A., Liffiton, M.H., Marques-Silva, J.: Maxsat-based MCS enumeration. In: Biere,
A., Nahir, A., Vos, T.E.J. (eds.) Proc. 8th Int. Haifa Verification Conf. (HVC’12). Lecture
Notes in Computer Science, vol. 7857, pp. 86–101. Springer (2012), http://dx.doi.
org/10.1007/978-3-642-39611-3_13
19. Parsia, B., Sirin, E., Kalyanpur, A.: Debugging OWL ontologies. In: Ellis, A., Hagino, T.
(eds.) Proc. 14th Int. Conf. on World Wide Web (WWW’05). pp. 633–640. ACM (2005),
http://doi.acm.org/10.1145/1060745.1060837
20. Reiter, R.: A theory of diagnosis from first principles. Artif. Intell. 32(1), 57–95 (1987),
http://dx.doi.org/10.1016/0004-3702(87)90062-2
21. Sebastiani, R., Vescovi, M.: Axiom pinpointing in lightweight description logics via
hornsat encoding and conflict analysis. In: Schmidt, R.A. (ed.) Proc. 22st Conf. on Automated
Deduction (CADE’09). Lecture Notes in Computer Science, vol. 5663, pp. 84–99. Springer
(2009), http://dx.doi.org/10.1007/978-3-642-02959-2_6
22. Simancˇík, F., Kazakov, Y., Horrocks, I.: Consequence-based reasoning beyond Horn
ontologies. In: Walsh, T. (ed.) Proc. 22nd Int. Joint Conf. on Artificial Intelligence (IJCAI’11). pp.
1093–1098. AAAI Press/IJCAI (2011)
23. Vescovi, M.: Exploiting SAT and SMT Techniques for Automated Reasoning and Ontology
Manipulation in Description Logics. Ph.D. thesis, University of Trento, Italy (2011), http:
//eprints-phd.biblio.unitn.it/477/</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ansótegui</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonet</surname>
            ,
            <given-names>M.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Levy</surname>
          </string-name>
          , J.:
          <article-title>Sat-based maxsat algorithms</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>196</volume>
          ,
          <fpage>77</fpage>
          -
          <lpage>105</lpage>
          (
          <year>2013</year>
          ), http://dx.doi.org/10.1016/j.artint.
          <year>2013</year>
          .
          <volume>01</volume>
          .002
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Arif</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mencía</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ignatiev</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manthey</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peñaloza</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marques-Silva</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>BEACON: an efficient sat-based tool for debugging EL+ ontologies</article-title>
          . In: Creignou,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Berre</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.L</surname>
          </string-name>
          . (eds.)
          <source>Proc. 19th Int. Conf. on Theory and Applications of Satisfiability Testing (SAT'16). Lecture Notes in Computer Science</source>
          , vol.
          <volume>9710</volume>
          , pp.
          <fpage>521</fpage>
          -
          <lpage>530</lpage>
          . Springer (
          <year>2016</year>
          ), http://dx.doi. org/10.1007/978-3-
          <fpage>319</fpage>
          -40970-2_
          <fpage>32</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Arif</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mencía</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marques-Silva</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Efficient axiom pinpointing with EL2MCS</article-title>
          . In: Hölldobler,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Krötzsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Peñaloza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Rudolph</surname>
          </string-name>
          , S. (eds.)
          <source>Proc. 38th Annual GermanConf. on Artificial Intelligence (KI'15). Lecture Notes in Computer Science</source>
          , vol.
          <volume>9324</volume>
          , pp.
          <fpage>225</fpage>
          -
          <lpage>233</lpage>
          . Springer (
          <year>2015</year>
          ), http://dx.doi.org/10.1007/ 978-3-
          <fpage>319</fpage>
          -24489-1_
          <fpage>17</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Arif</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mencía</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marques-Silva</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Efficient MUS enumeration of horn formulae with applications to axiom pinpointing</article-title>
          .
          <source>CoRR abs/1505</source>
          .04365 (
          <year>2015</year>
          ), http://arxiv.org/ abs/1505.04365
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suntisrivaraporn</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Efficient reasoning in EL+</article-title>
          . In: Parsia,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Sattler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            ,
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <surname>D</surname>
          </string-name>
          . (eds.)
          <source>Proc. 19th Int. Workshop on Description Logics (DL'06)</source>
          .
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>189</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peñaloza</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suntisrivaraporn</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Pinpointing in the description logic EL+</article-title>
          . In: Hertzberg,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Beetz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Englert</surname>
          </string-name>
          ,
          <string-name>
            <surname>R</surname>
          </string-name>
          . (eds.)
          <source>Proc. 30th Annual GermanConf. on Artificial Intelligence (KI'07). Lecture Notes in Computer Science</source>
          , vol.
          <volume>4667</volume>
          , pp.
          <fpage>52</fpage>
          -
          <lpage>67</lpage>
          . Springer (
          <year>2007</year>
          ), https://doi.org/10.1007/978-3-
          <fpage>540</fpage>
          -74565-
          <issue>5</issue>
          _
          <fpage>7</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Bachmair</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ganzinger</surname>
          </string-name>
          , H.:
          <article-title>Resolution theorem proving</article-title>
          . In: Robinson,
          <string-name>
            <given-names>J.A.</given-names>
            ,
            <surname>Voronkov</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . (eds.)
          <source>Handbook of Automated Reasoning</source>
          , pp.
          <fpage>19</fpage>
          -
          <lpage>99</lpage>
          . Elsevier and MIT Press (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Green</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Theorem proving by resolution as a basis for question-answering systems</article-title>
          .
          <source>Machine Intelligence</source>
          pp.
          <fpage>183</fpage>
          -
          <lpage>205</lpage>
          (
          <year>1969</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Greiner</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>B.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wilkerson</surname>
            ,
            <given-names>R.W.:</given-names>
          </string-name>
          <article-title>A correction to the algorithm in reiter's theory of diagnosis</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>41</volume>
          (
          <issue>1</issue>
          ),
          <fpage>79</fpage>
          -
          <lpage>88</lpage>
          (
          <year>1989</year>
          ), http://dx.doi.org/10.1016/
          <fpage>0004</fpage>
          -
          <lpage>3702</lpage>
          (
          <issue>89</issue>
          )
          <fpage>90079</fpage>
          -
          <lpage>9</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Justification based explanation in ontologies</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of Manchester, UK (
          <year>2011</year>
          ), http://www.manchester.ac.uk/escholar/ uk-ac
          <source>-man-scw:131699</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Junker</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>QUICKXPLAIN: preferred explanations and relaxations for over-constrained problems</article-title>
          . In: McGuinness,
          <string-name>
            <given-names>D.L.</given-names>
            ,
            <surname>Ferguson</surname>
          </string-name>
          ,
          <string-name>
            <surname>G</surname>
          </string-name>
          . (eds.)
          <source>Proc. 19th AAAI Conf. on Artificial Intelligence (AAAI'04)</source>
          . pp.
          <fpage>167</fpage>
          -
          <lpage>172</lpage>
          . AAAI Press / The MIT Press (
          <year>2004</year>
          ), http://www. aaai.org/Library/AAAI/
          <year>2004</year>
          /aaai04-
          <fpage>027</fpage>
          .php
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Debugging and Repair of OWL Ontologies</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of Maryland College Park, USA (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sirin</surname>
          </string-name>
          , E.:
          <article-title>Finding all justifications of OWL DL entailments</article-title>
          . In: Aberer,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Choi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.S.</given-names>
            ,
            <surname>Noy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Allemang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.I.</given-names>
            ,
            <surname>Nixon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Golbeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Mika</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Maynard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Mizoguchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Schreiber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Cudré-Mauroux</surname>
          </string-name>
          , P. (eds.)
          <source>Proc. 6th Int. Semantic Web Conf. (ISWC'07)</source>
          . LNCS, vol.
          <volume>4825</volume>
          , pp.
          <fpage>267</fpage>
          -
          <lpage>280</lpage>
          . Springer (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Consequence-driven reasoning for Horn SHIQ ontologies</article-title>
          . In: Boutilier,
          <string-name>
            <surname>C</surname>
          </string-name>
          . (ed.)
          <source>Proc. 21st Int. Joint Conf. on Artificial Intelligence (IJCAI'09)</source>
          . pp.
          <fpage>2040</fpage>
          -
          <lpage>2045</lpage>
          . IJCAI (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klinov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Goal-directed tracing of inferences in EL ontologies</article-title>
          .
          <source>In: The Semantic Web - ISWC 2014 - 13th International Semantic Web Conference, Riva del Garda, Italy, October 19-23</source>
          ,
          <year>2014</year>
          . Proceedings, Part II. pp.
          <fpage>196</fpage>
          -
          <lpage>211</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>