user has to empty C (PS) before giving the PS as the
input of the ABC system.
Given a preferred structure with empty C (PS), the
possible faults of a logical theory are incompatibility
and insufficiency.
Definition 3 (Incompatible and Insufficient).
• An incompatible theory with respect to the prefer-
red structure is one which has a theorem that is in
the false set: ∃β, β ∈ F (PS), T ` β.
• An insufficient theory with respect to the preferred
structure is one in which a proposition that is in
the true set, but is not a theorem of the theory:
∃α, α ∈ T (PS), T 0 α.
The defined faults represent the conflicts between the
input theory and the user’s intention. One of the ap-
plications is when the user verifies a theory by ex-
periments. For example, a professor of medicine is
studying how a medicine affects a human. At first, he
investigated relevant materials, so he had built a set
of axioms in his theory. Then he ran a series of ex-
periments to evaluate his theory. In this scenario, the
result of his experiments could be formalised as a pre-
ferred structure, based on which the conflicts between
his theory and his experimental results correspond to
incompatibility and insufficiency as defined above.
In the swan example, the original theory proves
that Bruce is white, which is an incompatibility, and
not prove that Bruce is black, which is an insuffi-
ciency. The definition of the preferred structure and
the faults defined based on it can reflect the conflicts
between a theory and empirical evidence correctly.
In conclusion, the faults of an object theory to be
repaired in this paper are insufficiency and incompa-
tibility, defined based on a preferred structure repre-
senting the user’s opinion.
2.1.2 Fault Detection
This section shows how to detect the faults of a
Datalog-like theory by employing selected literal (SL)
resolution.
Detecting insufficiency or incompatibility is to
check the provability of a target proposition from a
Datalog-like theory. The inference rule, SL resolution
(Kowalski and Kuehner, 1971) can do this detection,
which follows the principles:
• Select one of the most recently introduced literals
to be resolved upon.
• Resolve the selected literal with an input clause.
SL resolution is not only sound and complete (Gal-
lier, 2003), but also decidable for Datalog-like the-
ories (Pfenning, 2006) so that proofs can always be
detected if there are any.
For reducing the search space, proof discovery
process starts with resolving a goal, with an input
clause whose head is complementary to the goal. As
an axiom in Datalog-like theory is a Horn clause,
which has at most one positive literal, the most re-
cently introduced literals of a nonempty resolvent
could only be a disjunction of negative literals, cal-
led sub-goals here. Then we continually resolve the
first sub-goal, with an input clause. Again, either an
empty clause or a clause of a disjunction of negative
literals would be the result. Repeat this process until
no resolution step is available. If it ends up with an
empty clause, refutation occurs, which means that the
input theory proves the goal clause.
For detecting incompatibility, the negation of a vi-
olative proposition in F (PS) is set as the initial goal
for refutation based on the input theory. Every viola-
tive proposition, in turn, is checked in the same way.
Incompatibility is detected if the input theory proves
a violative proposition. ⊥ will represent false.
T is incompatible wrt β, iff T
0
` ⊥,
where T
0
= T ∪ {¬β}, β ∈ F (PS). (3)
For example, Figure 2 shows how the Swan the-
ory proves the violative proposition of the PS,
White(Bruce). There are four proof steps in total. In
proof step 1, the initial goal is the negation of the vio-
lative proposition, White(Bruce)⇒, which is resolved
with the head of axiom A2, White(x), by substituting
Bruce for x. In the same way, European and German
are resolved in proof step 2 and 3 respectively. In
proof step 4, the empty clause is derived, which me-
ans that the input Swan theory proves White(Bruce),
so the Swan theory is incompatible.
As for a sufficient theory, all the preferred propo-
sitions should be logical consequences of the object
theory. Similar to detecting incompatibility, preferred
propositions need to be checked one by one. By nega-
ting a preferred proposition into a goal, the theory can
be concluded to be sufficient concerning the preferred
proposition if and only if resolving the goal with the
input theory results in an empty clause. Otherwise,
the object theory is insufficient. Repeat the process
until all the preferred propositions are checked.
T is insufficient wrt α, iff T
0
0 ⊥,
where T
0
= T ∪ {¬α}, α ∈ T (PS) (4)
At each resolution in the proof, there is always
one parent being an input clause. When generating
repairs, we can directly change the parent which is an
input clause with no traceback needed.
ABC Repair System for Datalog-like Theories
337