<!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>Modeling and Encoding Automated Planning problems with the p-stable semantics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sergio Arzola</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Claudia Zepeda</string-name>
          <email>czepedac@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Benem ́erita Universidad Aut ́onoma de Puebla Facultad de Ciencias de la Computaci ́on</institution>
        </aff>
      </contrib-group>
      <fpage>45</fpage>
      <lpage>56</lpage>
      <abstract>
        <p>Our work is intended to model and solve artificial planning problems with logic based planning, using the novel semantics called p-stable, which is an alternative of stable semantics. Also we present a method to encode a general planning problem and then we present an example, which is the blocks world problem. This can be applied in a variety of tasks including robotics, process planning, updates, making evacuation plans and so on.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Automated planning is a branch of artificial intelligence and it has been an area
of research for over three decades. The automated planning is a key ability for
intelligent systems, increasing their autonomy and flexibility through the
construction of plans or sequences of actions in order to achieve their goals. This
sequence of actions can be executed by intelligent agents, autonomous robots,
and so on [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Planning techniques have been applied in a variety of tasks
including robotics, process planning, autonomous agents, creating evacuation
plans, etc.
      </p>
      <p>Planning in Artificial Intelligence is decision making about the actions to be
taken.</p>
      <p>
        Imagine an intelligent robot. The robot is a computational mechanism that takes
input through its sensors and act with the effectors, which can be motors, lights,
and so on. So the sensors allow the robot to perceive its environment and to
build a representation of the world has perceived before as well as its immediate
surroundings. Then the robot must act according to the representation of the
world it has, that cames from its perception. The robot acts through its effectors
which are devices that allow the robot to change the states of the environment
interacting with it as changes the states of itself, like move from a place to
another, move items, and so on. At an abstract level, a robot is a mechanism
that maps its observations to actions which are obtained through sensors and
performed by the effectors respectively. In this context. planning is the decision
making, where gives a sequence of actions by a sequence of observations [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
Planning involves all the characteristics described before such as the
representation of actions and world models, reasoning about the effects of actions, and
techniques for efficiently searching the space of possible plans. Therefore there
are different approaches about planning done in different areas of artificial
intelligence, however our focus here is into Logic-based Planning [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Furthermore,
our proposal is using the p-stable semantics in order to model and solve planning
problems.
      </p>
      <p>
        The p-stable semantics is a novel semantics that came from an alternative for
stable semantics [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. There exists evidence about the applicably of p-stable in
different domains [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Furthermore, in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] is presented a small example of
how p-stable semantics can represent and solve planning problems through its
last implementation [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>
        In this work, we are interested in two basic parts: the first one is to present
the action language A, where it is intended to show how we can model easily a
planning problem and the second one is to present a different method, which is
more complete, of how we can model a planning problem with p-stable semantics
rules based in the language A. We will illustrate this by presenting as example
the world blocks problem. In order to see what models we get, we use as resolver
the last implementation of p-stable semantics [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>This paper is structured as follows. In section 2 we introduce the general syntax
of the logic programs used in this paper. We also provide the definition of stable
and p-stable semantics. In section 3 we present the logic basic planning with
action language A and the p-stable approach, and then we present the world
blocks problem represented in both, language A and p-stable rules. Finally in
section 4 we present the conclusions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>In this section we summarize some basic concepts and definitions used to
understand this paper.
2.1</p>
      <sec id="sec-2-1">
        <title>Logic programs</title>
        <p>A signature L is a finite set of elements that we call atoms, or propositional
symbols. The language of a propositional logic has an alphabet consisting of
proposition symbols: p0, p1, . . . ; connectives: ∧, ∨, ←, ¬; and auxiliary symbols:
(, ). Where ∧, ∨, ← are 2-place connectives and ¬ is a 1-place connective.
Formulas are built up as usual in logic. A literal is either an atom a, called
positive literal ; or the negation of an atom ¬a, called negative literal. The formula
F ≡ G is an abbreviation for (F ← G) ∧ (G ← F ). A clause is a formula of the
form H ← B (also written as B → H), where H and B, arbitrary formulas in
principle, are known as the head and body of the clause respectively. The body
of a clause could be empty, in which case the clause is known as a fact and
can be denoted just by: H ←. In the case when the head of a clause is empty,
the clause is called a constraint and is denoted by: ← B. A normal clause is
a clause of the form H ← B+ ∪ ¬B− where H consists of one atom, B+ is a
conjunction of atoms b1 ∧ b2 ∧ . . . ∧ bn, and ¬B− is a conjunction of negated
atoms ¬bn+1 ∧ ¬bn+2 ∧ . . . ∧ ¬bm. B+, and B− could be empty sets of atoms. A
finite set of normal clauses P is a normal program.</p>
        <p>Finally, we define RED(P, M ) = {H ← B+, ¬(B− ∩ M ) | H ← B+, ¬B− ∈
P }. For any program P , the positive part of P , denoted by P OS(P ) is the
program consisting exclusively of those rules in P that do not have negated
literals.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Stable and p-stable semantics</title>
        <p>
          From now on, we assume that the reader is familiar with the notion of classical
minimal model [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. We give the definitions of the stable and p-stable semantics
for normal programs.
        </p>
        <p>
          Definition 1. [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] Let P be a normal program and let M ⊆ LP . Let us put
P M = P OS(RED(P, M )), then we say that M is a stable model of P if M is
a minimal classical model of P M .
        </p>
        <p>
          Definition 2. [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] Let P be a normal program and M be a set of atoms. We
say that M is a p-stable model of P if: (1) M is a classical model of P (i.e. a
model in classical logic), and (2) the conjunction of the atoms in M is a logical
consequence in classical logic of RED(P, M ) (denoted as RED(P, M ) |= M ).
Example 1. Let P be the normal program {b ← ¬a, a ← ¬b, p ← ¬a p ←
¬p}. We can verify that M1 = {a, p} and M2 = {b, p} model the rules of P . From
the definition of the RED transformation we find RED(P, M1) = {b ← ¬a, a ←
, p ← ¬a, p ← ¬p}, and RED(P, M2) = {b ←, a ← ¬b, p ←, p ← ¬p}.
It is clear that RED(P, M1) |= M1 and RED(P, M2) |= M2. Hence M1 and M2
are p-stable models for P . It is easy to see that M2 is stable model of P whereas
M1 is not.
        </p>
        <p>The following theorem shows the relation between the stable and p-stable
semantics for normal logic programs.</p>
        <p>
          Theorem 1. [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] Let P be a normal logic program and M be a set of atoms. If
M is a stable model of P then M is a p-stable model of P .
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Planning based on p-stable semantics</title>
      <p>In this section we present how we model planning into the p-stable semantics.
3.1</p>
      <sec id="sec-3-1">
        <title>Logic-based Planning</title>
        <p>
          In a planning problem, we are interested in looking for a sequence of actions
that leads from a given initial state to a given goal state. There exist different
action languages that are formal models used to model planning problems, such
as A, B, or C [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. A planning problem specified in one of these languages has a
easy encoding in declarative logic languages based on p-stable semantics. In this
Section we shall present a brief overview extracted from [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] about language A,
and the encoding of planning problems based on p-stable semantics.
3.2
        </p>
        <p>Language A
The alphabet of the language A consists of two nonempty disjoint sets of symbols
F and A. They are called the set of fluents, and the set of actions. Intuitively,
a fluent expresses the property of an object in a world, and forms part of the
description of states of the world. A fluent literal is a fluent or a fluent preceded
by ∼. A state σ is a set of fluents. We say a fluent f holds in a state σ if f ∈ σ.
We say a fluent literal ∼ f holds in σ if f ∈ σ. Actions when successfully
executed change the state of the world. Situations are representations of the history
of action execution. The situation [an, . . . , a1] corresponds to the history where
action a1 is executed in the initial situation, followed by a2, and so on until an.
There is a simple relation between situations and states. In each situation s some
fluents are true and some others are false, and this ‘state of the world’ is the
state corresponding to the situation s.</p>
        <p>
          The language A can be divided in three sub-languages: Domain description
language, Observation language, and Query language [
          <xref ref-type="bibr" rid="ref10 ref5">10,5</xref>
          ].
        </p>
        <p>Domain description language. It is used to express the transition between
states due to actions. The domain description D consists of effect propositions
of the following form: a causes f if p1, . . . , pn, ∼ q1, . . . , ∼ qr where a is an
action, f, p1, . . . , pn, q1, . . . , qr are fluents. Intuitively, the above effect
proposition means that if the fluent literals p1, . . . , pn, ∼ q1, . . . , ∼ qr hold in the
state corresponding to a situation s then in the state corresponding to the
situation reached by executing a in s the fluent literal f must hold. The role
of effect propositions is to define a transition function, Φ, from states and
actions to states. The domain description part also can include executability
conditions: executable a if p1, . . . , pn, ∼ q1, . . . , ∼ qr where a is an action and,
p1, . . . , pn, q1, . . . , qr are fluents. Intuitively, it means that if the fluent literals
p1, . . . , pn, ∼ q1, . . . , ∼ qr hold in the state σ of a situation s, then the action a
is executable in s.</p>
        <p>Observation language. A set of observations O consists of value propositions
of the form: initially f . Given a consistent domain description D the set of
observations O is used to determine the states corresponding to the initial
situation, referred to as initial states and denoted by σ0.</p>
        <p>Query language. We say a consistent domain description D in the presence
of a set of observations O entails a query Q of the form f after a1, . . . , am if
for all initial states σ0 corresponding to (D, O), the fluent literal f holds in the
state [am, . . . , a1]σ0. We denote this as D |=O Q.</p>
        <p>Hence, in order to model a planning problem using language A, we must
specify a triple (D, O, G) where D is a domain description, O is a set of
observations, and G is a collection of fluent literals G = {g1, . . . , gl}, which we will
refer to as a goal. So, we require to find a sequence of actions a1, . . . , an such
that for all 1 ≤ i ≤ l, D |=O gi after a1, . . . , an. We then say that a1, . . . , an is
a plan for achieves goal G with respect to (D, O).
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>P-stable encoding of planning problems</title>
        <p>We have described before, how to model planning problems using language A.
In this section we present a more complete method to encode planning problems
with background knowledge into p-stable semantics, since this semantics is new,
there is no application made for planning purposes, but we can translate the
language A model into p-stable rules as follows:</p>
        <p>Background knowledge The background knowledge is declared as facts, but
if it has elements from others, they are set as the body of the rule:
background(b1), . . . , background(bi).
compoundbackground(Bj) ← background(Bj).</p>
        <p>Vocabulary Fluents f1, . . . , fn can be defined in two forms: if they do not have
elements of the background knowledge they are delcared as facts, otherwise they
are defined in terms of their background knowledge, where the the fluent be at
the head and the background knowledge at the body respectively:
fluent(f1), . . . , fluent(fi).
fluent(Fj, Fk) ← background(Fj) , background(Fk).
fluent(Fn) ← background(Fn).</p>
        <p>Similar as above, the actions a1, . . . , an can be declared in two ways: as facts if
they do not have elements of the background knowledge, or as rules if they do:
action(a1), . . . , action(ai).
action(Aj, Ak) ← background(Aj) , background(Ak).
action(An) ← background(An).</p>
        <p>Also we need to set the time. It can be done, by defining a constant and then a
fact called time where goes from 0 to the constant defined:
const length=t.
time(0..length).</p>
        <p>Encoding domain description. The propositions of the form:
executable a if p1, . . . , pn, ∼ q1, . . . , ∼ qr. can be declared by the following rule:
executable(A,T) ← holds(p1, . . . , pn, T), not holds(q1, . . . , qr, T),
background(A), time (T), T&lt;length.</p>
        <p>Propositions of the following form:
a causes f if p1, . . . , pn, ∼ q1, . . . , ∼ qr can be declared just as:
causes(action(A),fluent(F))← background(A), background(F).
In order to encode the rules, we express them with holds, which means that the
fluent is satisfied at time T.</p>
        <p>Because the holds rule need that executable rule and causes rule be truth, and
both have the same conditions, then there is no necessary to add the conditions
to the causes rule.</p>
        <p>We use four auxiliary rules. The first two are to set what fluent must be set as
true:
literal(G) ← fluent(G).
literal(neg(G)) ← fluent(G).</p>
        <p>The second two help us to set the opposite of the truth value of a fluent:
contrary(F, neg(F)) ← fluent(F).
contrary(neg(F), F) ← fluent(F).</p>
        <p>We define three holds rules. The first one refers to the initial state, which shows
what fluents are satisfied at the beginning:
holds(F,0) ← literal(F),initially(F).</p>
        <p>The second is for setting the fluents that are truth in the next time, which is
T + 1, by some conditions of the previous time, which is T:
holds(F, T+1) ← literal(F), time(T), T &lt; length, action(A), executable(A,T),
occurs(A,T), causes(A,F).</p>
        <p>The third is for setting the opposite of the fluent value for the next time:
holds(F, T+1) ← literal(F), literal(G), contrary(F,G), time(T), T &lt; length,
holds(F,T), not holds(G, T+1).</p>
        <p>We also need to add the rule occurs and not occurs, which means that the
action A occurs or not at time T respectively. To define the rule occurs we use the
auxiliary possible rule, that shows which actions are possible to execute at time
T and if there is no evidence of achieving the goal:
possible(A,T) ← action(A),time(T),executable(A,T), not goal(T).
With the possible rule we define the rules occurs and not occurs:
occurs(A,T) ← action(A),time(T),possible(A,T), not not occurs(A,T).
not occurs(A,T) ← occurs(AA,T),action(A),action(AA),time(T),A!=AA.</p>
        <p>Encoding observation language. These prepositions represents the initial state
of the problem. It can be declared by initially facts of what fluents are satisfied
at the beginning:
initially(fa), . . ., initially(fm).</p>
        <p>Encoding query language. These prepositions declare the goal, or the wished
state at time N. It is represented as finally facts:
finally(fa), . . ., finally(fm).</p>
        <p>We use two auxiliary rules which help us to determine whether if the goal is
reached or not. not goal(T) ← time(T), literal(X), finally(X), not holds(X,T).
goal(T) ← time(T), not not goal(T).</p>
        <p>For last, the purpose of solving a planning problem is to find a plan in a given
time. So we include two rules that indicates this to the program. The first
indicates that exists a plan if the goal is reached according to the length of time.
exists plan ← goal(length).</p>
        <p>The second is a restriction which states that we do not want that a plan do no
exist:
← not exists plan.</p>
        <p>In the following section we give a brief example of a planning problem
modeled into language A and into p-stable semantics in order to clarify this.
3.4</p>
      </sec>
      <sec id="sec-3-3">
        <title>The worlds block problem modeled and encoded</title>
        <p>
          Here we present the worlds block problem, that consists of the following scenario:
There is a set of cubes (blocks) sitting on a table. The goal is to build one or
more vertical stacks of blocks. The catch is that only one block may be moved
at a time: it may either be placed on the table or placed atop another block.
Because of this, any blocks that are, at a given time, under another block cannot
be moved [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. We are going to present the Sussman anomaly instance [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]:
        </p>
        <p>We present this planning problem modeled using language A and encoded
into p-stable semantics. Briefly we remark that an A model is based on a set of
fluents, actions, executable conditions, an initial state and a goal.</p>
        <p>In language A Here we show how to model the problem into language A.</p>
        <p>First we are going to represent our background knowledge. As we can see is
composed by the three blocks: {block(a),block(b),block(c)}.</p>
        <p>Our set of fluents are: {on(X,Y),ontable(X), clear(X),holding(X),handempty}
The first fluent indicates the state of block X is on block Y. The second fluent
indicates the state of block X is on the table. The third fluent shows that block
X is clear, which means that there is no block above it. The fourth fluent
indicates that block is holding by the hand. The last fluent indicates that the hand
is empty.</p>
        <p>We define four actions, which are: {pick up, put down, stack, unstack} These
actions are the operations allowed to do. Pick up and put down refers to set or
remove a block from the table. Stack and unstack refers to set or remove a block
from another.</p>
        <p>The domain description propositions are the executable conditions and, what
causes an action A. We define a executable condition for each action:
executable pick up(X) if clear(X), ontable(X), handempty.
executable put down(X) if holding(X).
executable stack(X,Y) if holding(X), clear(Y).
executable unstack(X,Y) if clear(X), handempty, on(X,Y).</p>
        <p>As well we define what causes each action:
pick up(X) causes not ontable(X), not clear(X), holding(X), not handempty.
put down(X) causes ontable(X), clear(X), not holding(X), handempty.
stack(X,Y) causes not holding(X), not clear(Y), clear(X), handempty, on(X,Y).
unstack(X,Y) causes holding(X), clear(Y), not clear(X), not handempty, not
on(X,Y).</p>
        <p>The observation language, which declare the initial state of the problem is:
handempty, clear(c), clear(b), ontable(a), ontable(b), on(c,a).</p>
        <p>Finally the query language propositions, that mean the goal, which is the
configuration of the blocks stacked in decreasing order:
handempty, clear(c), on(c,b), on(b,a), ontable(a).</p>
        <p>
          In p-stable semantics In this section we present its encoding based on p-stable
semantics. In particular we use the new implementation for p-stable semantics
[
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
        <p>
          Briefly, we mention that is close similar from smodels [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], which you can
represent planning by describing each fluent and action into clauses.
        </p>
        <p>
          There are more instances of the blocks world problem in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. By giving the
model of the language A and by the auxiliary rules we set above, it is very easy
to model a planning problem into p-stable semantics.
        </p>
        <sec id="sec-3-3-1">
          <title>First we define the time and our background knowledge:</title>
          <p>const length=6.
time(1..length).
block(a).
block(b).
block(c).</p>
          <p>Then the fluents and actions can be represented respectively as follows:
fluent(on(X,Y)) ← block(X), block(Y).
fluent(ontable(X)) ← block(X).
fluent(clear(X)) ← block(X).
fluent(holding(X)) ← block(X).
fluent(handempty).
action(pick up(X)) ← block(X).
action(put down(X)) ← block(X).
action(stack(X,Y)) ← block(X), block(Y).</p>
        </sec>
        <sec id="sec-3-3-2">
          <title>Then we add the auxiliary rules defined before:</title>
          <p>not goal(T)← time(T), literal(X), finally(X), not holds(X,T).
goal(T) ← time(T), not not goal(T).
exists plan ← goal(length).
← not exists plan.</p>
          <p>We add the auxiliary rules mentioned earlier.
literal(G) ← fluent(G).
literal(neg(G)) ← fluent(G).
contrary(F, neg(F)) ← fluent(F).
contrary(neg(F), F) ← fluent(F).
holds(F, 1) ← literal(F), initially(F).
holds(F, T+1) ← literal(F), time(T), T &lt; length, action(A),
executable(A,T),occurs(A,T), causes(A,F).
holds(F, T+1) ← literal(F), literal(G), time(T), T &lt; length,
contrary(F,G), holds(F,T), not holds(G, T+1).
possible(A,T) ← action(A), time(T), executable(A,T), not goal(T).
occurs(A,T) ← action(A), time(T), possible(A,T), not not occurs(A,T).
not occurs(A,T) ← action(A), action(AA), time(T), occurs(AA,T), A!=AA.</p>
          <p>The following rules represent the observation language, that is the initial
state of the problem. As we have shown before, we represent them by initially
facts:
initially(handempty).
initially(clear(c)).
initially(clear(b)).
initially(ontable(a)).
initially(ontable(b)).
initially(on(c,a)).</p>
          <p>Finally the rules of the query language, indicates the goal state that we want
to have at time N, where N represents the number of steps. This has been defined
by the const length.
finally(handempty). finally(clear(c)). finally(on(c,b)). finally(on(b,a)).
finally(ontable(a)).</p>
          <p>
            With these rules, we have modeled the blocks world problem. Then we use
a recent implementation of p-stable semantics [
            <xref ref-type="bibr" rid="ref12">12</xref>
            ] in order to have the p-stable
models that satisfy the conditions mentioned before. These models are the plan,
that is the sequence of actions that must be made in order to archive the goal.
This implementation use the lparse syntaxis and it is executed as following:
lparse program.lp | ./PstableResolver -p 0
          </p>
          <p>We only obtained one model, because it could not be found another plan that
satisfies the rules shown before in 6 steps. We explain the plan into the following
table:</p>
          <p>Time Action State
0 unstack(c,a) clear(a), clear(c), ontable(a), ontable(b), on(c,a), handempty
1 put down(c) clear(a), clear(b), ontable(a), ontable(b), holding(c)
2 pick up(b) clear(a), clear(b), clear(c), ontable(a), ontable(b), ontable(c),
handempty
3 stack(b,a) clear(a), clear(c), ontable(a), ontable(c), holding(b)
4 pick up(c) clear(b), clear(c), ontable(c), ontable(a), on(b,a), handempty
5 stack(c,b) clear(b), ontable(a), on(b,a), holding(c)
6 - clear(c), ontable(a), on(c,b), on(b,a), handempty
It is easy to verify that the plan is correct.</p>
          <p>
            Comparing the results obtained in this example with p-stable models and
answer sets, they both obtain models in different ways according to its semantics.
However, in [
            <xref ref-type="bibr" rid="ref6">6</xref>
            ] it is proved that for a normal program the p-stable models contain
the answer sets, which means that p-stable semantics can bring more plans, than
stable semantics does for normal programs.
4
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>
        Planning involves the representation of actions and world models, reasoning
about the effects of actions, and so on. We show that p-stable semantics is a good
way to model and solve planning problems, giving us with the p-stable models
the plans that we need, in order to go from an initial state to a goal. It can be
applied in a variety of tasks including robotics, process planning, autonomous
agents and spacecraft mission control [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. We have explained in this paper how
to model a planning problem into language A and a more complete method of
how to translate into p-stable semantics and how to encode it. For future work,
we are interested in create an interface for the planning grounding like coala [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
from the potassco project , which works with answer set solving, but instead of
stable semantics apply the newest implementation of p-stable semantics [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Funding</title>
      <p>This work was supported by the CONACyT [CB-2008-01 No.101581].</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Alferes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Banti</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          .
          <article-title>A principled semantics for logic programs updates</article-title>
          .
          <source>In Nonmonotonic Reasoning</source>
          , Action, and
          <source>Change (NRAC'03)</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>ASP</given-names>
            <surname>Solver</surname>
          </string-name>
          . Web location of DLVk: http://www.dbai.tuwien.ac.at/proj/dlv/k/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>ASP</given-names>
            <surname>Solver</surname>
          </string-name>
          . Web location of Smodels: http://www.tcs.hut.fi/software/smodels/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>M.</given-names>
            <surname>Balduccini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nogueira</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Watson</surname>
          </string-name>
          .
          <article-title>Planning with the USAAdvisor</article-title>
          . In D. Kortenkamp, editor,
          <source>3rd NASA International workshop on Planning and Scheduling for Space</source>
          ,
          <year>Oct 2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>C.</given-names>
            <surname>Baral</surname>
          </string-name>
          .
          <article-title>Knowledge Representation, reasoning and declarative problem solving with Answer Sets</article-title>
          . Cambridge University Press, Cambridge,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>J. L. C.</given-names>
            <surname>Carranza</surname>
          </string-name>
          .
          <article-title>Fundamentos matema´ticos de la sema´ntica pstable en programacio´n l´ogica</article-title>
          .
          <source>PhD thesis</source>
          , Benem´erita Universidad Aut´onoma de Puebla,
          <year>Nov 2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. Coala. http://www.cs.uni-potsdam.de/ tgrote/coala/.</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Dimopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Nebel</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Koehler</surname>
          </string-name>
          .
          <article-title>Encoding Planning Problems in NonMonotonic Logic Programs</article-title>
          .
          <source>In Proceedings of the Fourth European Conference on Planning</source>
          , pages
          <fpage>169</fpage>
          -
          <lpage>181</lpage>
          . Springer-Verlag,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          .
          <article-title>The Stable Model Semantics for Logic Programming</article-title>
          . In R. Kowalski and K. Bowen, editors,
          <source>5th Conference on Logic Programming</source>
          , pages
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          . MIT Press,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          .
          <source>Action languages. Electron. Trans. Artif</source>
          . Intell.,
          <volume>2</volume>
          :
          <fpage>193</fpage>
          -
          <lpage>210</lpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Lloyd</surname>
          </string-name>
          .
          <source>Foundations of Logic Programming</source>
          . Springer, Berlin, second edition,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>A.</given-names>
            <surname>Marin</surname>
          </string-name>
          .
          <article-title>Computing the pstable semantics</article-title>
          . https://sites.google.com/site/computingpstablesemantic.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>M. Osorio</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Arrazola</surname>
            , and
            <given-names>J. L.</given-names>
          </string-name>
          <string-name>
            <surname>Carballido</surname>
          </string-name>
          .
          <article-title>Logical weak completions of paraconsistent logics</article-title>
          .
          <source>Journal of Logic and Computation</source>
          , doi: 10.1093/logcom/exn015,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>J.</given-names>
            <surname>Rintanen</surname>
          </string-name>
          . Introduction of Automated Planning.
          <string-name>
            <surname>Albert-Ludwings-Universitat Freiburg</surname>
          </string-name>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>S.</given-names>
            <surname>Russell</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Norvig. Artificial Intelligence</surname>
          </string-name>
          :
          <string-name>
            <given-names>A Modern</given-names>
            <surname>Approach</surname>
          </string-name>
          . Pretince Hall,
          <year>2009</year>
          . 1152 pages.
          <source>ISBN: 0136042597.</source>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>C. Z. Sergio Arzola</surname>
            and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Osorio</surname>
          </string-name>
          .
          <article-title>Artificial intelligence planning with p-stable semantics</article-title>
          .
          <source>ENC</source>
          <year>2011</year>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>J.</given-names>
            <surname>Slaney</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Thibaux</surname>
          </string-name>
          .
          <source>Blocks world revisited. Artificial Intelligence</source>
          <volume>125</volume>
          , pages
          <fpage>119</fpage>
          -
          <lpage>153</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>T. C. Son</surname>
            and
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Planning with preferences using logic programming</article-title>
          .
          <source>Theory and Practice of Logic Programming (TPLP)</source>
          ,
          <volume>6</volume>
          :
          <fpage>559</fpage>
          -
          <lpage>607</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>