<!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>Towards a Logic-programming System to Debug ASP Knowledge Bases</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>J. C. Acosta-Guadarrama</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Systems Autonomous University of Mexico State</institution>
          ,
          <addr-line>FI-UAEM</addr-line>
          ,
          <country country="MX">Mexico</country>
        </aff>
      </contrib-group>
      <fpage>3</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>This paper is a characterisation in terms of Weak Constraints both for Minimal Generalised Answer Sets and Optimal Answer Sets, of an updates semantics that provides a solid foundation for the implementation of a system to debug knowledge bases. The proposed system can be employed both to identify conflicts with upcoming information from a dynamic changing environment, and to locate the source of conflict from a given inherent inconsistent knowledge base that is static. In addition, this work introduces some formal specifications towards the implementation of a debugging solver with no need to use a total-order semantics. Accordingly, the two-fold contribution of this work is to show a simpler theoretical framework of preferences characterised in DLV, as well as general foundation to debug both static and dynamic logic programs.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>As one of the major and traditional topics in Artificial Intelligence over the last
years, Knowledge Representation and Reasoning has proved to be a discipline
that provides strong theoretical methods to manage knowledge bases. In
particular, this topic has become more widely applied in administration of knowledge
in Ambient Intelligence and of intelligent (rational) agents, and it is especially
useful in situations of incomplete knowledge from a changing environment. This
paper is a proposal to debug knowledge bases that change over time, which is
an important topic both in static and dynamic knowledge, and has to be solved
before other more-general problems of multiple agents. The proposed framework
shall be useful both to find conflicts when new contradictory information arises,
and to locate conflicting information from a given static knowledge base, with
contradictory information.</p>
      <p>
        There are several earlier related works that have addressed the problem of
debugging knowledge bases. For instance, Balduccini and Gelfond [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] proposed a
framework to restore consistency of a given list of planning specifications encoded
into an ASP static1 program [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The proposal introduces the use of a method
This project is supported by The Mexican Council of Science and Technology,
CONACYT.
1 It is static in the sense that the thorough knowledge base endures no change, while
the dynamic part is the generation of plans itself.
called Consistency-Restoring Rules to diagnose the source of conflict in a very
particular context. Another proposal is when changing “factory” specifications
of the knowledge base of an intelligent agent coping with a dynamic changing
environment, by means of program transformations, proposed by Acosta G. et al.
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Although the latter is in the same context we suggest, they both have not
been extended to the general case of updating knowledge bases of an intelligent
agent, besides having to move to the particular knowledge base syntax they
propose.
      </p>
      <p>
        As a result, the present work introduces a general alternative to those
proposals, and it addresses both kinds of problems into a single framework, and
without need of an expanded language. This paper introduces a prototype for
updates of knowledge bases, into a more concise and precise method of updates.
In addition to that, it introduces some formal specifications for its
implementation on top of an ASP solver called DLV [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], without need to use a total-order
semantics.
      </p>
      <p>
        To begin with, one of the latest proposals aiming to meet most well-known
principles for changing knowledge bases comes from [
        <xref ref-type="bibr" rid="ref1 ref9">9, 1</xref>
        ] who, similarly to
Balduccini and Gelfond [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], put forward an approach based upon an abductive
programming semantics called Generalised Answer Sets [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]—or GAS hereafter. The
formulation satisfies several well-accepted properties, overcoming known
problems from others by taking advantage of its flexibility and simplicity for its ASP
foundation.
      </p>
      <p>
        In need of a solver for the semantics of Acosta G. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], this twofold
contribution comprises both a characterisation of this update semantics in terms of
Weak Constraints to debug knowledge bases, as well as a general foundation
to implement it. They both contrast with other works in the literature, which
implement a semantics for update sequences, rather than successive updates,
besides the lack of a formal characterisation in Weak Constraints. Such a lack is
also Balduccini and Gelfond’s [2003] observation of this domain.
      </p>
      <p>In general, this paper is organised as follows. It starts with preliminary
