<!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>Unifying Justi cations and Debugging for Answer-Set Programs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carlos Viegas Damasio (e-mail: cd@fct.unl.pt)</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>Anastasia Analyti (analyti@ics.forth.gr)</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Computer Science</institution>
          ,
          <addr-line>FORTH-ICS, Crete</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>NOVA LINCS, Universidade Nova de Lisboa</institution>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <history>
        <date date-type="accepted">
          <day>5</day>
          <month>6</month>
          <year>2015</year>
        </date>
      </history>
      <abstract>
        <p>Recently, (Viegas Damasio et al. 2013) introduced a way to construct propositional formulae encoding provenance information for logic programs. From these formulae, justi cations for a given interpretation are extracted but it does not explain why such interpretation is not an answer-set (debugging). Resorting to a meta-programming transformation for debugging logic programs, (Gebser et al. 2008) does the converse. Here we unify these complementary approaches using meta-programming transformations. First, an answer-set program is constructed in order to generate every provenance propositional models for a program, both for well-founded and answer-set semantics, suggesting alternative repairs to bring about (or not) a given interpretation. In particular, we identify what changes must be made to a program in order for an interpretation to be an answer-set, thus providing the basis to relate provenance with debugging. With this meta-programming method, one does not have the need to generate the provenance propositional formulas and thus obtain debugging and justi cation models directly from the transformed program. This enables computing provenance answer-sets in an easy way by using AS solvers. We show that the provenance approach generalizes the debugging one, since any error has a counterpart provenance but not the other way around. Because the method we propose is based on meta-programming, we extended an existing tool and developed a proof-of-concept built to help computing our models.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction and Background</title>
      <p>
        Theoretical results leading to tools for debugging answer-set programs have in the
last few years been identi ed as a crucial prerequisite for a wider acceptance of
answer-set programming (ASP). Tracing approaches
        <xref ref-type="bibr" rid="ref2">(Bsusoniu et al. 2013)</xref>
        expose
the user to the intricacies of reasoners
        <xref ref-type="bibr" rid="ref1">(Brain et al. 2007)</xref>
        and declarative debugging
