Modeling an argumentation problem about
vacations in Mexico using logic programming
Mauricio Osorio1 , Claudia Zepeda2 , and José Luis Carballido2
1
Universidad de las Américas, CENTIA,
[email protected] 2
Benemérita Universidad Atónoma de Puebla
{czepedac,jlcarballido7}@gmail.com
Abstract We present an example about modeling an argumentation
problem to obtain its stable argumentation semantics with preferences.
Keywords: Argumentation framework, argumentation semantics, logic
programming semantics.
1 Introduction
Deductive Database Systems are forms of database management systems whose
storage structures are designed around a logical model of data and at the same
time around inference modules. Deductive databases are an important aspect in
the convergence of artificial intelligence and databases. Currently it is necessary
to have complex reasoning tasks to deal with great amounts of data. Logic base
systems are an option to provide such complex reasoning capabilities and some
of the efficient solvers to obtain a semantics called stable can be used. The sta-
ble model semantics (also called answer set semantics) [4] represents a very well
known approach for performing non-monotonic reasoning. Usually an answer set
program can be seen as a specification of a problem where each stable model
of a program P represents possible solutions to the problem. Nowadays, there
are efficient solvers to obtain the stable model semantics such as dlv, clasp, and
smodel. The efficiency of these solvers have increased the list of applications
based on approaches using stable model semantics, among them is argumenta-
tion theory. Specifically, the approach motivated by argumentation theory and
based on stable semantics proposes to model an argumentation problem as a nor-
mal program that represents a dispute among arguments. This normal program
give the stable models or answers used to infer the winning arguments in the
dispute among arguments. Moreover, it would be desirable to establish an order
of preferences over the winning arguments in order to obtain the preferred set
of arguments. Given that argumentation theory can represent the information
about an argumentation problem graphically, then we consider that Deductive
Database Systems can take advantage of this approach to represent and infer
knowledge.
Hence, in this paper, we propose an engineering approach for assembling ar-
gumentation with preferences, which allows us to give as input an argumentation
problem with a set of preferences and return sets of preferred arguments. Due to
lack of space, in this paper we do not give the formal definition of our approach.
We only illustrate it by analyzing an example. In the example that we present,
we combine an approach to model argumentation problems (the stable argumen-
tation semantics defined by Dung [3]) with an approach to model preferences(the
extended version of ordered disjunction logic program (ELPOD) [1,7]).
We start describing the problem and its formal definition as an Argumenta-
tion Framework, then, we present the logic programs used to obtain the stable
argumentation semantics with preferences.
2 Background
From now on, we assume that the reader is familiar with the notion of normal
logic programs, an interpretation and validity [6]. In this paper, a logic pro-
gramming semantics S is a mapping defined on the family of all programs which
associates to a given program a subset of its 2-valued (classical) models. We say
that M is a minimal model of P if and only if there does not exist a model
M ′ of P such that M ′ ⊂ M , M ′ ̸= M [6]. We review some basic concepts of
the stable and preferred argumentation semantics defined by Dung [3] and some
results about how to regard his argumentation approach as logic programming
with negation as failure. The basic structure of Dung’s argumentation approach
is an argumentation framework which captures the relationships between the
arguments.
Definition 1. An argumentation framework is a pair AF := ⟨AR, attacks⟩,
where AR is a finite set of arguments, and attacks is a binary relation on AR,
i.e., attacks ⊆ AR × AR.
For instance, if AF := ⟨{a, b, c, d}, {(a, a), (a, c), (b, c), (c, d)}⟩, then we say
that a attacks c (or c is attacked by a) if attacks(a, c) holds. Similarly, we say
that a set S of arguments attacks c (or c is attacked by S) if c is attacked by
an argument in S. Any argumentation framework can be regarded as a directed
graph. Dung defined his argumentation semantics based on the basic concept of
admissible set.
Definition 2. A set S of arguments is said to be conflict-free if there are no
arguments a, b in S such that a attacks b. An argument a ∈ AR is acceptable
with respect to a set S of arguments if and only if for each argument b ∈ AR: If b
attacks a then b is attacked by S. A conflict-free set of arguments S is admissible
if and only if each argument in S is acceptable w.r.t. S.
Definition 3. A preferred extension of an argumentation framework AF is a
maximal (w.r.t. inclusion) admissible set of AF . The set of preferred extensions
of AF , denoted by preferred extensions(AF ), will be referred to as the preferred
semantics of AF .
Definition 4. Let AF := ⟨AR, attacks⟩ be an argumentation framework. We
say that E ⊆ AR is an stable extension of AF if E is an admissible set of
AF that attacks every argument in AR \ E. The set of stable extensions of AF ,
denoted by stable extensions(AF ), will be referred to as the stable semantics of
AF .
Now, we review the relationships between argumentation semantics and logic
programming semantics. In particular between the stable argumentation seman-
tics and the stable logic programming semantics; and between the preferred ar-
gumentation semantics and the p − stable logic programming semantics. These
relationships are based on the proposal [5] of managing an argumentation frame-
work as a logic program. Hence, we describe a mapping from an argumentation
framework AF into a logic program PAF . In this mapping we use the predicate
def(x) to represent that “the argument x is defeated”. This mapping also in-
cludes clauses such as def (x) ← ¬def (y) to capture the idea that argument x is
defeated when anyone of its adversaries y is not defeated.
∪ 5. [5] Let AF = ⟨AR, attacks⟩ be an argumentation
Definition ∪ framework,
d1
PAF = x∈AR {d(x) ← ¬d(y) | (y, x) ∈ attacks} and PAF d2
= x∈AR {∪y:(y,x)∈attacks
def
{def (x) ← ∧z:(z,y)∈attacks def (z)}}. We define: PAF d1
= PAF ∪ PAF
d2
.
d2
For a given atom x in the definition of PAF there may not be a z as described,
in that case the corresponding conjunction ∧z:(z,y)∈attacks def (z) is empty leaving
the fact def (x) ← in PAFd2
. The reader familiar with argumentation theory can
d1
observe that essentially, PAF captures the basic principle of conflict-freeness [5].
def
We can see that PAF only identifies the defeated arguments. In order to identify
def
the accepted arguments, we extend the PAF as follows.
def ∪
Definition 6. PAF = PAF ∪ x∈AR {acc(x) ← ¬ def (x)}.
Finally, we know that the grounded, stable, preferred and complete argu-
mentation semantics can be characterized by different logic programming se-
mantics [2]. In order to introduce these characterizations, we introduce the
following definition. Let E be a set of arguments: tr(E) = {acc(a)|a ∈ E} ∪
{def (b)|b is an argument and b ̸∈ E} and tracc (E) = {acc(a)|a ∈ E}, trdef (E) =
{def (a)|a ∈ E}.
Theorem 1. Let AF = ⟨AR, attacks⟩ be an argumentation framework, E ⊆ AR
and E + = {b|a ∈ E and (a, b) ∈ attacks}. Then E is a stable extension of AF
iff tr(E) is a stable model of PAF , and E is a preferred extension of AF iff tr(E)
is a p-stable model of PAF .
3 Modeling the argumentation problem
We present an example of an argumentation problem about turism in Mexico,
and afterwards we illustrate the result of mapping it to a logic program. Fi-
nally, we obtain the the stable argumentation semantics from the logic program
defined.
Example 1. A tourist, with limited cash to spend, is planning on visiting Mexico.
She is looking for 4-star or 3-star hotel deals in the areas of Puebla and Acapulco,
the two places she would like to visit. She likes activities in colonial cities but,
in Puebla she will not be able to find cheap seafood, which she loves. On the
other hand, she loves a variety of activities in the water, something she can not
enjoy in Puebla, however she is aware of the possibilities of a tropical storm in
the area of Acapulco during the time of her trip. How can she deicide where to
go on her vacation given that she can not afford visiting both cities?
In an intuitive way there are two possible answers or sets of accepted argu-
ments. In one of them the tourist visits Puebla, where she finds a hotel with
the right prices and enjoys the activities proper of the city. In the other one she
visits Acapulco and will be able to practice sea activities as well as enjoy sea
food, although she will be at risk of facing a storm that could ruin her vacation.
The problem of example 1 can be modeled by the following argumentation
framework AF := ⟨AR, Attacks⟩ where
AR = {limited cash, hotel4stars deals, hotel3stars deals, visit P uebla,
visit Acapulco, water activities, city activities, seaf ood, tropical storm}
and
Attacks = {(hotel4stars deals, limited cash), (hotel3stars deals, limited cash),
(visit Acapulco, visit P uebla), (limited cash, visit P uebla),
(limited cash, visit Acapulco), (visit P uebla, visit Acapulco),
(visit P uebla, water activities), (tropical storm, water activities),
(visit Acapulco, city activities), (visit P uebla, seaf ood)}
The argumentation framework can be regarded as a directed graph, as shown
in Figure 1.
visit_Acapulco city_activities
limited_cash
visit_Puebla
hotel4stars_deals hotel3stars_deals
seafood
tropical_storm water_activities
Figure 1. Graph representation of AF := ⟨AR, Attacks⟩
Example 2. The mapping from the argumentation framework AF of example 1
into a logic program PAF is the following.
def (hotel4stars deals) ← ¬ def (hotel3stars deals).
def (hotel3stars deals) ← ¬ def (hotel4stars deals).
def (limited cash) ← ¬ def (hotel4stars deals).
def (limited cash) ← ¬ def (hotel3stars deals).
def (visit P uebla) ← ¬ def (limited cash).
def (visit P uebla) ← ¬ def (visit Acapulco).
def (visit Acapulco) ← ¬ def (limited cash).
def (visit Acapulco) ← ¬ def (visit P uebla).
def (water activities) ← ¬ def (visit P uebla).
def (water activities) ← ¬ def (tropical storm).
def (city activities) ← ¬ def (visit Acapulco).
def (seaf ood) ← ¬ def (visit P uebla).
def (visit P uebla) ← def (hotel4stars deals), def (hotel3stars deals).
def (visit Acapulco) ← def (hotel4stars deals), def (hotel3stars deals).
def (limited cash) ← def (hotel3stars deals).
def (limited cash) ← def (hotel4stars deals).
def (hotel3stars deals) ← def (hotel3stars deals).
def (hotel4stars deals) ← def (hotel4stars deals).
def (visit P uebla) ← def (limited cash), def (visit P uebla).
def (visit Acapulco) ← def (limited cash), def (visit Acapulco).
def (city activities) ← def (limited cash), def (visit P uebla).
def (seaf ood) ← def (limited cash), def (visit Acapulco).
def (water activities) ← def (limited cash), def (visit Acapulco).
def (water activities).
acc(hotel4stars deals) ← ¬ def (hotel4stars deals).
acc(hotel3stars deals) ← ¬ def (hotel3stars deals).
acc(limited cash) ← ¬ def (limited cash).
acc(visit P uebla) ← ¬ def (visit P uebla).
acc(visit Acapulco) ← ¬ def (visit Acapulco).
acc(water activities) ← ¬ def (water activities).
acc(city activities) ← ¬ def (city activities).
acc(seaf ood) ← ¬ def (seaf ood).
acc(tropical storm) ← ¬ def (tropical storm).
The stable argumentation semantics indicates that there are four possible
answers:
M1 = {def (limited cash), def (visit Acapulco), def (water activities), def (seaf ood),
def (hotel3stars deals), acc(hotel4stars deals), acc(visit P uebla), acc(city activities),
acc(tropical storm)}
M2 = {def (limited cash), def (visit P uebla), def (water activities), def (city activities),
def (hotel3stars deals), acc(hotel4stars deals), acc(visit Acapulco), acc(seaf ood),
acc(tropical storm)}
M3 = {def (limited cash), def (visit Acapulco), def (water activities), def (seaf ood),
def (hotel4stars deals), acc(hotel3stars deals), acc(visit P uebla), acc(city activities),
acc(tropical storm)}
M4 = {def (limited cash), def (visit P uebla), def (water activities), def (city activities),
def (hotel4stars deals), acc(hotel3stars deals), acc(visit Acapulco), acc(seaf ood),
acc(tropical storm)}
4 Preferred argumentation semantics
We define an argumentation framework with preferences.
Definition 7. An argumentation framework with preferences is pair AFpref :=
⟨AF, P ref ⟩, where AF = ⟨AR, attacks⟩ is an argumentation framework and
P ref := {(a1 , . . . , an ), (b1 , . . . , bm ), . . .}, is a finite set of finite ordered sequences
of arguments.
For instance, if we consider the example 1, we can assume that the tourist
prefers city activities over seafood and 4-stars hotels over 3-stars hotels. Hence,
the argumentation framework with preferences is the pair
AFpref := ⟨⟨AR, attacks⟩, P ref ⟩ where ⟨AR, attacks⟩ is the same as in ex-
ample 1 and
P ref = {(city activities, seaf ood), (hotel4stars deals, hotel3stars deals)}.
Now, due to lack of space, we do not present the formal definition of the se-
mantics of an argumentation framework with preferences, however we illustrate
how to obtain it by using example 1. This semantics is based on the semantics of
an extended ordered disjunction logic program (ELPOD) [1,7]. ELPODs allow to
extend logic programming under stable semantics with a new connective called
ordered disjunction and denoted by ×. This connective allows us to represent
alternative, ranked options for problem solutions in the heads of rules, such as
A × B which intuitively means: if possible A, but if A is not possible then at
least B. The semantics of logic programs with ordered disjunction is based on a
preference relation on stable models. Then, in order to obtain the semantics of
an argumentation framework with preferences AFpref , we start defining a par-
×
ticular ELPOD in terms of it, denoted by PAF pref
, and afterwards we obtain the
preferred stable models of this ELPOD. The preferred stable models correspond
to the preferred stable extensions of AFpref .
×
Hence, we illustrate how to define the ELPOD PAF pref
of an argumentation
framework with preferences AFpref = ⟨AF, P ref ⟩, using example 1. Once we
obtain the logic program PAF of the argumentation framework AF (see Defini-
tion 6), we add to it a set of extended ordered disjunction rules. Each of this
new rules is denoted as ri× and is defined in terms of each ordered sequence of
accepted arguments in P ref :
r1× : ¬¬acc(city activities) × ¬¬ acc(seaf ood)
r2× : ¬¬acc(hotel4stars deals) × ¬¬acc(hotel3stars deals)
Since ¬¬acc(city activities) is equivalent to the restriction ← ¬acc(city activities),
the intuitive reading of atoms with double negation such as ¬¬acc(city activities)
is that it is desirable that acc(city activities) holds in the model of a program.
The same for all the other atoms with two negations. Even more, the intuitive
reading of r1× is: if possible acc(city activities), but if acc(city activities) is not
possible then at least acc(seaf ood). The rule r2× has a similar intuitive reading.
×
Therefore, PAF pref
= PAF ∪ {r1× } ∪ {r2× }.
×
Now in order to obtain the preferred stable models of PAF pref
we proceed as
follows. Let us consider the following set N of atoms that do not occur in the
×
original program PAF pref
:
N = {acc(city activities)• , acc(seaf ood)• , acc(hotel4stars deals)• ,
acc(hotel3stars deals)• , acc(seaf ood)◦ , acc(city activities)◦ ,
acc(hotel4stars deals)◦ , acc(hotel3stars deals)◦ }.
We define:
acc(city activities)• := ¬¬acc(city activities),
acc(seaf ood)• := ¬¬acc(seaf ood),
acc(hotel4stars deals)• := ¬¬acc(hotel4stars deals),
acc(hotel3stars deals)• := ¬¬acc(hotel3stars deals),
Acity activities := {← ¬acc(city activities), acc(city activities)• ,
acc(city activities)• ← ¬acc(city activities)◦ ,
acc(city activities)◦ ← ¬acc(city activities),
← acc(city activities), acc(city activities)◦ },
Aseaf ood := {← ¬acc(seaf ood), acc(seaf ood)• ,
acc(seaf ood)• ← ¬acc(seaf ood)◦ ,
acc(seaf ood)◦ ← ¬acc(seaf ood),
← acc(seaf ood), acc(seaf ood)◦ },
Ahotel4stars deals := {← ¬acc(hotel4stars deals), acc(hotel4stars deals)• ,
acc(hotel4stars deals)• ← ¬acc(hotel4stars deals)◦ ,
acc(hotel4stars deals)◦ ← ¬acc(hotel4stars deals),
← acc(hotel4stars deals), acc(hotel4stars deals)◦ }, and
Ahotel3stars deals := {← ¬acc(hotel3stars deals), acc(hotel3stars deals)• ,
acc(hotel3stars deals)• ← ¬acc(hotel3stars deals)◦ ,
acc(hotel3stars deals)◦ ← ¬acc(hotel3stars deals),
← acc(hotel3stars deals), acc(hotel3stars deals)◦ }.
Then, we can rewrite r1× and r2× as:
rule×
1 : acc(city activities)• × acc(seaf ood)•
×
rule2 : acc(hotel4stars deals)• × acc(hotel3stars deals)• .
× ×
We can also rewrite PAFpref
as: RAFpref
= PAF ∪ {rule× ×
1 } ∪ {rule2 }.
×
Now, we define the four split programs of RAFpref
:
P1 = PAF ∪ {acc(city activities)• , acc(hotel4stars deals)• } ∪ Acity activities ∪
Aseaf ood ∪ Ahotel4stars deals ∪ Ahotel3stars deals ,
P2 = PAF ∪{acc(city activities)• , acc(hotel3stars deals)• ← ¬acc(hotel4stars deals• }∪
Acity activities ∪ Aseaf ood ∪ Ahotel4stars deals ∪ Ahotel3stars deals ,
P3 = PAF ∪{acc(seaf ood)• ← ¬acc(city activities)• , acc(hotel4stars deals)• }∪
Acity activities ∪ Aseaf ood ∪ Ahotel4stars deals ∪ Ahotel3stars deals , and
P4 = PAF ∪ {acc(seaf ood)• ← ¬acc(city activities)• ,
acc(hotel3stars deals)• ← ¬acc(hotel4stars deals)• }∪Acity activities ∪Aseaf ood ∪
Ahotel4stars deals ∪ Ahotel3stars deals .
×
At this point, we are ready to obtain the models of PAF pref
that correspond
to the models of the four split programs,P1 , P2 , P3 , and P4 , without the atoms
in N . We can verify that these models are the same four models obtained in
example 2, i.e., M1 , M2 , M3 , and M4 .
Now, to distinguish between more intended and less intended stable models
we obtain the degree of satisfaction of rules r1× and r2× in each stable model. The
degree of r1× w.r.t. M1 , denoted as degree(r1× )M1 is 1, since acc(city activities)
is in M1 and it occupies position 1 in the finite ordered sequence of accepted
arguments P ref . The degree of r1× w.r.t. M2 , denoted as degree(r1× )M2 is 2, since
acc(seaf ood) is in M2 and it occupies position 2 in the finite ordered sequence of
accepted arguments P ref . In a similar way we can verify that degree(r1× )M3 = 1,
degree(r1× )M4 = 1, degree(r2× )M1 = 1, degree(r2× )M2 = 1, degree(r2× )M3 = 2,
degree(r2× )M4 = 2.
We use the degrees of satisfaction of rules to define a preference relation
on stable models. The preference relation is based on set inclusion of the rules
satisfied to certain degrees. For each stable model M , we obtain the set of ex-
×
tended ordered disjunction rules in PAF pref
satisfied by M to degree i, denoted
i ×
by M (PAFpref ). Then,
×
M11 (PAF pref
) = {r1× , r2× }, ×
M12 (PAF pref
) = { },
× ×
M2 (PAFpref ) = {r1 },
1
M2 (PAFpref ) = {r2× }.
2 ×
×
M31 (PAF pref
) = {r1× }, ×
M32 (PAF pref
) = {r2× }.
× ×
M41 (PAF pref
) = {}, M42 (PAF pref
) = {r1× , r2× }.
Finally, we can see that M1 is preferred to M2 , denoted as M1 > M2 , since
× ×
M21 (PAFpref
) ⊂ M11 (PAF pref
). Analogously M1 is preferred over M3 and M4 .
Therefore, the preferred stable extensions of AFpref is obtained from M1 and cor-
responds to: {visit P uebla, city activities, hotel4stars deals, tropical storm}.
References
1. G. Brewka. Logic Programming with Ordered Disjunction. In Proceedings AAAI-02,
Sep 2002.
2. J. L. Carballido, J. C. Nieves, and M. Osorio. Inferring Preferred Extensions by
Pstable Semantics. Revista Iberomericana de Inteligencia Artificial, 13(41):38–53,
2009.
3. P. M. Dung. On the acceptability of arguments and its fundamental role in non-
monotonic reasoning, logic programming and n-person games. Artificial Intelligence,
77(2):321–358, 1995.
4. M. Gelfond and V. Lifschitz. The Stable Model Semantics for Logic Programming.
In R. Kowalski and K. Bowen, editors, 5th Conference on Logic Programming, pages
1070–1080. MIT Press, 1988.
5. J. C. Nieves, M. Osorio, and C. Zepeda. A schema for generating relevant logic
programming semantics and its applications in argumentation theory. Fundamenta
Informaticae, 106(2-4):295–319, 2011.
6. D. van Dalen. Logic and structure. Springer-Verlag, Berlin, 3rd., augmented edition,
1994.
7. C. Zepeda. Evacuation Planning using Answer Sets. PhD thesis, Universidad de
las Americas, Puebla and Institut National des Sciences Appliquées de Lyon, 2005.