notation and foundation in Section 2, ending with the main definitions of the
implemented semantics (Section 2.4). The core of the paper is Section 3, divided
into preferred models and debugging knowledge bases. The paper ends with a
section of some concluding remarks on the proposal.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>In this section we expect the reader to be familiar with basic notions of logic
programming in ASP and non-monotonic reasoning from the literature. Before
going straight to the system description, though, a short background is still
necessary.
2.1</p>
      <sec id="sec-2-1">
        <title>Logic Programming and Answer Sets</title>
        <p>
          The following gives the description of ASP, which is identified with other names
like Stable Logic Programming or Stable Model Semantics [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] and A-Prolog. Its
formal language and some more notation are introduced from the literature as
follows.
        </p>
        <sec id="sec-2-1-1">
          <title>Definition 1 (ASP Language of logic programs, LASP). In the following</title>
          <p>LASP is a language of propositional logic with propositional symbols: a0, a1, . . . ;
connectives: “,” (conjunction) and meta-connective “;”; disjunction, denoted as
“|”; ← (derivation, also denoted as →); propositional constants ⊥ (falsum);
(verum); “¬” (default negation or weak negation, also denoted with the not
word); “∼” (strong negation, equally denoted as “−”); auxiliary symbols: “(”,
“)” (parentheses). The propositional symbols are also called atoms or atomic
propositions. A literal is an atom or a strong-negated atom. A rule ρ is an
ordered pair Head(ρ) ← Body(ρ).</p>
          <p>With the notation introduced in Definition 1, one may construct clauses of
the following general form that are well known in the literature.
Definition 2 (EDLP). An extended disjunctive logic program is a set of rules
of form
1 ∨ 2 ∨ . . . ∨ l ← l+1, . . . , m, ¬ m+1, . . . , ¬ n
(1)
where i is a literal and 0 ≤ l ≤ m ≤ n.</p>
          <p>Although ASP is our main basis, a more flexible means is necessary to set
up preferences amongst models, so that one may choose the most appropriate,
according to general principles and postulates. One of such intermediate
mechanisms is Abductive Logic Programming, due to Kakas and Mancarella, briefly
presented in the following.
2.2</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Minimal Generalised Answer Sets</title>
        <p>
          Balduccini and Gelfond [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] were the first to employ the concept of Minimal
Generalised Answer Sets (MGAS) to interpret abductive programs, which provides
a more general and flexible framework than standard ASP. The following set of
definitions illustrate such a concept.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>Definition 3 (Kakas and Mancarella [6]). An abductive logic program is</title>
        <p>a pair Ψ, A∗ where Ψ is an arbitrary program and A∗ a set of literals, called
abducibles.</p>
        <p>On the other hand, there already exists a semantics to interpret abductive
programs, called generalised answer sets (GAS) due to Kakas and Mancarella.</p>
        <sec id="sec-2-3-1">
          <title>Definition 4 (GAS, Kakas and Mancarella [6]). The expression M(∆ ) is</title>
          <p>a generalised answer set of the abductive program Ψ, A∗ if and only if ∆ ⊆ A∗
and M(∆ ) is an answer set of Ψ ∪ {α ← | α ∈ ∆ }.</p>
          <p>In case there are more than one generalised answer sets, an inclusion order
may be established:</p>
        </sec>
        <sec id="sec-2-3-2">
          <title>Definition 5 (Balduccini and Gelfond [3]). Let M(∆ 1) and M(∆ 2) be gen</title>
          <p>eralised answer sets of Ψ, A∗ . The relation M(∆ 1) ≤A∗ M(∆ 2) holds if and
only if ∆ 1 ⊆ ∆ 2.</p>
          <p>Last, one can easily establish the minimal generalised answer sets from an
abductive inclusion order with the following definition.</p>
        </sec>
        <sec id="sec-2-3-3">
          <title>Definition 6 (MGAS, Balduccini and Gelfond [3]). Let M(∆ ) be a min</title>
          <p>imal generalised answer set (MGAS) of Ψ, A∗ if and only if M(∆ ) is a
generalised answer set of Ψ, A∗ and it is minimal with respect to its abductive
inclusion order.
2.3</p>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>Weak Constraints</title>
        <p>
          Leone et al. [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] have introduced a nice feature of DLV solver known as Weak