approaches based in meta-programming techniques have instead been developed.
But, one needs to understand why some interpretation is an answer-set (AS) {
justi cations { while understanding why some other interpretation is not an AS
{ debugging.
      </p>
      <sec id="sec-1-1">
        <title>Example 1</title>
        <p>Consider = fr1 : a b: r2 : a not b:g. Besides knowing a is true in the single
AS of , it is also be important to know that a is true because rules r1 and r2 are
in , independently of what we can conclude about b. Another possible justi cation
(among others) for a being true is that r2 is in and b has no support. Of course,
if one intends a to be false then there is a bug in , with one justi cation being
that rule r2 is unsatis ed.</p>
        <p>
          In
          <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
          , each literal can be associated with its why not
provenance (WnP), i.e. a logical propositional formula explaining why a literal is
true or false in an AS. In Example 1, formula W hy(a) = r1 ^ :not(b) _ r2 ^ not(b) _
:not(a) is obtained for literal a and its negation for not a. Clearly, r1 ^ r2 j=
W hy(a) is an intuitive justi cation for a. This provenance approach is capable
of providing the corrections (adding or removing facts, and removing rules, e.g.
not(a) ^ not(b) ^ :r2 j= :W hy(a) in Ex. 1) that are necessary in order to bring
about certain intended models.
        </p>
        <p>
          Debugging ASP programs has been addressed in the literature by several
authors, and the most e ective approaches resort to meta-transformations to detect
the diverse forms of anomalies in programs
          <xref ref-type="bibr" rid="ref1 ref12 ref15 ref9">(Brain et al. 2007; Gebser et al. 2008;
Oetsch et al. 2010; Polleres et al. 2013)</xref>
          . Being ne grained, these are designed to
pinpoint errors in LPs. Provenance formulas are inspired by a program
transformation previously de ned for declarative debugging of LPs
          <xref ref-type="bibr" rid="ref14">(Pereira et al. 1993)</xref>
          and
have been conjectured to be related
          <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
          with debugging.
        </p>
        <p>
          The most important contributions we make are (1) bridging the gap between
provenance models and LPs using meta-programming for ASP (2) unifying these
two complementary approaches by mapping provenance models with debugging
models
          <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
          (3) obtain justi cations under the well-founded (WF)
and AS semantics without calculating WnP formulae for a LP.
        </p>
        <p>Structure Overview { Next we review relevant LP formalisms followed by debugging
and provenance literature. In Section 2 we introduce a novel meta-programming
transformation both for WF and AS semantics that is used to obtain models for
WnP formulas of a given LP. We clarify which models are justi cations, de ne
them in terms of AS existence for the meta-program and discuss computational
complexity. Section 3 provides a new mapping between our and the debugging
transformations, showing that provenance captures debugging models but not the
other way around. We end with a discussion, a comparison of these approaches with
others in the literature and possible future work.</p>
        <sec id="sec-1-1-1">
          <title>1.1 Logic Programming Formalisms</title>
          <p>Normal logic programs (NLP) are sets of rules r of the following form:
r : A1</p>
          <p>A2; : : : ; Am; not Am+1; : : : ; not An:s:t:; (n
m
where each Ai is a logical atom without function symbols. Let Head(r) = fA1g,
Body+(r) = fA2; : : : ; Amg, Body (r) = fAm+1; : : : ; Ang, and Body(r) = Body+(r)[
not Body (r). An (explicit) integrity constraint (IC) is a rule with the following
form: r : Head(r) Body(r); not Head(r): while its implicit form is r: Body(r):</p>
          <p>A program is de nite (or positive) if it has no negated atoms. A disjunctive logic
program (DLP) allows disjunction in the heads of rules. Without loss of generality,
we assume that programs are grounded, and Gr( ) denotes the program obtained
from by instantiating variables with constants occurring in . The Herbrand
Base H of a program is formed by the set of atoms occurring in it.</p>
          <p>Given a set of literals J , let not J = fa j not a 2 J g [ fnot a j a 2 J s.t., for
each b, a 6= not bg. A two-valued interpretation is a subset of H specifying the
true atoms, and a partial interpretation is a subset of H [ not H (absent literals
are unde ned).</p>
          <p>A two-valued interpretation I corresponds to the partial interpretation I[not (H n
I). The least model least( ) of a de nite program is the least xpoint of operator
T (I) = fHead(r) j r 2 ^ Body(r) Ig, where I is a two-valued interpretation.</p>
          <p>The answer-sets of NLP are xpoints of (I) = least( I ), where I =
fHead(r) Body+(r) j r 2 ; Body (r) \ I = ;g.</p>
          <p>The well-founded model (WFM) of is T [ not F where T and F are
interpretations s.t., T \ F = ;, T is the least xpoint T = ( (T )) = 2(T ) and
F = H n (T ).</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>1.2 Debugging</title>
          <p>
            Debugging of LPs and in particular ASP has received important contributions over
the last years. e.g.,
            <xref ref-type="bibr" rid="ref4">(Eiter et al. 2010)</xref>
            provided two approaches for explaining
inconsistency, both of which characterize inconsistency in terms of bridge rules: by
pointing out rules which need to be altered for restoring consistency, and by nding
combinations of rules which cause inconsistency.
          </p>
          <p>
            We are mostly interested in
            <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
            though, where a meta-programming
technique for debugging ASPs is presented. Debugging queries are expressed by
means of ASP programs, which allows restricting debugging information to
relevant parts. The main question addressed is: "Why are interpretations expected to
be answer-sets, not answer-sets of a given ASP program?" Thus it nds
semantic errors in programs. The provided explanations are based on a scheme of errors
relying in a characterization of AS semantics by
            <xref ref-type="bibr" rid="ref11 ref6">(Lee 2005; Ferraris et al. 2007)</xref>
            .
However, these approaches do not answer the question of why a given (possibly
unintended) interpretation is indeed an AS. In Theorem 2 of
            <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
            ,
the four possible causes of errors dealt with by their debugging framework are:
Unsatis ed rules: If rule r 2 Gr( ), with nonempty Head(r), is unsatis ed by I, the
logical implication expressed by r is false under I, i.e. I j= Body(r) and Head(r) 62 I,
and thus I is not a classical model of .
          </p>
          <p>Violated integrity constraints: If an IC c 2 Gr( ) is applicable under I, the fact that</p>
          <p>Head(c) 6= ; implies I 6j= Body(c), and thus I cannot be an answer-set of .
Unsupported atoms: If fag I is unsupported with respect to I, no rule in Gr( )
allows for deriving a, and thus I is not a minimal model of I .
Unfounded loops: If a loop I of
acyclic derivation for the atoms in</p>
          <p>is unfounded with respect to I, there is no
, and thus I is not a minimal model of I .</p>
          <p>They construct a meta-program (Fig. 1.2) from a given program
and
interpretation I that is capable of detecting the above errors via occurrences of the following
error-indicating meta-atoms in its answer-sets: unsatisf ied(lr) indicates that a rule
uf Loop(la) indicates that an atom a belongs to some unfounded loop
r 2 Gr( ) is unsatis ed by I; violated(lc) indicates that an IC c 2 Gr( ) is
violated under I; unsupported(la) indicates that an atom a 2 I is unsupported; and
I of
with respect to I.</p>
          <p>int =fint(A)
int(A)
atom(A); not int(A):
atom(A); not int(A):g
sat = fhasHead(R)
someHInI(R)</p>
          <p>violated(C)
unsatisf ied(R)
head(R; ):
head(R; A); int(A):
ap(C); not hasHead(C):hasHead(R);
ap(R); not someHInI(R):g
supp =funsupported(A)</p>
          <p>supported(A)
otherHInI(R; A1)
noas =fnoAnswerSet
noAnswerSet
ap =fbl(R)
bl(R)
ap(R)
ufloop =fuf Loop(A)</p>
          <p>uf loop(A)
someBInLoop(R)
someHOutLoop(R)
dpcy(A1; A2)
dpcy(A1; A2)
int(A); not supported(A):
head(R; A); ap(R); not otherHInI(R; A):
head(R; A2); int(A2); head(R; A1); A1 6= A2:g
unsatisf ied( ):
unsupported( ):
not noAnswerSet:g
Body+(R; A); int((A):
Body (R; A); int(A):g
rule(R); not bl(R):
noAnswerSet
noAnswerSet
violated( ):
uf Loop( ):
%blocked rules
%applicable rules
int(A); supported(A); not uf loop(A):
int(A); not uf Loop(A):
Body+(R; A); uf Loop(A):
head(R; A); uf loop((A):
dpcy(A1; A3); dpcy(A3; A2):
head(R; A1); Body+(R; A2); ap(R); uf Loop(A1); uf Loop(A2);</p>
          <p>not someHOutLoop(R):
head(R; A); uf Loop(A); ap(R); not someHOutLoop(R);</p>
          <p>not someBInLoop(R):
uf Loop(A1); uf Loop(A2); not dpcy(A1; A2):g</p>
          <p>
            In
            <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
            , the authors de ne the input meta-program
in( ) from
(note that we restrict our discussion to NLPs) as the
followj r 2
          </p>
          <p>; a 2 Head(r)g[ fBody+(lr; la)
in( ) = fatom(la)
ja 2 At( )g[ frule(lr)
fBody (lr; la) j r 2
ing which rules and atoms occur in
; a 2 Body (r)g. Program</p>
          <p>in(
and, for each rule r 2
contained in Head(r), Body+(r), and Body (r), respectively. Given
in( ), the
non-disjunctive meta-program D( ) is de ned as follows:</p>
          <p>Let
be a ground DLP. Then, the meta-program D( ) for
consists of in( )
j r 2
) consists of facts
stat</p>
          <p>j r 2 g[
; a 2 Body+(r)g[
, which atoms are
together with the modules of Fig. 1, i.e., D( ) = in( ) [ int [ ap [ sat [ supp [</p>
        </sec>
      </sec>
      <sec id="sec-1-2">
        <title>Example 2</title>
        <p>
          Consider program fr1 : a b; c: r2 : b d: r3 : b not e: f1 : c: f2 : d:g, for
which an intended AS is I = fb; c; d; e; f g. An explanation for I not being an AS
is that r1 is unsatis ed and e is unsupported. On the onther hand,
          <xref ref-type="bibr" rid="ref9">(Gebser et al.
2008)</xref>
          cannot say why fa; b; c; dg is an AS because a is true due to d being true due
to e being false.
        </p>
        <sec id="sec-1-2-1">
          <title>1.3 Provenance</title>
          <p>
            In turn,
            <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
            presents a declarative logical approach to
extract WnP information for logic programs. Using values of a freely generated
Boolean algebra as annotation tags for atoms, they specify WnP for positive and
NLPs under WF semantics, and relate it to abduction and calculation of prime
implicants. The approach generalizes to ASP. These WnP formulae are used to
determine provenance of literals true in a given model, and are shown in
            <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
            to extend the approaches of evidence graphs
            <xref ref-type="bibr" rid="ref13">(Pemmasani
et al. 2004)</xref>
            and o -line justi cations
            <xref ref-type="bibr" rid="ref16">(Pontelli et al. 2009)</xref>
            . In the remaining of this
section, assume that an LP over H is given. Why not provenance is de ned
in
            <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
            and summarized bellow:
          </p>
          <p>Let B be the free Boolean algebra generated by propositional variables H [
not(H ) [ frij1 i j jg, where for each rule of there is a unique and distinct
rule identi er ri. Elements of B are the equivalence classes of propositional
formulas under logical equivalence, and the partial ordering of B is entailment: [ ] [ ]
i j= . Thus B is a lattice, with join and meet de ned by [ ] [ ] = [ _ ],
[ ] [ ] = [ ^ ], and let [ ] [ ] = [ ^ : ]. WnP is extracted with monotonic
multivalued programs and a WnP program P over H is de ned as:</p>
          <p>Let a WnP program P be formed by rules of the form A ( [J ] B1 : : : Bm
with m 0, and where [J ] 2 B and A; B1; : : : ; Bm 2 H . An interpretation I
for P is a mapping I : H ! B . The set of all interpretations is a lattice with
point-wise ordering. An interpretation I satis es a rule A ( [J ] B1 : : : Bm of
program P i I(A) [J ] I(B1) : : : I(Bm) i J ^ I(B1) ^ : : : ^ I(Bm) j= I(A).
Interpretation I is a model of P i I satis es all the rules of P.</p>
          <p>The monotonicity of P guarantees the existence of a least model MP for it, and by
mimicking the construction of a Gelfond-Lifschitz like operator, WnP for LPs under
WF semantics is de ned. The rationale for P is: If a program P has some fact A
(resp. no fact for A), WnP formula for A is [(ri ^ W hyi) _ : : : _ (rj ^ W hyj ) _ A]
(resp. [(ri ^ W hyi) _ : : : _ (rj ^ W hyj ) _ :not(A)]). A justi cation for A is [A]
meaning there is a fact for A. Other justi cations are obtained using a rule rk
and justifying why its body is true. The later case (denoted before by 'resp.')
is better understood taking the justi cation for not A which has WnP formula
[:(ri ^ W hyi) ^ : : : ^ :(rj ^ W hyj ) ^ not(A)], expressing that all bodies must be
falsi ed and [not(A)] holds.</p>
          <p>Provenance program PI is constructed from
follows:</p>
          <p>For the ith rule A B1; : : : ; Bm; not C1; : : : ; not Cn (m + n 1) in
provenance rule A ( [ri ^ :I(C1) ^ : : : :I(Cn)] B1 : : : Bm to PI ;
8A 2 H , if A 2 (resp. A 2= ) add A ( [A] (resp. A ( [:not(A)]) to PI .
Operator G (I) = M P returns the least model of PI .</p>
          <p>I
and WnP interpretation I as
add</p>
          <p>Operator G is anti-monotonic, and therefore G2 is monotonic having a least
model T , corresponding to provenance information for what is true in the WFM,
while TU = G (T ) contains the WnP of what is true or unde ned in the WFM
of . The following de nitions capturing Why-not provenance information
under the well-founded semantics are then provided:</p>
          <p>Let T be the least model of G2 , TU = G (T ), and A be an atom. Let
W hy (A) = [T (A)], W hy (not A) = [:TU (A)], and W hy (undef A) = [:T (A)^
TU (A)].</p>
        </sec>
      </sec>
      <sec id="sec-1-3">
        <title>Theorem 1 (Provenance Models for WF Semantics (Viegas Damasio et al. 2013))</title>
        <p>Let G 2= and F 2 (resp. R 2 ) be sets of facts (resp. rules). Literal
L 2 W F M (( n(F [R))[G) i there is a conjunction of literals C j= W hy (L) s.t.,
RemoveF acts(C) F; KeepF acts(C)\F = ;; RemoveRules(C) R; KeepRules(C)\
R = ;; M issingF acts(C) G; and N oF acts(C) \ G = ; where N oF acts(C) (resp.
M issingF acts(C) ) are facts that cannot (resp. must) be added:</p>
        <p>KeepFacts(C) = fA: j A 2 F g RemoveFacts(C) = fA: j :A 2 F g
KeepRules(C) = fri : A Body j ri 2 R and ri 2 g
RemoveRules(C) = fri : A Body j :ri 2 R and ri 2 g</p>
        <p>NoFacts(C) = fA: j not(A) 2 Gg MissingFacts(C) = fA: j :not(A) 2 Gg</p>
      </sec>
      <sec id="sec-1-4">
        <title>Example 3 (From (Viegas Damasio et al. 2013))</title>
        <p>
          Consider again program in Ex. 2. Its WnP information is:
W hy(a) = [r1 ^ c ^ ((r2 ^ d) _ (r3 ^ not(e)) _ :not(b)) _ :not(a)]
W hy(not a)= [not(a) ^ (:r1 _ :c _ (not(b) ^ (:r2 _ :d) ^ (:r3 _ :not(e)))]
W hy(b) = [(r2 ^ d) _ (r3 ^ not(e)) _ :not(b)]
W hy(not b) = [not(b) ^ (:r2 _ :d) ^ (:r3 _ :not(e))]
W hy(c) = [c] W hy(not c) = [:c] W hy(d) = [d]
W hy(not d)= [:d] W hy(e) = [:not(e)] W hy(not e) =
The provenance for a being false, and all other atoms true is derived from the
models of W hy(not a) ^ W hy(b) ^ W hy(c) ^ W hy(d) ^ W hy(e) = not(a) ^ :r1 ^
(r2 _ :not(b)) ^ c ^ d ^ :not(e), thus a fact for a must be absent, we have to remove
rule r1, keep rule r2 or add fact b, keep facts c and d, and add fact e.
          <xref ref-type="bibr" rid="ref9">(Gebser
et al. 2008)</xref>
          detects that rule r1 is unsatis ed and e is unsupported but it does not
determine provenance for a. One way to make a true is to simply add a fact for
it; alternatively r1 must be kept in as well as facts c and b. This is achieved by:
keeping r2 and d; keeping r3 and not adding e; adding b.
[not(e)]
One obtains AS provenance from the WFM provence basically by forcing all atoms
to be either positive or negative, i.e., non-unde ned, and using the provenance
determined for the WF semantics (see examples in Section 2).
        </p>
        <p>Justi cations are de ned as: Given a logic program and a literal l, a justi
cation J for l in as an implicant of the why provenance formula W hy (l) , i.e.
a conjunction of literals s.t., J j= W hy (l). The implicant is prime if there is no
other implicant J 0 of W hy (l) with less literals.</p>
        <p>
          Note that it has been proved in
          <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
          that evidence
graphs
          <xref ref-type="bibr" rid="ref13">(Pemmasani et al. 2004)</xref>
          and o -line justi cations
          <xref ref-type="bibr" rid="ref16">(Pontelli et al. 2009)</xref>
          models can all be captured by WnP implicants, but some of our justi cations cannot
be mapped by them. Also related to provenance are causal chains
          <xref ref-type="bibr" rid="ref3">(Cabalar and
Fandin~o 2013)</xref>
          where a multi-valued semantics for NLPs whose truth values form a
lattice of causal chains is provided. A causal chain is a concatenation of rule labels
re ecting some sequence of rule applications.
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2 Contributions: Meta-Transformation for Provenance Formulae</title>
      <p>
        We de ne here a novel program transformation, capable of obtaining all models
of WnP formulae, composed of two parts: (1) a set of common modules in Fig. 2,
shared by speci c transformations for WF and AS semantics; (2) WF speci c
modules in Fig. 3. Its vocabulary is based in
        <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
        to ease their subsequent
combining. We only deal with the non-disjunctive case and ICs must be in their
explicit form.
      </p>
      <p>fact = ff act(X)
hasBody(R)
hasBody(R)
Rules = fkeepRule(X)</p>
      <p>removeRule(X)
F acts = fmissingF act(X)
noF act(X)
rule(R); head(R; X); not hasBody(R):
rule(R); bodyP (R; A):
rule(R); bodyN (R; A):g
rule(X); not removeRule(X):
rule(X); not keepRule(X):g
atom(X); not f act(X); not noF act(X):
atom(X); not f act(X); not missingF act(X):g</p>
      <p>Module fact 2 common de nes facts as rules in the program having empty
bodies. Module fact assumes that module in 2 D( ) (Fig. 1.2) will also be
applied, since it depends on all facts de ned in in. Modules Rules and F acts
are the generators for propositional variables used in the provenance formulae in
the vocabulary of Theorem 1. Note that in Rules the provenance propositional
variables for facts H are captured by keepRule=1 since, for generality purposes,
rule=1 represents both rule and fact identi ers.
ttu = f
t(H)
t(H)
tu(H)
tu(H)
tu(H)
atom(A); t(A); not tu(A):
head(R; H); not ap(R; t); not ap(R; tu); not undef (H); removeRule(R):
head(R; H); keepRule(R); ap(R; t); not undef (H):
atom(H); missingF act(H); not f act(H); not undef (H):
head(R; H); keepRule(R); ap(R; tu):
atom(H); missingF act(H); not f act(H):
atom(H); undef (H):g
apttu( ) = fap(ri; t)
ap(ri; tu)
j A
t(B1); : : : t(Bm); not tu(C1); : : : ; not tu(Cn):;
tu(B1); : : : tu(Bm); not t(C1); : : : ; not t(Cn):</p>
      <p>B1; : : : Bm; not C1; : : : ; not Cn 2 and identi ed by ri:g</p>
      <sec id="sec-2-1">
        <title>2.1 Provenance for the WF Semantics</title>
        <p>
          A provenance program under the WF semantics is captured by wfs combined
with debugging modules common and in. Module ttu encodes the 2 operator
for the program subject to changes de ned by pairs keepRule=removeRule and
missingF act=noF act, where predicate t=1 represents what is true (the outer ),
and tu=1 what is true or unde ned (the inner ). The constraint discards models
where assignments are contradictory, ensuring that t(A) ) tu(A) for every atom
A. The module also uses an extra meta-predicate undef =1 that allows to make
an atom unde ned, a new kind of change not captured by the original provenance
model for WF semantics that is included for the sake of completeness. Module
apttu determines when a rule is applicable in the outer (ap(R; t)), and inner steps
(ap(R; tu)), and generalizes module ap of
          <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
          .
        </p>
        <sec id="sec-2-1-1">
          <title>Lemma 1</title>
          <p>Given a logic program and a propositional model M of formula W hy (L) for a
literal L, then there is an AS M 0 of W ( ) = in( ) [ common [ wfs( ) s.t.:
If A 2 H s.t., fact A 2 and A 2 M then keepRule(rA ) 2 M 0 and
removeRule(rA ) 62 M 0
If A 2 H s.t., fact A 2 and A 62 M then keepRule(rA ) 62 M 0 and
removeRule(rA ) 2 M 0
If not(A) 2 H s.t., no fact A in and not(A) 62 M then missingF act(A) 2
M 0 and noF act(A) 62 M 0
If not(A) 2 H s.t., no fact A in and not(A) 2 M then missingF act(A) 62
M 0 and noF act(A) 2 M 0
If ri 2 M then keepRule(ri) 2 M 0 and removeRule(ri) 62 M 0</p>
          <p>If ri 62 M then keepRule(ri) 62 M 0 and removeRule(ri) 2 M 0</p>
          <p>For the converse direction extra answer-sets of W ( ) may be generated. When
we x the changes to all partial stable models (PSM) of the changed program
are obtained, i.e. all xpoints of 2, instead of solely the least xpoint of 2. These
models can be ltered out by guaranteeing minimality of the model. This is captured
in the following Lemmata:</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Lemma 2</title>
          <p>Let M 0 2 AS(W ( ) = in( ) [ common [ wfs( )) and M odel(M 0) = fA j t(A) 2
M 0g [ fnot A j tu(A) 62 M 0g. Construct program 0 by deleting from every rule
identi ed by ri s.t., removeRule(ri) 2 M 0, and adding a fact A in 0 for every
missingF act(rA ) 2 M 0. Then, M odel(M 0) is a PSM of 0. Conversely, if 0 is
a program obtained deleting rules or adding facts, then every PSM of 0 has a
corresponding AS in W ( ).</p>
        </sec>
        <sec id="sec-2-1-3">
          <title>Lemma 3</title>
          <p>Let M 0 be an AS of W ( ) = in( ) [ common [ wfs( ), s.t., there is no AS M 00
of W ( ) with M odel(M 00) ( M odel(M 0). Let M be the model obtained from M 0
by reverting transformation in Lemma 1. Then, M is a model of W hy (L) for each
L 2 M 0.</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>Example 4</title>
          <p>Recall now Ex. 2, to which we apply transformation W ( ) where in( ) = fhead(r1; a):
bodyP (r1; b): bodyP (r1; c): head(r2; b): bodyP (r2; d): head(r3; b): bodyN (r3; e): head(f1; c):
head(f2; d):g. W ( ) has 256 answer-sets corresponding to all possible changes to
by removing or keeping rules, and adding or not facts. Of these answer-sets,
6 correspond to a being false and all other atoms true, and are in exact
correspondence with the propositional models of formula not(a)^ :r1^ (r2 _ :not(b))^
c ^ d ^ :not(e) obtained in Ex. 3. All answer-sets below contain1 fnoF act(a);
removeRule(r1); keepRule(f1; f2); missingF act(e)g, corresponding to conjuncts
not(a); :r1; c; d; :not(e) of the previous formula and are ltered for readability:
fkeepRule(r2; r3); missingF act(b)g
fkeepRule(r2; r3); noF act(b)g
fkeepRule(r2); removeRule(r3); missingF act(b)g
fkeepRule(r2); removeRule(r3); noF act(b)g
fremoveRule(r2); keepRule(r3); missingF act(b)g
fremoveRule(r2; r3); missingF act(b)g
There are 151 possible AS explaining why a is true, corresponding to the 151 models
of W hy (a).</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Provenance for the Answer-Set Semantics</title>
        <p>Forbidding unde ned atoms in the model and disallowing models where t=1 does not
occur when tu=1 occurs (Fig. 4), adapts the WF transformation presented before
to the AS semantics.</p>
        <p>Theorem 2 follows from the above Lemmata 1, 2 and 3 for the WF semantics,
but rst we need an auxiliary notion de ning what is the WnP of an intended AS:
1 we denote a set of predicates fa(X); :::; a(Y )g as a(X; :::; Y )
as( ) = common [ wfs( ) [ f
atom(A); tu(A); not t(A):</p>
        <p>atom(A); undef (A):g</p>
        <sec id="sec-2-2-1">
          <title>De nition 1 (Why not provenance for an interpretation )</title>
          <p>Let be a logic program and I an interpretation. The AS WnP for I is:
AnsW hyI = ^ AnsW hy (A) ^ AnsW hy (not A) ^ f:rjA 2 Head(r)g
8A2I
8A62I
8A62I</p>
          <p>Intuitively, the WnP for an interpretation I is the intersection of the WnP for
its positive (and negative) atoms. We then select WnP formulae containing :r for
every r 2 s.t., an atom A 2= I belongs to Head(r) which e ectively avoids
considering rules giving support to unintended atoms, and thus providing unnecessary
justi cations. This forms a restricted class, containing interesting WnP formulas,
for which the following applies:</p>
        </sec>
        <sec id="sec-2-2-2">
          <title>Theorem 2 (WnP models for the AS semantics )</title>
          <p>Given a logic program , and an interpretation I, then the answer-sets of
transformed program S( ) = in( ) [ as( ) s.t., M odel(M ) = I are in 1:1
correspondence with the models of AnsW hyI .</p>
          <p>These models are complete in the sense they provide all possible justi cations for
an AS or all explanations for why an interpretation is not a model. These can then
be minimized according to whatever criteria one might have, e.g., subset minimality,
minimal changes to the program, disallowing or preferring certain repair operations
over others etc., which can be captured by optimization constraints supported by
the major ASP solvers.</p>
          <p>Consider now again the program in Example 2: fa c; not b: b not a: d
not c; not d: c not e: e f: f e:g. This program has answer-sets A1 : fa; cg
and A2 : fb; cg. Below are some of the 144 WnP models for A1 from which we
select the ones presenting intuitive explanations (model selection is clari ed next)
from all of which the following literals are omitted: F = fkeepRule(r2; r3; r5; r6);
noF act(b; d; e; f ); t(a; c)g: (1) fremoveRule(r1); keepRule(r4); missingF act(a; c)g
(2) fremoveRule(r1; r4); missingF act(a; c)g (3) fremoveRule(r1); keepRule(r4);
missingF act(a); noF act(c)g (4) fkeepRule(r1); removeRule(r4); noF act(a); missingF act(c)g
(5) fkeepRule(r1; r4); missingF act(a; c)g (6) fkeepRule(r1; r4); noF act(a); missingF act(c)g
(7) fkeepRule(r1; r4); missingF act(a); noF act(c)g (8) fkeepRule(r1); removeRule(r4);
missingF act(a; c)g (9) fkeepRule(r1; r4); noF act(a; c)g</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Contributions: Mapping Provenance with Debugging</title>
      <p>
        As shown before, our meta-transformation produces a model for each WnP model
and some can be aligned with debugging models calculated by
        <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
        .
These approaches complement each other: we produce provenance models for
existing answer-sets, while the debugging approach is capable of obtaining more speci c
results regarding the non-existence of answer-sets, namely in the presence of
unfounded loops. So, we need to impose equivalence between predicates int=1 and t=1
(see Fig. 5) and thus introduce of module map. The resulting models consist of
two parts, one stating what is the problem with the interpretation at hand
(corresponding to the debugging part) and the other o ering a justi cation for why this
interpretation is a model of the program (corresponding to the provenance part).
t int = f
      </p>
      <p>ics = f
prune = f
atom(A); int(A); not t(A):
atom(A); int(A); t(A):g
rule(R); violated(R); keepRule(R):g
rule(R); removeRule(R); not ap(R):
atom(A); missingF act(A); supported(A); not uf Loop(A):
atom(A); noF act(A); supported(A); uf Loop(A):g</p>
      <p>Fig. 5. Transformation map = t int [ ics [ prune</p>
      <p>Module t int ensures that atoms int and t are mapped which e ectively maps
provenance and debugging at the interpretation level, while ics guarantees that
violated ICs are corrected by removing them. The combined program is J ( ) =
int [ sat [ supp [ ufLoop [ as( ) [ map [ D0( ), where in order to determine
provenance for a given AS, D0( ) is obtained from D( ) by substituting ap with
apttu and removing noas.</p>
      <p>Intuitively, an interpretation is guessed (represented by int=1), and one then
forces the correspondence of t=1 with int=1. The repaired program (removing
rules or adding missing facts) is guessed, and generates the extension of t=1, and it
is always possible to trivially repair a program and obtain any desired interpretation
by removing all rules and adding all missing facts. We now look at error-indicating
predicates to detect problems with .</p>
      <sec id="sec-3-1">
        <title>Theorem 3</title>
        <p>Let M be an AS of D( ). Then, there is an AS M 0 of meta-program J ( ) s.t.,
M n (fnoAnswerSetg [ fap(ri); bl(ri) j ri is a rule identi erg) M 0.</p>
        <p>
          So, we are able to detect every error pointed out by error-indicating predicates
of
          <xref ref-type="bibr" rid="ref9">(Gebser et al. 2008)</xref>
          . There is however a subtle di erence: we prune debugging
answer-sets which are not supported by the repaired program. Their exact
relationship is captured next:
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Theorem 4 (Mapping )</title>
        <p>Let M 0 be an answer-set of J ( ). Then,</p>
        <p>If unsatisf ied(ri) or violated(ri) 2 M 0 then removeRule(ri) 2 M 0;
If unsupported(ri) 2 M 0 then missingF act(ri) 2 M 0;
If uf Loop(a1::an) 2 M 0 then 9i 2 [1; : : : ; n] s.t., missingF act(ai) 2 M 0. Also,
9M 00 2 AS(J ( )) s.t. uf Loop(a1::an) [ missingF act(a1::an) 2 M 00.</p>
        <p>However, some provenance answer-sets may be considered redundant (even though
correct) but module prune in Fig. 5 can be used to prune them. It disallows
removing blocked rules (bl=1), adding facts which are not in unfounded loops but are
already supported, and forces a missingF act to be added to every atom in detected
unfounded loops.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Example 5</title>
        <p>
          Take again Ex. 1 in
          <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
          and include relevant modules
of transformation D. We show next a sample of its answer-sets, having F =
fkeepRule(r1; r2; r3; r4; r6); unsupported(a; b), missingF act(a; b); noF act(c; e)g
in common.
        </p>
        <p>F [ fremoveRule(r5); unsupported(d; f ); unsatisf ied(r5); missingF act(d; f )g
F [ fremoveRule(r5); unsatisf ied(r5); supported(c; e); noF act(d); unsupported(f );
missingF act(f )g
F [ fkeepRule(r5); supported(c); unsupported(d); missingF act(d); noF act(f )g
F [ fkeepRule(r5); supported(c); noF act(d; f )g</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 Conclusions and Future Work</title>
      <p>
        We provide a transformation to compute WnP models under the WF and AS
semantics by computing the answer-sets of meta-programs that capture the original
programs and include some necessary extra atoms. We do this in a modular way,
preserving compatibility with the previous work of
        <xref ref-type="bibr" rid="ref17">(Viegas Damasio et al. 2013)</xref>
        and computing the models directly without rst obtaining the provenance formulas
for certain interpretations. This enables computing provenance answer-sets in an
easy way by using AS solvers. Having this, we align provenance and debugging
answer-sets in a uni ed transformation and show that the provenance approach
generalizes the debugging one, since any error has a counterpart provenance but not
the other way around. Since the proposed method is based on meta-programming,
we extended an existing tool
        <xref ref-type="bibr" rid="ref1 ref10 ref8">(Gebser et al. 2007)</xref>
        and developed a proof-of-concept
(http://cptkirk.sourceforge.net ) built solely to allow computing our models.
      </p>
      <p>
        Our mapping allows generating answer-sets capturing errors and justi cations for
(intended) models. As expected, they are exponential. One direction to explore is to
obtain prime implicant by optimizing these models using rei cation and then subset
inclusion preference ordering
        <xref ref-type="bibr" rid="ref1 ref10 ref7 ref8">(Gebser et al. 2007; Gebser et al. 2011)</xref>
        via a saturation
technique
        <xref ref-type="bibr" rid="ref5">(Eiter and Gottlob 1995)</xref>
        . Note that deciding if an AS is optimal for a DLP
is a 2p-complete problem. Alternative o ine justi cations
        <xref ref-type="bibr" rid="ref16">(Pontelli et al. 2009)</xref>
        (which are also exponential) can be extracted from models of J ( ) by adding extra
constraints to the transformed program guaranteeing: only one rule is kept for true
atoms (providing support); literals assumed false have all rules removed (which are
unde ned in the WFM); false literals have to keep all their rules; the dependency
graph is acyclic; The major di erence to Pontelli's approach is that we provide
justi cations for the full model from which we may obtain their justi cations, but
our approach subsumes it since we are capable of ndng more justi cations as well
as errors in the program.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Puhrer, J.,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Woltran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>Debugging asp programs by means of asp</article-title>
          .
          <source>In LPNMR</source>
          <year>2007</year>
          (
          <year>2007</year>
          -06-06), C. Baral, G. Brewka, and
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Schlipf</surname>
          </string-name>
          ,
          <source>Eds. Lecture Notes in Computer Science</source>
          , vol.
          <volume>4483</volume>
          . Springer,
          <volume>31</volume>
          {
          <fpage>43</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Bsusoniu</surname>
            ,
            <given-names>P.-A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oetsch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Puhrer, J.,
          <string-name>
            <surname>Skocovsky</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Sealion: An eclipse-based ide for answer-set programming with advanced debugging support</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>13</volume>
          ,
          <issue>657</issue>
          {
          <fpage>673</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          and Fandin~o,
          <string-name>
            <surname>J.</surname>
          </string-name>
          <year>2013</year>
          .
          <article-title>An algebra of causal chains</article-title>
          .
          <source>In Logic Programming and Nonmonotonic Reasoning</source>
          , P. Cabalar and T. Son,
          <source>Eds. Lecture Notes in Computer Science</source>
          , vol.
          <volume>8148</volume>
          . Springer Berlin Heidelberg,
          <volume>530</volume>
          {
          <fpage>542</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Schuller, P., and
          <string-name>
            <surname>Weinzierl</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>Finding explanations of inconsistency in multi-context systems</article-title>
          .
          <source>KR 10</source>
          ,
          <issue>329</issue>
          {
          <fpage>339</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <year>1995</year>
          .
          <article-title>On the computational cost of disjunctive logic programming: Propositional case</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Ferraris</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>A new perspective on stable models</article-title>
          .
          <source>In Proceedings of the 20th international joint conference on Arti cal intelligence</source>
          .
          <source>IJCAI'07</source>
          . Morgan Kaufmann Publishers Inc., San Francisco, CA, USA,
          <volume>372</volume>
          {
          <fpage>379</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Complex optimization in answer set programming</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>11</volume>
          ,
          <issue>821</issue>
          {
          <fpage>839</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaufmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neumann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>clasp: A con ictdriven answer set solver</article-title>
          .
          <source>In Logic Programming and Nonmonotonic Reasoning</source>
          . Springer Berlin Heidelberg,
          <volume>260</volume>
          {
          <fpage>265</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Puehrer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>A meta-programming technique for debugging answer-set programs</article-title>
          .
          <source>In AAAI-08</source>
          /IAAI-08
          <string-name>
            <surname>Proceedings</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Fox</surname>
            and
            <given-names>C. P.</given-names>
          </string-name>
          <string-name>
            <surname>Gomes</surname>
          </string-name>
          , Eds.
          <volume>448</volume>
          {
          <fpage>453</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Puhrer, J.,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Woltran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>spock: A Debugging Support Tool for Logic Programs under the Answer-Set Semantics</article-title>
          .
          <source>In Proceedings of the 21st Workshop on (Constraint) Logic Programming</source>
          ,
          <source>(WLP'07)</source>
          , Wurzburg, Germany,
          <string-name>
            <given-names>D.</given-names>
            <surname>Seipel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hanus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wolf</surname>
          </string-name>
          , and J. Baumeister, Eds.
          <source>Technical Report 434</source>
          ,
          <string-name>
            <surname>Bayerische</surname>
          </string-name>
          Julius-Maximilians-Universitat Wurzburg,
          <source>Institut fur Informatik</source>
          ,
          <volume>258</volume>
          {
          <fpage>261</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2005</year>
          .
          <article-title>A model-theoretic counterpart of loop formulas</article-title>
          .
          <source>In Proceedings of International Joint Conference on Arti cial Intelligence (IJCAI)</source>
          .
          <source>Professional Book Center</source>
          ,
          <volume>503</volume>
          {
          <fpage>508</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Oetsch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Puhrer, J., and
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>Catching the ouroboros: On debugging non-ground answer-set programs</article-title>
          .
          <source>Theory Pract</source>
          . Log. Program.
          <volume>10</volume>
          ,
          <issue>4</issue>
          -
          <fpage>6</fpage>
          (
          <issue>July</issue>
          ),
          <volume>513</volume>
          {
          <fpage>529</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Pemmasani</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guo</surname>
          </string-name>
          , H.-F.,
          <string-name>
            <surname>Dong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramakrishnan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ramakrishnan</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2004</year>
          .
          <article-title>Online justi cation for tabled logic programs</article-title>
          .
          <source>In Functional and Logic Programming</source>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Kameyama</surname>
          </string-name>
          and P. Stuckey,
          <source>Eds. Lecture Notes in Computer Science</source>
          , vol.
          <volume>2998</volume>
          . Springer Berlin Heidelberg,
          <volume>24</volume>
          {
          <fpage>38</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>L. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Damasio</surname>
            ,
            <given-names>C. V.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Alferes</surname>
            ,
            <given-names>J. J.</given-names>
          </string-name>
          <year>1993</year>
          .
          <article-title>Diagnosis and debugging as contradiction removal</article-title>
          .
          <source>In Proceedings of the 2nd International Workshop on Logic Programming and Non-monotonic Reasoning</source>
          . MIT Press,
          <volume>316</volume>
          {
          <fpage>330</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Frhstck</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schenner</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Friedrich</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Debugging non-ground asp programs with choice rules, cardinality and weight constraints</article-title>
          .
          <source>In Logic Programming and Nonmonotonic Reasoning</source>
          , P. Cabalar and T. Son,
          <source>Eds. Lecture Notes in Computer Science</source>
          , vol.
          <volume>8148</volume>
          . Springer Berlin Heidelberg,
          <volume>452</volume>
          {
          <fpage>464</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Pontelli</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Son</surname>
            ,
            <given-names>T. C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>El-Khatib</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <year>2009</year>
          .
          <article-title>Justi cations for logic programs under answer set semantics</article-title>
          .
          <source>TPLP 9</source>
          ,
          <issue>1</issue>
          ,
          <issue>1</issue>
          {
          <fpage>56</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <given-names>Viegas</given-names>
            <surname>Damasio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Analyti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            , and
            <surname>Antoniou</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <year>2013</year>
          .
          <article-title>Justi cations for logic programming</article-title>
          .
          <source>In Logic Programming and Nonmonotonic Reasoning</source>
          , P. Cabalar and T. C. Son,
          <source>Eds. Lecture Notes in Computer Science</source>
          , vol.
          <volume>8148</volume>
          . Springer Berlin Heidelberg,
          <volume>530</volume>
          {
          <fpage>542</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>