Constraints that may be employed to set up preferences between models. In
particular, a weak constraint is a variant of an integrity constraint that may be
violated in order to establish priorities amongst models. One of its differences
is the introduction of a new derivation symbol “:∼”, rather than “:− ” or “←”.
Moreover, one can specify priority levels and weights of constraints to minimise,
in the end, the sum of weights (of the violated weak constraints) at the highest
priority levels. Formally,
        </p>
      </sec>
      <sec id="sec-2-5">
        <title>Definition 7 (Weak-constraint Expression, [7]). A weak-constraint (ω) is</title>
        <p>an expression of the form (:∼ 1, . . . , k, ¬ k+1, . . . , ¬ m[w : p]), where for 0 ≤
k ≤ m, 1, . . . , m are literals, while w (the weight) and p (the level, or layer)
are positive integer constants or variables.</p>
        <p>In addition, Ω (Ψ ) shall denote the finite set of weak constraints occurring in a
given program Ψ . Likewise, a ω-program is an EDLP with weak constraints.</p>
        <p>In order to provide a more syntactic sugar and a more ASP flavour, another
way to define a weak-consitraint expression from Definition 7 is as follows.</p>
      </sec>
      <sec id="sec-2-6">
        <title>Definition 8 (Weak-constraint Rule). A weak-constraint rule (ω) is an ex</title>
        <p>pression of the form
[w : p] ← 1, . . . , k, ¬ k+1, . . . , ¬ m
(2)
where for 0 ≤ k ≤ m, 1, . . . , m are literals, while w (the weight) and p (the
level, or layer) are positive integer constants or variables.</p>
        <p>From now on, the weak-constraints form in Definition 7 shall be employed in
the context of DLV-code, while Definition 8 in other more-general contexts.</p>
        <p>Similarly to integrity constraints in Section 2.1, one may say that a
weakconstraint rule ρ = ([w : p] ← 1, . . . , k, ¬ k+1, . . . , ¬ m) is violated by an answer
set S of a program Ψ \ {ρ} if the following three conditions hold:
1. ρ ∈ Ψ
2. { 1, . . . , k} ⊆ S
3. { k+1, . . . , m}</p>
        <p>
          Additionally, Leone et al. simplify the combination of weights in levels by
introducing a function HΨ (S) that grows in direct proportion to the weight and
level of the weak constraint as follows:
Definition 9 (Objective Function, HΨ (S), [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]). Given a ground program
Ψ with weak constraints Ω (Ψ ) and an answer set S, the ω objective function
HΨ (S) is defined by using an auxiliary function fΨ that maps levelled weights to
weights without levels:
fΨ (1) = 1
fΨ (n) = fΨ (n − 1) · |Ω (Ψ )| · wmΨax + 1, n &gt; 1
Ψ
lmax
HΨ (S) =
        </p>
        <p>(fΨ (i) ·
i=1
ρ∈NiΨ (S)
weight (ρ))
where wmΨax and lmΨax denote the maximum weight and maximum level over the
weak constraints in Ψ , respectively; NiΨ (S) denotes the weak constraints at level
i violated by S, and weight (ρ) the weight of weak constraint ρ.</p>
        <p>Finally, the best models of such a logic program are those that minimise the
number of violated weak constraints.</p>
      </sec>
      <sec id="sec-2-7">
        <title>Definition 10 (Weak-Constraint Model, [7]). For an EDLP Ψ with weak</title>
        <p>constraints, a set S is a weak-constraint model of Ψ if and only if
1. S is an answer set of Ψ \ Ω (Ψ )
2. HΨ (S) is minimal over all the answer sets of Ψ .
where Ω (Ψ ) is the finite set of weak constraints in Ψ .</p>
        <p>When the underlying semantics is ASP in Definition 10, a weak-constraint model
(or also ω-model) is also known as Optimal Answer Set. Moreover, the language
of EDLP’s with weak constraints shall be called DATALOG∨,ω, which is very
similar to the notation from the literature.
2.4</p>
      </sec>
      <sec id="sec-2-8">
        <title>Object-level Updates</title>
        <p>
          Now let us briefly introduce the semantics to propose a preference
characterisation and implementation, by the following definitions, taken from [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]:
        </p>
        <p>
          Formally, an α-relaxed rule is a rule ρ that is weakened by a default-negated
atom α in its body: Head(ρ) ← Body(ρ)∪{¬α}. In addition, an α-relaxed program
is a set of α-relaxed rules. A generalised program of A∗ is a set of rules of form
{ ← | ∈ A∗}, where A∗ is a given set of literals.
Definition 11 (•-update Program, [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]). Given an update pair of extended
logic programs, denoted as Ψ1 • Ψ2, over a set of atoms A; and a set of unique
abducibles A∗, such that A ∩ A∗ = ∅; and the α-relaxed program Ψ from Ψ1,
such that α ∈ A∗; and the abductive program ΨA∗ = Ψ ∪ Ψ2, A∗ . Its •-update
program is Ψ ∪ Ψ2 ∪ ΨG, where ΨG is a generalised program of M ∩ A∗ for some
minimal generalised answer set M of ΨA∗ and “•” is the corresponding update
operator.
        </p>
        <p>Last, the associated models S of the new knowledge base correspond to the
answer sets of a •-update program as follows.</p>
        <p>
          Definition 12 (•-update Answer Set, [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]). Let Ψ• = (Ψ1 • Ψ2) be an update
pair of extended logic programs over a set of atoms A. Then, S ⊆ A is a
•answer set of Ψ• if and only if S = S ∩ A for some minimal generalised answer
set S of its •-update program.
        </p>
        <p>Having introduced all necessary background and notation to better
understand the results of this proposal, let us present the main results in the following
sections.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Preference and Debugging Characterisation</title>
      <p>
        There are two well-known major efficient solvers to compute ASP with a vast
background of implementation and research. They are DLV [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and SMODELS
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], and the system proposed in this paper employs the former at a higher
abstraction level in order to update ELP programs. This section is an introduction
to a transformation that may be interpreted in DLV and possibly in any other
ASP solver with some slight syntactic adaptations2.
      </p>
      <p>
        To begin with, an approach to implement an update semantics in MGAS
was first suggested in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] by means of preferred disjunctive logic programs in
Brewka’s ODLP semantics. However, the update semantics and thus the final
transformation itself, are limited to single updates and no further details on its
implementation are ever given. Not to mention that the latest version of the
proposed solver endures quite a few bugs.
      </p>
      <p>
        Indeed, a justification from [? ] to use ODLP is that there is a solver available
named PSmodels3 that is an extension to SMODELS [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] to compute preferred
answer sets. Unfortunately, up to the printout of this paper, there is no reliable
version of PSmodels and the latest one (v.2.26a) endures some few bugs under
certain circumstances4. In addition to the running solver, it is believed that DLV
significantly outperforms SMODELS [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], not to mention that ODLP is such a
colossal semantics that can do much more complex tasks than just computing
MGAS’s, which might compromise the performance of the desired system.
2 Refer, for instance, to [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for an equivalence of weak constraints in SMODELS.
3 http://www.tcs.hut.fi/Software/smodels/priority/
4 Try to compute the preferred models of a simple program like {a.}.
      </p>
      <p>
        This section is an introduction to the use of DLV’s Weak Constraints for
their characteristics of preferences [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] that enjoys the above benefits of DLV
with no more extra throughput added to the system.
3.1
      </p>
      <sec id="sec-3-1">
        <title>Preferred Models in Weak Constraints</title>
        <p>This approach consists in transforming updates of ELP’s into a ω-program. The
answer sets of such a program shall prove to coincide with the GAS’s of the
abductive program from the update. So, let us start by introducing some more
notation.</p>
        <p>A Simple Weak Constraint (ω ) is an expression of the form</p>
        <p>[w : p] ←
where is a literal; and w and p are optional weight and level parameters as in
Definition 7.</p>
        <p>Before introducing a result derived from ω , let us introduce some new
notation: read LΩ (Ψ) as the signature of the weak constraints occurring in Ψ , which
is a finite set of literals; while LN1Ψ (M) stands for the signature of the weak
constraints in Ψ at level 1 violated by M—also a finite set of literals. Something
worth recalling is that NiΨ (M) denotes the weak constraints at level i violated
by M in Ψ .</p>
        <p>Proposition 1. Suppose an EDLP, Ψ , with weak constraints Ω (Ψ ) of the form
of a simple weak constraint, with w = p = 1; suppose an answer set M of
Ψ \ Ω (Ψ ); and a set of literals ∆ ⊆ M ∩ LΩ (Ψ). Then, LN1Ψ (M) = ∆ .</p>
        <p>By a slight abuse of notation, let us say that the model(s) of an EDLP with
weak constraints are also called answer sets.</p>
        <p>Before introducing the translation function, let us extend the well-known
standard definition of signature by L Ψ,A∗ , which means the finite set of literals
occurring both in Ψ and in A∗.</p>
        <p>Definition 13 (Abductive-W Translation). Let Ψ, A∗ be an abductive
logic program and α a unique literal, such that α ∈/ L Ψ,A∗ . A translation
into a weak-constraint program W(Ψ, A∗) corresponds to
Ψ ∪ {α ∨ α ←
, [1 : 1] ← α | α ∈ A }
∗ .</p>
        <p>(3)</p>
        <p>Both this translation and Proposition 1 yield the following useful results for
the implementation of GAS-semantics in weak constraints.</p>
        <p>Lemma 1. M ∩ L Ψ,A∗ is a generalised answer set of an abductive program
Ψ, A∗ if and only if M is an answer set of W(Ψ, A∗).</p>
        <p>Proof (sketch). Only-if part. Suppose M is an answer set of W(Ψ, A∗). M is
an answer set of Ψ ∪ {α ∨ α ← , [1 : 1] ← α} with α ∈ M and M ∩ L Ψ,A∗
corresponds to the answer set of Ψ ∪{α ← } and therefore to the GAS of Ψ, A∗ .
On the other hand, with α ∈/ M, M ∩ L Ψ,A∗ is just an answer sets of Ψ ∪ {}
and thus the GAS of Ψ, A∗ . In both cases, M ∩ L Ψ,A∗ is a GAS of Ψ, A∗ ,
as required.</p>
        <p>The if-part is similarly straightforward.</p>
        <p>The equivalence between a GAS of an abductive program and an answer set
of a ω-program ought to be easier to read after a simple example:
Example 1. Suppose an update of Ψ1 with Ψ2 where Ψ1 = {b ← }; Ψ2 = {a ← }.
Its corresponding abductive program is Ψ ∪ Ψ2, A∗ where Ψ = {b ← ¬α} and
A∗ = {α}. As a result, W(Ψ ∪ Ψ2, A∗) = Ψ ∪ Ψ2 ∪ {α ∨ α ← , [1 : 1] ← α}
whose answer set M = {α , a, b}. On the other hand, the GAS of the abductive
program is just {a, b} = M ∩ L Ψ ∪Ψ2,A∗ .</p>
        <p>Up to now, one can compute GAS’s by means of ω-programs. However, this
proposal of updates at the object level requires that the generalised answer sets
are minimal with respect to set inclusion. Thus, another result of this
section is the following formalism that shows the equivalence between MGAS’s and
inclusion-preferred answer sets.</p>
        <sec id="sec-3-1-1">
          <title>Definition 14 (Inclusion Preference). Let M1 and M2 be answer sets of</title>
          <p>a ω-program, W(Ψ, A∗). Then, M1 is inclusion-preferred to M2, denoted as
M1 ≤I M2, if and only if LN1Ψ (M1) ⊆ LN1Ψ (M2).</p>
          <p>Corollary 1. M is a minimal generalised answer set of Ψ, A∗ if and only if
M is an answer set of the corresponding ω-program W(Ψ, A∗), and is minimal
with respect to its inclusion preference.</p>
          <p>With this equivalence, it is easy to deliver further results, linked to
weakconstraints models, as follows.</p>
          <p>M1 ≤C M2, if and only if |LN1Ψ (M1)| ≤ |LN1Ψ (M2)|.</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Definition 15 (Cardinality Preference). Let M1 and M2 be answer sets of</title>
          <p>a ω-program, W(Ψ, A∗). Then, M1 is cardinality-preferred to M2, denoted as
Corollary 2. M is a minimal cardinality-preferred answer set of Ψ, A∗ if and
only if M is weak-constraint model of the corresponding ω-program W(Ψ, A∗).</p>
          <p>This section is one of the main contribution of this paper and extends previous
claims to implement the declarative semantics. First, it introduces a translation
of an abductive logic program. Next, the translation has several ways to be
interpreted and we propose two kinds of preferred models. Finally, we introduce
the theoretical basis for its implementation.</p>
          <p>The following section presents a general view of the implementation, which
confirms our claims and provides a testbed with an online prototype5 for further
research, toy examples and a component of more complex applications.
5 http://fi.uaemex.mx/juan.acosta/kr-lab/od.html.
3.2</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Debugging ASP Programs</title>
        <p>
          Another main contribution of this work is a general proposal to debug EDLP’s
through updates. This idea is similar to the one proposed by [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], who suggested
a set of transformations to find the source of inconsistency. Such a proposal,
however, has not been further developed.
        </p>
        <p>By following the semantics introduced in Section 2.4, the rules in the
•update program give enough information so as to find the source of conflict, by
means of its α-rules, when one of them is satisfied. So, let us begin with some
definitions.</p>
        <p>A rule ρ ∈ Ψ is said to contradict a consistent EDLP, Ψ , if {ρ} ∪ Ψ has no
answer sets.</p>
        <p>Proposition 2. Suppose two consistent EDLP’s Ψ1, Ψ2 and the update Ψ1 • Ψ2
with its corresponding α-relaxed program, Ψ1, its abductive program ΨA∗ with a
minimal generalised answer set M; where Ψ1 ∪ Ψ2 has no model. The rule ρ ∈ Ψ1
contradicts Ψ2 if and only if its corresponding α-relaxed rule ρ ∈ Ψ1, where
α ∈ M and ¬α ∈ Body(ρ ).</p>
        <p>Proof (sketch). The proof comes from the fact that Ψ2 is consistent and an
αrelaxed rule ρ ∈ Ψ1 is inhibited when its corresponding abducible α is true.</p>
        <p>As a result, one may find contradictory rules as in the following example.
Example 2. Suppose the ASP programs Ψ1 = {(a ←
Ψ2 = {∼b ← ¬x}. Rule (b ← ¬c) contradicts Ψ2.
), (b ← ¬c), (d ←
} and</p>
        <p>As opposed to Example 2, where Ψ2 might be considered an update to Ψ1,
one may also debug a single (static) logic program, as in the following example.
Example 3. Suppose the inconsistent program
{(a ←
), (b ← ¬c), (d ←
), (∼b ←
), (∼a ← ¬x)}
The following combinations of rules contradict: (a ←
or (b ← ¬c), (∼a ← ¬x) or (∼b ← ), (∼a ← ¬x).
), (b ← ¬c) or (a ←
), (∼b ←
)</p>
        <p>Finally, the following result holds.</p>
        <p>Proposition 3. Suppose an inconsistent EDLP, Ψ1, and the update Ψ1•∅ with its
corresponding α-relaxed program, Ψ1, its abductive program ΨA∗ with a minimal
generalised answer set M. The rule ρ ∈ Ψ1 contradicts Ψ1 if and only if its
corresponding α-relaxed rule ρ ∈ Ψ1, where α ∈ M and ¬α ∈ Body(ρ ).</p>
        <p>This section is an introduction of the main results of this paper, which consist
of a general characterisation of preferences in weak constraints and a method
to debug logic programs in ASP. They provide a solid theoretical framework
towards the implementation of a system in DLV to debug ASP knowledge bases.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>In need of a general simpler accessible integral framework to debug knowledge
bases, this paper is a characterisation in terms of weak constraints both for
MGAS’s and Optimal Answer Sets, of an updates semantics that provide a solid
foundation for its implementation. The proposed prototype can be employed
both to identify conflicts with upcoming information from a dynamic changing
environment, and to locate the source of conflict from a given inherent
inconsistent knowledge base that is static. In addition, this work introduces some formal
specifications towards the implementation of a debugging solver with no need to
use a total-order semantics.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Acosta</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>J. C.</surname>
          </string-name>
          <year>2007</year>
          .
          <article-title>Maintaining knowledge bases at the object level</article-title>
          .
          <source>In Special Session of the 6th International MICAI Conference</source>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gelbukh</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. F.</given-names>
            <surname>Kuri</surname>
          </string-name>
          Morales, Eds. IEEE Computer Society, Aguascalientes, Mexico,
          <fpage>3</fpage>
          -
          <lpage>13</lpage>
          . ISBN:
          <fpage>978</fpage>
          -0-
          <fpage>7695</fpage>
          -3124-3.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Acosta</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            ,
            <surname>Arrazola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            , and
            <surname>Osorio</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2002</year>
          .
          <article-title>Making belief revision with LUPS</article-title>
          . In XI International Conference on Computing,
          <string-name>
            <given-names>J. H. S.</given-names>
            <surname>Azuela</surname>
          </string-name>
          and
          <string-name>
            <given-names>G. A.</given-names>
            <surname>Figueroa</surname>
          </string-name>
          , Eds. Number ISBN:
          <fpage>970</fpage>
          -
          <lpage>18</lpage>
          -8590-
          <fpage>2</fpage>
          . CIC-IPN, M´exico, D.F.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Balduccini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <year>2003</year>
          .
          <article-title>Logic programs with consistencyrestoring rules</article-title>
          .
          <source>In Proceedings of the AAAI Spring</source>
          <year>2003</year>
          Symposium. AAAI Press, Palo Alto, California,
          <fpage>9</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Brewka</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <year>2002</year>
          .
          <article-title>Logic programming with ordered disjunction</article-title>
          .
          <source>In Proceedings of the 18th National Conference on Artificial Intelligence</source>
          , AAAI-
          <fpage>2002</fpage>
          . Morgan Kaufmann, Edmonton, Alberta, Canada.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>1988</year>
          .
          <article-title>The Stable Model Semantics for Logic Programming</article-title>
          .
          <source>In Logic Programming, Proceedings of the Fifth International Conference and Symposium ICLP/SLP</source>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Kowalski</surname>
          </string-name>
          and
          <string-name>
            <given-names>K. A.</given-names>
            <surname>Bowen</surname>
          </string-name>
          , Eds. MIT Press, Seattle, Washington,
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Kakas</surname>
            ,
            <given-names>A. C.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Mancarella</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <year>1990</year>
          .
          <article-title>Generalized Stable Models: A semantics for abduction</article-title>
          .
          <source>In ECAI. Stockholm</source>
          , Sweden,
          <fpage>385</fpage>
          -
          <lpage>391</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfeifer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>The DLV system for knowledge representation and reasoning</article-title>
          .
          <source>ACM Transactions on Computational Logic 7</source>
          ,
          <issue>3</issue>
          ,
          <fpage>499</fpage>
          -
          <lpage>562</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Niemela</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Simons</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <year>1997</year>
          .
          <article-title>Smodels-an implementation of the Stable Model and Well-Founded Semantics for normal logic programs</article-title>
          .
          <source>In Proceedings of the 4th LPNMR ('97)</source>
          . LNCS, vol.
          <volume>1265</volume>
          . Springer, Dagstuhl Castle, Germany,
          <fpage>420</fpage>
          -
          <lpage>429</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9] Zacar´ıas,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Osorio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Acosta</surname>
          </string-name>
          <string-name>
            <surname>G.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            , and
            <surname>Dix</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          <year>2005</year>
          .
          <article-title>Updates in Answer Set Programming Based on Structural Properties</article-title>
          .
          <source>In 7th International Symposium on Logical Formalizations of Commonsense Reasoning</source>
          , S. McIlraith,
          <string-name>
            <given-names>P.</given-names>
            <surname>Peppas</surname>
          </string-name>
          , and M. Thielscher, Eds. Fakulta¨t Informatik, ISSN
          <volume>1430</volume>
          -211X, Corfu, Greece,
          <fpage>213</fpage>
          -
          <lpage>219</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>