<!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>Preferences and Priorities in ASP</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Stefania Costantini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Formisano</string-name>
          <email>formis@dmi.unipg.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universita` di L'Aquila Dipartimento di Ingegneria e Scienze dell'Informazione e Matematica (DISIM) Via Vetoio Loc. Coppito</institution>
          ,
          <addr-line>I-67010 L'Aquila</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universita` di Perugia Dipartimento di Matematica e Informatica via Vanvitelli</institution>
          ,
          <addr-line>1, I-06123 Perugia</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we extend our previous work concerning preferences in Answer Set Programming (ASP), and integrate this work with PDL, a wellknown approach to answer set optimization. We thus obtain a powerful language for expressing preferences in ASP.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Logic programming under the answer set semantics (Answer Set Programming, for
short ASP) is nowadays a well-established programming paradigm, with applications in
many areas, including problem solving, configuration, information integration, security
analysis, agent systems, semantic web, and planning (see among many [
        <xref ref-type="bibr" rid="ref1 ref16 ref19 ref2 ref24">2, 1, 19, 24, 16</xref>
        ]
and the references therein).
      </p>
      <p>
        As ASP has proved useful in formalizing many forms of commonsense reasoning,
and as in turn many forms of commonsense reasoning rely more or less explicitly upon
some form of preferences, preferential reasoning has also been studied in relation to
ASP (cf., e.g., [
        <xref ref-type="bibr" rid="ref10 ref14 ref3 ref4 ref5 ref6 ref8">14, 6, 3, 5, 4, 8, 10</xref>
        ]).
      </p>
      <p>
        In this paper we consider the work of [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] about answer set optimization, that
proposes the language PDL for describing complex preferences among answer sets, so as
to rank answer sets according to several criteria, and find the optimal ones. We compare
the basic building blocks of PDL, preference rules, with RASP rules that we have
proposed in [
        <xref ref-type="bibr" rid="ref10 ref8">8, 10</xref>
        ]. First we show that our rules fit into the PDL framework to which they
bring some useful extension. Then, elaborating on our past work and on principles
discussed in [
        <xref ref-type="bibr" rid="ref20 ref25">25, 20</xref>
        ], we further improve the forms of preferences that can be expressed.
The reader may refer to e.g., [
        <xref ref-type="bibr" rid="ref10 ref14 ref4 ref6 ref8">14, 6, 4, 8, 10</xref>
        ] and to the references therein for recent
overviews and discussion of the many existing approaches to preferences in ASP and
more generally in Computational Logic. In [
        <xref ref-type="bibr" rid="ref10 ref4 ref8">4, 8, 10</xref>
        ] the relationship of the approaches
treated here with related work is also widely discussed.
      </p>
      <p>The paper is organized as follows. In Section 2 we briefly introduce Answer Set
Programming and PDL, and in Section 3 we illustrate RASP. In Section 4 we propose
how the two approaches could be usefully integrated, and in Section 5 we propose
extensions to the language for expressing preferences. Finally, in Section 6 we conclude.</p>
      <sec id="sec-1-1">
        <title>Background on ASP and P DL</title>
        <p>Answer Set Programming is the well-established logic programming paradigm
adopting Datalog programs with default negation under the answer set semantics, briefly
discussed below.</p>
        <p>
          A program in this setting (cf. [
          <xref ref-type="bibr" rid="ref17 ref18">17, 18</xref>
          ]) is a collection of rules of the form
H
        </p>
        <p>
          L1; : : : ; Lm; not Lm+1; : : : ; not Lm+n:
where H is an atom, m 0 and n 0, not is default negation and each Li is either
an atom or the classical negation (also called strong negation) of an atom (as defined
in [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]). Atoms and their classical negation and literals not Li will be called in the
following “ASP literals”, to make a distinction w.r.t. the extensions that will be proposed.
        </p>
        <p>The left-hand side and the right-hand side of the clause are called head and body,
respectively. A rule with empty body is called a fact. A rule with empty head is a
constraint, where a constraint of the form</p>
        <p>L1; :::; Ln:
states that ASP literals L1; : : : ; Ln cannot be simultaneously true.</p>
        <p>Various extensions to the basic paradigm exist, that we do not consider here as they
are not essential in the present context.</p>
        <p>In the rest of the paper, whenever it is clear from the context, by “a (logic) program
” we mean an answer set program (ASP program) , and we will implicitly refer
to the “ground” version of . The ground version of is obtained by replacing in all
possible ways the variables occurring in with the constants occurring in itself, and
is thus composed of ground atoms, i.e., atoms which contain no variables.</p>
        <p>
          The answer sets semantics [
          <xref ref-type="bibr" rid="ref17 ref18">17, 18</xref>
          ] considers logic programs as sets of inference
rules (more precisely, default inference rules). Alternatively, one can see a program as
a set of constraints on the solution of a problem, where each answer set represents a
solution compatible with the constraints expressed by the program.
        </p>
        <p>Consider the simple program fq not p: p not q:g. For instance, the first rule
is read as “assuming that p is false, we can conclude that q is true.” This program has
two answer sets. In the first one, q is true while p is false; in the second one, p is true
while q is false.</p>
        <p>
          Given a subset M of B that does not contain both A and :A for any atom A,
M is an answer set of if it coincides with the least model of the reduct P M of
P with respect to M . This reduct is obtained by deleting from all rules containing a
condition not a, for some a in M , and by deleting all negative conditions from the other
rules. Answer sets are minimal supported models. Referring to the original terminology
of [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], answer sets are sometimes called stable models. As usual, a set of atoms S
satisfies a rule if S satisfies its head H, i.e., H 2 S, whenever it satisfies the body, i.e.,
all positive conditions are in S and none of the negative conditions is in S.
        </p>
        <p>
          Unlike other semantics, a program may have several answer sets, or may have no
answer set, because conclusions are included in an answer set only if they can be
justified. The following program has no answer set: fa not b: b not c: c not a:g.
The reason is that in every minimal model of this program there is a true atom that
depends (in the program) on the negation of another true atom, which is strictly forbidden
in this semantics, where every answer set can be considered as a self-consistent and
self-supporting set of consequences of given program. A program with no answer sets
is called inconsistent. In the ASP paradigm, each answer set is seen as a solution of
given problem, encoded as an ASP program. To find these solutions, an ASP-solver is
used. Several solvers have became available, see [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ], and can be freely downloaded by
potential users.
        </p>
        <p>
          The expressive power of ASP and its computational complexity have been
extensively investigated. The interested reader can refer, for instance, to [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. The reader can
also see [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], among others, for a presentation of ASP as a tool for
declarative problem-solving. For the applications of ASP, the reader can refer for instance to
[
          <xref ref-type="bibr" rid="ref1 ref16 ref19 ref2 ref24">2, 1, 19, 24, 16</xref>
          ].
        </p>
        <p>
          PDL is a language aimed at describing complex preferences among answer sets.
The approach has been proposed in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] and further generalized in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The basic
ingredients of PDL, as introduced in [4, Def. 5], are the so-called preference rules. A
preference rule has the form
h1&gt;
&gt;hk
        </p>
        <p>L1; : : : ; Lm; not Lm+1; : : : ; not Lm+n:
(1)</p>
        <p>PDL.
where each hi is of the form Ci:pi and Ci is a Boolean combination, that is, a formula
built of atoms by means of disjunction, conjunction, strong and default negation, while
pi is an integer number, intended to be the “weight” or the “penalty” associated to Ci,
i.e., a measure of the degree of (dis)satisfaction in the choice of that option. A preference
rule thus establishes a ranking of the answer sets, or, more precisely, a preorder between
answer sets that satisfy the body of the rule.</p>
        <p>
          Preference rules constitute the sub-language PDLp of PDL made of the simplest
PDL expressions. In turn, complex PDL expressions can be built out of PDLp
expressions by means of operators that specify how to impose and order upon answer sets of
given programs based upon the preorders expressed as base step by the preference rules
(then, nested PDL expressions are also allowed). Among the PDL operators there are
Pareto ordering, lexicographic ordering and others. More specifically, we recall the
following definition from [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]:
Definition 1. [Def. 7 of [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]] PDLp and PDL expressions are inductively defined as
follows:
        </p>
        <sec id="sec-1-1-1">
          <title>1. if r is a preference rule, then r 2 PDLp,</title>
          <p>2. if e1; : : : ; ek are expressions in PDLp, then (psum e1; : : : ; ek) 2 PDLp,</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>3. if r 2 PDLp then r 2 PDL,</title>
          <p>
            4. if e1; : : : ; ek are expressions in PDLp, then (incr e1; : : : ; ek), (rincr e1; : : : ; ek),
(card e1; : : : ; ek), and (rcard e1; : : : ; ek) are in PDL,
5. if e1; : : : ; ek are in PDL, then (pareto e1; : : : ; ek) and (lex e1; : : : ; ek) are in
As said before, PDL expressions allow one to specify a rank among answer sets
according to several criteria (e.g., Pareto ordering). Optimal answer sets w.r.t. such a ranking,
are said to be solutions of the answer set optimization problem as defined below.
Definition 2. [Def. 4 of [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ]] An answer set optimization problem (AOP) is a pair O =
(P; prex ) where P is a program and prex a PDL expression.
          </p>
          <p>A solution of O is an answer set of P which is optimal according to the preorder
represented by prex .</p>
          <p>
            Hence, a solution of an answer set optimization problem is a non-dominated answer
set, that is, an answer set such that no strictly better answer set exists. (The reader is
referred to [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ] for a more detailed treatment of PDL.)
          </p>
          <p>
            The approach to “qualitative preferences” based on PDL is particularly interesting
because several existing preference handling methods turn out to be special cases of
it, where it is now well-known that many AI problems have natural formulations as
optimization problems. An advantage of the approach is that PDL expressions can be
compiled into logic programs that can be used as tester programs in a methodology for
finding optimal answer sets. Moreover, as a further demonstration of its applicability,
the approach has been generalized from ASP to many other optimization contexts in [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ].
3
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Previous Work on Preferences Revisited</title>
      <p>
        In our work on RASP (ASP with Resources and Preferences) [
        <xref ref-type="bibr" rid="ref11 ref8 ref9">9, 8, 11</xref>
        ] we have
proposed an approach to expressing preferences in ASP programs, and then [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] also in
Weight Constraints (which are a well-known useful construct of ASP [
        <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
        ]).
      </p>
      <p>In particular, we allow any occurrence of a positive literal in ASP rules to be
replaced by a p-list, defined below. p-lists make sense in the head of a rule, to state what
one prefers to derive (equivalently, which atom one prefers to be included in an answer
set). However, p-lists make sense in the body of rules as well, to specify which
conditions one would prefer to exploit for reaching a conclusion. As seen below, preferences
in the body are particularly interesting when they are conditional, that is, they should
be applied only when some precondition is satisfied.</p>
      <p>Definition 3. Let s1; : : : ; sk (k &gt; 0) be either distinct constants or distinct atoms.
Then,
– a basic preference-list (p-list, for short) is an expression of the form s1&gt;</p>
      <p>Each component si (i k) has degree of preference i in the p-list.
– a conditional p-list (cp-list, for short) is an expression of the following form:
&gt;sk.</p>
      <p>(r pref when L1; : : : ; Ln);
where r = s1&gt;</p>
      <p>&gt;sk is a p-list and L1; : : : ; Ln are ASP literals.</p>
      <p>Intuitively, a cp-list (r pref when L1; : : : ; Ln) specifies that if all L1; : : : ; Ln are
satisfied, then the choice among the sis occurring in r is ruled by the preference
expressed through r. Otherwise, if any of the Li is not satisfied, then no preference is
expressed.</p>
      <p>In general, there might be cases in which useful (conditional) preferences are not
expressible as a linear order on a set of alternatives. This may originate from lack of
adequate knowledge or expertise in modeling a piece of knowledge, or from incapability to
completely describe total comparative relations, in presence of uncertainty. Moreover,
preferences might depend on specific contextual conditions that are not foreseeable in
advance.</p>
      <p>P-sets are a generalization of p-lists that allows one to use any binary relation (not
necessarily a partial order) in expressing (collections of alternative) p-lists.
Definition 4. Let q1; : : : ; qk be k &gt; 0 atoms and let pred be a binary predicate. A p-set
is of the form</p>
      <p>fq1; : : : ; qk j pred g:</p>
      <p>Predicate pred is supposed to be defined elsewhere in the program where the p-set
occurs. Considering any given model of the program, such a binary predicate is intended
to (possibly) have pairs of the form hqi; qj i as elements of its extension. This allows the
programmer to describe preferences among the qis, that are computed contextually to
any specific answer set. The intuitive semantics of a p-set can be grasped by considering
a particular extension for the predicate pred (namely, a set of pairs ha; bi assumed to be
true in a certain situation, that is, in a certain model of the program). Let X be the set of
atoms fq1; : : : ; qkg. Consider the binary relation R X X obtained by restricting to
X the extension of pred . R is interpreted as a preference relation over X: namely, for
any qi; qj 2 X the fact that hqi; qj i 2 R models a preference of qi over qj .</p>
      <p>In general, there might exist many total orders on the set fq1; : : : ; qkg that are
compatible (i.e., do not contradict) such a generic relation R. Any of these total orders
describes one different, alternative, p-list. Hence, simple p-lists, as introduced in
Definition 3, are particular cases of p-sets, obtained when R describes a total order.</p>
      <p>As mentioned, R does not need to be a partial order, e.g., for instance, it may imply
cycles. In such cases, those resources that belong to the same cycle in R are considered
equally preferable. On the other hand, R might be a partial relation. So, there might
exist elements of X that are incomparable. In this paper, for the sake of simplicity we
assume that R defines a partial order.</p>
      <p>Compound preferences are allowed in RASP. For lack of space in this paper we do
not consider compound preferences and thus we do not report the full definition,
however p-lists (and cp-lists) are generalized so that preferences can be expressed among
sets.</p>
      <p>A RASP rule (for short r-rule) has the following form, whereas a RASP program is
a set of RASP rules:
Definition 5. Let an a-literal be either an atom or a p-list, a cp-list, or a p-set, and let
an r-literal be either an ASP literal or an a-literal. An r-rule has the form
H</p>
      <p>Definition 6. Let Pref be the subprogram of RASP program
proper RASP rules occurring in .
composed of all the</p>
      <p>The following example, related to preparation of desserts, should demonstrate the
expressivity of RASP. In preparing the dessert, one might employ, e.g., either skim-milk
or whole milk. The cp-list</p>
      <p>skimmilk &gt; wholemilk pref when diet
states that, if on a diet, the former is preferred. Then, to spice the dessert, one would
choose, by the p-set</p>
      <p>fchocolate; nuts; coconut j less caloricg;
the least caloric among chocolate, nuts, and coconut.</p>
      <p>
        Previous examples show instances of “extrinsic preferences”, i.e., preferences which
come with some kind of “reason”, or “justification” [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. Notice that, in RASP,
extrinsic preferences may change even non-monotonically as the knowledge base evolves in
time, as the justification can be any conjunction of literals.
      </p>
      <p>Below is a RASP program fragment representing dessert preparation with the
preferences outlined above. Notice that the preference among the ingredients chocolate,
nuts, and coconut, occurring in the p-set has to be determined by referring to the
extension that the predicate less caloric has in the particular model at hand. The first rule
states that if one has eggs and sugar, milk (preferably skim milk if one is on a diet)
and one of chocolate, nuts and coconut (choosing the less caloric) one can prepare
either ice-cream or zabaglione, but preferably one would prepare ice-cream (consider that
some constraint stated elsewhere in the program might forbid any of the two).
icecream &gt; zabaglione
less caloric(X; Y )
calory(nuts; 2):
calory(coconut; 3):
calory(X; Y ) :::
egg; sugar;
(skimmilk &gt; wholemilk pref when diet);
fchocolate; nuts; coconut j less caloricg:
calory(X; A); calory(Y; B); A &lt; B:</p>
      <p>In full RASP, resource management is provided, so that one can, in the above
example, associate quantities to the various produced and consumed items. We do not
consider this feature here, so in the rest of the paper we will implicitly consider RASP
programs without quantities. In summary, in the rest of the paper we consider RASP
programs without quantities and without compound preferences.</p>
      <p>We may notice that RASP rules can be seen (within the above restrictions) as a
particular case (on the one hand) and a generalization (on the other hand) of preference
rules as introduced in Definition 1.</p>
      <p>
        RASP rules are a special case of preference rules in that arbitrary formulas are not
allowed in the elements of p-lists, and the (implicit) weight is always 1. They are a
generalization, in that various forms of conditional preferences are allowed, also in the
body of rules. We showed in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] how RASP rules can be restated in terms of rules with
preferences expressed only in the head (we considered precisely the LPOD approach [
        <xref ref-type="bibr" rid="ref3 ref5">3,
5</xref>
        ]). The re-writing however was not trivial and involved transforming a single RASP
rule into a set of rules. In the following sections we intend first to show how RASP
fits into the PDL framework. Then, elaborating on our past work and on principles
discussed in [
        <xref ref-type="bibr" rid="ref13 ref20 ref25 ref26">25, 26, 13, 20</xref>
        ], we further improve the forms of preferences expressible
in preference rules.
4
      </p>
      <sec id="sec-2-1">
        <title>P DL and RASP: Integration</title>
        <p>We may notice that a PDL program can be added on top of an ASP program, and as
said above it produces an ordering of the answer sets in terms of given preferences. The
advantage is that the same ASP program may be transformed, by adding different PDL
parts, into different optimization problems. The disadvantage is that a programmer
cannot use complex preferences within the ASP program. RASP is thus complementary
to PDL: in fact, in an integration part of the preferences (in the form of RASP rules)
might be expressed within the program, and part in the external (one may say “upper”)
PDL layer.</p>
        <p>
          The integration with RASP would then bring to PDL the advantage of more general
and flexible preference rules definable directly in the ASP program. However, RASP
would profit from being integrated into PDL as the method of eliciting partial orders
from preference rules and combining them (based upon other PDL rules) allows for
further significant extensions, like the one that we propose below. In the integration,
semantics of RASP programs can be defined differently from [
          <xref ref-type="bibr" rid="ref11 ref8 ref9">9, 8, 11</xref>
          ]. In fact, a RASP
program can be transformed into an ASP program 0 where each r-rule (as defined
in Definition 2) is replaced by a set of rules as defined below.
        </p>
        <p>Definition 7. An ASP rule 0 derived from RASP rule
is of the form</p>
        <p>H
A
where: A = H if H is a ASP atom, and for i m Li = Bi if Bi is a ASP literal;
whenever H or, respectively, Bi (for i m) is a p-list r = s1&gt; &gt;sk or a cp-list
(r pref when L1; : : : ; Ln), then A = sj , or, respectively, Li = sj , j k; if Bi is a
p-set fq1; : : : ; qk j pred g, then Li = qr, r k.</p>
        <p>Hence, derived rules are obtained by non-deterministically selecting one of the options
among the a-literals. By relying on the usual notion of satisfaction of (ground) ASP
rules, we can state the following notion of satisfaction for derived rules.
Definition 8. Given a set of atoms S and a RASP rule , S satisfies if and only if S
satisfies some 0 derived from . In this case we write S j= .</p>
        <p>The next definition will be useful in what follows.</p>
        <p>Definition 9. Given RASP program , the program 0 composed of all the derived
rules obtainable from rules of , is called the ASP program derived from .</p>
        <p>We now extend PDL by including proper RASP rules in PDL expressions. (Recall
that PDL expressions are built out of basic PDLp expressions by means of preference
operators.) The following definition introduce a further case to extend Definition 1:</p>
      </sec>
      <sec id="sec-2-2">
        <title>Definition 10 (Extension of Def. 1). PDLp and PDL expressions are inductively</title>
        <p>defined as in Definition 1, by considering also the following case:
10. If r is a proper RASP rule then r 2 PDLp.</p>
        <p>The new semantics for RASP programs, also corresponding to an extension to PDL
that includes proper RASP rules as preference rules, can be defined as follows (cf.,
Definition 2).</p>
        <p>Definition 11. Given RASP program , an extended answer set optimization problem
(EAOP) is a pair OE = ( 0; prex ) where 0 is the ASP program derived from and
prex is a PDL expression involving among the preference rules all rules of Pref .</p>
        <p>
          What remains to be done is to extend the semantics of PDL expressions defined
in [4, pp. 4-5] so as to accommodate RASP rules. This semantics introduces a
preorder on answer sets (i.e., a reflexive and transitive relation) that specifies which answer
set is preferred over which other. Below we enrich the definition of [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. Notice that
given expression prex , pen(S ; prex ) is the penalty associated to the expression prex
w.r.t. answer set S, and Ord (prex ) is the preorder associated with prex . The objective
of the definition is to state in which cases we have (S1; S2) 2 Ord (prex ) based on
pen(S1 ; prex ) and pen(S2 ; prex ). By abuse of notation, we consider a-literals (which
are not in themselves PDLp expressions) as a base case of Ord (prex ).
        </p>
        <p>
          Definition 12. Given RASP program and EAOP ( 0; prex ), and given the answer
sets of 0 S; S1; S2 (clearly, if 0 has none or just one answer set the EAOP is trivially
solved) then, in addition to what defined in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], we define the following.
        </p>
        <p>– If prex is a p-list of the form s1&gt; &gt;sk then pen(S ; prex ) = j where j =
minfijS j= sig. pen(S ; prex ) = 1 otherwise.
– If prex is a cp-list of the form s1&gt; &gt;sk pref when L1; : : : ; Ln then pen(S ; prex ) =
j where j = minfijS j= sig if S j= L1; : : : ; Ln. pen(S ; prex ) = 1 otherwise.
– If prex is a p-set of the form fq1; : : : ; qk j pred g then pen(S ; prex ) = j where
j = minfij8j k; j 6= i; S j= pred (qi; qj )g. pen(S ; prex ) = 1 otherwise.
– Given a RASP rule r, we have (S1; S2) 2 Ord (r ) iff for each a-literal s occurring
in r, pen(S1 ; s) pen(S2 ; s).</p>
        <p>Notice that in the above definition we apply a lexicographic ordering within the
preorders induced by the a-literals occurring in a RASP rule. Other choices would be of
course possible. We might state more generally that (S1; S2) 2 Ord (r ) iff (S1; S2) 2
Ord (Op a1; : : : ; an) where Op is one of the ordering operators provided by PDL,
applied to the a-literals a1; : : : ; an occurring in r (i.e., to the preorders induced by them).</p>
        <p>
          It is easy to extend complexity results reported in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] to our extended setting. I.e.,
finding solutions to AOP’s is a difficult problem but our extensions, though providing
features that may help programmers to declaratively encode the situation at hand, do
not add further complexity.
        </p>
        <p>Theorem 1. Let O = ( 0; prex ) be an extended answer set optimization problem and
S an answer set of 0. Deciding whether S is a solution of O is coNP-complete.
Theorem 2. Let O = ( 0; prex ) be an extended answer set optimization problem and
A be either an atom or the “classical negation” of an atom. Deciding whether there is
a solution S of O such that A 2 S is 2P -complete.
5</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Extensions</title>
      <p>
        As discussed in [
        <xref ref-type="bibr" rid="ref13 ref20 ref25 ref26">25, 26, 13, 20</xref>
        ], one may prefer one option over others for reasons
of various kinds: from general principles to specific facts. Several reasons or criteria
may justify one single preference, where however criteria are often ordered according
to some kind of priority. By adapting the example proposed in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], if one wants to
buy a house (s)he may consider several aspects, say the price, the neighborhood where
the house is situated, and the quality of the building. These aspects may be ordered
according to their importance, i.e., they are given a certain priority. In [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], a method
is proposed to elicit a strict order among options from a given priority sequence of the
form, say,
      </p>
      <p>C1(X) &gt;&gt; C2(X) &gt;&gt; : : : &gt;&gt; Cn(X)
i.e., in the above example,</p>
      <p>
        good neighborhood(X) &gt;&gt; reasonable price(X) &gt;&gt; good quality(X):
A way of combining preferences is also proposed in [20, Def. 3.2]. This method is
reported below, and adopted in the present setting.3 Given a priority sequence of length
n, strict preference of x over y between two objects x and y, Pref (x; y), is defined,
according to [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], as follows:
      </p>
      <p>Pref 1(x; y) ::= C1(x) ^ :C1(y)
Pref k+1(x; y) ::= Pref k(x; y) _ (Eq k(x; y) ^ Ck+1(x) ^ :Ck+1(y)); k &lt; n
Pref (x; y) ::= Pref n(x; y)
where the auxiliary binary predicate Eq k(x; y) is the conjunction of equivalences
(C1(x) $ C1(y)) ^</p>
      <p>^ (Ck(x) $ Ck(y)):</p>
      <p>In simple words, x is preferred over y whenever there is at least one of the Cis that
x enjoys while y does not. Consequently, if both x and y enjoy the Cis in the same way,
none of them is preferred over the other.</p>
      <p>Referring to the example, one may find it very important to live in a good
neighborhood, of some importance to keep the cost reasonable and less important (but relevant
anyway) to buy a house in a building of good quality. For instance, if we have two
houses h1 and h2 which are both in a good neighborhood but none of them has a
reasonable price, then the one of good quality will be preferred. If both are of good quality,
3 Refining both the form and the meaning of priority sequences in the direction of more
flexibility can be a subject of future work.
they will be equally preferred. If both are in a good neighborhood, and the first one
has reasonable price while the other one does not, then the former will be preferred,
whatever the quality of both. RASP, in the context of the integration with PDL, might
be extended so as to allow rules such as the following:
buy(X)
house(X);
good neighborhood &gt;&gt; reasonable price &gt;&gt; good quality:</p>
      <p>In this paper we limit the conclusion of such a rule to be an atom (as defined in
ASP), while in perspective it might be an a-literal. The priority sequence is defined over
predicates, each of which is applicable on the variables occurring in the head (thus, if
the predicate in the head is n-ary, so are the predicates in each priority list). For the sake
of simplicity, below we restrict ourselves to unary predicates. The atom in the head, in
the ground version of the rule, becomes a disjunction, one for each option that can be
possibly chosen. In the example, if house(X) returns, e.g., h1, h2 and h3, the ground
version of the rule will be (where, as customary in ASP, ’;’ indicates disjunction):
buy(h1) ; buy(h2) ; buy(h3)</p>
      <p>good neighborhood &gt;&gt; reasonable price &gt;&gt; good quality:</p>
      <p>We extend the definition of RASP rules as follows. As before, in the definitions we
refer to ground atoms and rules.</p>
      <p>Definition 13. A priority list is an expression of the form
where each of the pi’s is a predicate.</p>
      <p>Definition 14. A RASP priority rule is of the form:
p1 &gt;&gt; : : : &gt;&gt; pn
H
where B1; : : : ; Bm are either r-literals or priority lists, and H is a disjunction of atoms
of the form h(c1); : : : ; h(cr), r 0, where the cis are constants.</p>
      <p>As far as non-ground rules are considered, a ground priority rule can be obtained
from a non-ground rule of the form h(X) d(X); B1; : : : ; Bm where d(X) provides
the values for instantiating X (d might be for instance a domain predicate.4)</p>
      <p>
        We define a notion of degree of satisfaction of a priority list in the context of a set
of atoms by rephrasing the above-mentioned definition introduced in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
Definition 15. A priority list l = p1 &gt;&gt; : : : &gt;&gt; pn is satisfied with degree k w.r.t. a
disjunction of atoms d = h(c1); : : : ; h(cr) and a set of atoms S (we write sat (S; l; d) =
k) iff S j= h(ci), i r, where S j= p1(ci) ^ : : : ^ S j= pk(ci) and 6 9cj , j 6= i such that
S j= h(cj ) and S j= p1(cj ) ^ : : : ^ S j= pt(cj ) with t &gt; k.
4 The subset of given program defining domain predicates consists of domain rules, syntactically
restricted so as to admit a unique answer set that should be relatively efficiently computable.
All the other rules in the program are required by most answer set solvers to be
domainrestricted in the sense that every variable in a rule must appear in a domain predicate which
occurs positively in the body of the rule.
      </p>
      <p>To accommodate priority lists, we further extend Definition 12 as follows.
Definition 16.</p>
      <p>– Given a RASP priority rule r with head d, we have (S1; S2) 2 Ord (r ) iff for each
a-literal s occurring in r, pen (S1 ; s ) pen (S1 ; s ) and for each priority list l
occurring in r, sat (S1; l; d) sat (S2; l; d).
6</p>
    </sec>
    <sec id="sec-4">
      <title>Concluding Remarks</title>
      <p>In this paper we coped with expressing preferences in Answer Set programs. In
particular, we have proposed an integration of RASP (that has been defined in previous
work) and P DL, previously proposed by G. Brewka. We argued that both approaches
may profit from the integration in that RASP fits into the more general semantic P DL
framework, and RASP enriches P DL with more expressive preference rules. To show
this, we have further extended the formalism by means of priority rules that express a
kind of preference that could not be directly expressed before, without affecting
complexity. Precisely, deciding whether an answer set S is a solution of an answer set
optimization problem is coNP-complete, and deciding whether there is a solution implying
given literal l is P2 complete. Immediate future work concerns the implementation
of the integrated approach. Other future work can be related to further enriching the
language for expressing preferences.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Anger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          , and
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Truszczyn´ski. ASPARAGUS - The Dagstuhl Initiative</article-title>
          .
          <source>ALP Newsletter</source>
          ,
          <volume>17</volume>
          (
          <issue>3</issue>
          ),
          <year>2004</year>
          . See http://asparagus.cs.uni-potsdam.de.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Baral</surname>
          </string-name>
          .
          <article-title>Knowledge representation, reasoning and declarative problem solving</article-title>
          . Cambridge University Press,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          .
          <article-title>Logic programming with ordered disjunction</article-title>
          .
          <source>In Proc. of AAAI-02</source>
          , Edmonton, Canada,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          .
          <article-title>Complex preferences for answer set optimization</article-title>
          . In D. Dubois,
          <string-name>
            <given-names>C. A.</given-names>
            <surname>Welty</surname>
          </string-name>
          , and M.-A. Williams, editors,
          <source>Principles of Knowledge Representation and Reasoning: Proc. of the Ninth International Conference (KR2004)</source>
          , June 2-5,
          <year>2004</year>
          , pages
          <fpage>213</fpage>
          -
          <lpage>223</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          , I. Niemela¨, and
          <string-name>
            <given-names>T.</given-names>
            <surname>Syrja</surname>
          </string-name>
          <article-title>¨nen. Logic programs with ordered disjunction</article-title>
          .
          <source>Computational Intelligence</source>
          ,
          <volume>20</volume>
          (
          <issue>2</issue>
          ):
          <fpage>335</fpage>
          -
          <lpage>357</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          , I. Niemela¨, and
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Truszczyn´ski. Preferences and nonmonotonic reasoning</article-title>
          .
          <source>AI Magazine</source>
          ,
          <volume>29</volume>
          (
          <issue>4</issue>
          ),
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Truszczynski</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Woltran</surname>
          </string-name>
          .
          <article-title>Representing preferences among sets</article-title>
          . In M. Fox and D. Poole, editors,
          <source>Proc. of the Twenty-Fourth AAAI Conference on Artificial Intelligence</source>
          ,
          <source>AAAI</source>
          <year>2010</year>
          , Atlanta, Georgia, USA, July
          <volume>11</volume>
          -
          <issue>15</issue>
          ,
          <year>2010</year>
          , pages
          <fpage>273</fpage>
          -
          <lpage>278</lpage>
          . AAAI Press,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Costantini</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          .
          <article-title>Modeling preferences and conditional preferences on resource consumption and production in ASP</article-title>
          . J. of Algorithms in Cognition,
          <source>Informatics and Logic</source>
          ,
          <volume>64</volume>
          (
          <issue>1</issue>
          ):
          <fpage>3</fpage>
          -
          <lpage>15</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S.</given-names>
            <surname>Costantini</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          .
          <article-title>Answer set programming with resources</article-title>
          .
          <source>J. of Logic and Computation</source>
          ,
          <volume>20</volume>
          (
          <issue>2</issue>
          ):
          <fpage>533</fpage>
          -
          <lpage>571</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Costantini</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          .
          <article-title>Weight constraints with preferences in ASP</article-title>
          .
          <source>In Proc. of LPNMR'11, number 6645 in LNCS</source>
          , pages
          <fpage>229</fpage>
          -
          <lpage>235</lpage>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>S.</given-names>
            <surname>Costantini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Petturiti</surname>
          </string-name>
          .
          <article-title>Extending and implementing RASP</article-title>
          .
          <source>Fundamenta Informaticae</source>
          ,
          <volume>105</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>E.</given-names>
            <surname>Dantsin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Gottlob, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Voronkov</surname>
          </string-name>
          .
          <article-title>Complexity and expressive power of logic programming</article-title>
          .
          <source>ACM Computing Surveys</source>
          ,
          <volume>33</volume>
          (
          <issue>3</issue>
          ):
          <fpage>374</fpage>
          -
          <lpage>425</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>D. de Jongh</surname>
            and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>Preference, priorities and belief</article-title>
          . In T. Gru¨
          <article-title>ne-Yanoff and</article-title>
          S. O. Hansson, editors,
          <source>Preference Change, Theory and Decision Library</source>
          , pages
          <fpage>85</fpage>
          -
          <lpage>108</lpage>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J.</given-names>
            <surname>Delgrande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Tompits</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>A classification and survey of preference handling approaches in nonmonotonic reasoning</article-title>
          .
          <source>Computational Intelligence</source>
          ,
          <volume>20</volume>
          (
          <issue>12</issue>
          ):
          <fpage>308</fpage>
          -
          <lpage>334</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          , and
          <string-name>
            <surname>E. Pontelli.</surname>
          </string-name>
          <article-title>An empirical study of constraint logic programming and answer set programming solutions of combinatorial problems</article-title>
          .
          <source>J. of Experimental and Theoretical Artificial Intelligence</source>
          ,
          <volume>21</volume>
          (
          <issue>2</issue>
          ):
          <fpage>79</fpage>
          -
          <lpage>121</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          .
          <article-title>Answer sets</article-title>
          .
          <source>In Handbook of Knowledge Representation, chapter 7. Elsevier</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <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>
          .
          <source>In Proc. of 5th ILPS conference</source>
          , pages
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          ,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <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>Classical negation in logic programs</article-title>
          and disjunctive databases.
          <source>New Generation Computing</source>
          ,
          <volume>9</volume>
          :
          <fpage>365</fpage>
          -
          <lpage>385</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          .
          <article-title>Logic programming and nonmonotonic reasoning: From theory to systems and applications</article-title>
          . In C. Baral, G. Brewka, and J. Schlipf, editors,
          <source>Proc. of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'07)</source>
          , volume
          <volume>4483</volume>
          <source>of LNCS, page 1</source>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>F.</given-names>
            <surname>Liu</surname>
          </string-name>
          . Von Wright “
          <article-title>The Logic of Preference” revisited</article-title>
          . Synthese,
          <volume>175</volume>
          (
          <issue>1</issue>
          ):
          <fpage>69</fpage>
          -
          <lpage>88</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>I. Niemela¨</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Simons</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Soininen</surname>
          </string-name>
          .
          <article-title>Stable model semantics of weight constraint rules</article-title>
          .
          <source>In Proc. of the 5th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'99)</source>
          , number 1730 in LNCS, pages
          <fpage>317</fpage>
          -
          <lpage>331</lpage>
          . Springer,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>P.</given-names>
            <surname>Simons</surname>
          </string-name>
          , I. Niemela¨, and
          <string-name>
            <given-names>T.</given-names>
            <surname>Soininen</surname>
          </string-name>
          .
          <article-title>Extending and implementing the stable model semantics</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>138</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>181</fpage>
          -
          <lpage>234</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>Solvers</given-names>
            <surname>URLs</surname>
          </string-name>
          . Clasp: http://potassco.sourceforge.net; Cmodels: http://www.cs.utexas.edu/users/tag/cmodels; DLV: http://www.dbai.tuwien.ac.at/proj/dlv; Smodels: http://www.tcs.hut.fi/Software/smodels.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>M. Truszczy</surname>
          </string-name>
          <article-title>n´ski. Logic programming for knowledge representation</article-title>
          . In V. Dahl and I. Niemela¨, editors,
          <source>Proc. of the 23rd International Conference on Logic Programming (ICLP'07)</source>
          , volume
          <volume>4670</volume>
          <source>of LNCS</source>
          , pages
          <fpage>76</fpage>
          -
          <lpage>88</lpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <surname>J. van Benthem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Girard</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Roy</surname>
          </string-name>
          .
          <article-title>Everything else being equal: A modal logic for ceteris paribus preferences</article-title>
          .
          <source>J. Philos. Logic</source>
          ,
          <volume>38</volume>
          :
          <fpage>83</fpage>
          -
          <lpage>125</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>J. van Benthem</surname>
            and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>Dynamic logic of preference upgrade</article-title>
          .
          <source>J. of Applied NonClassical Logics</source>
          ,
          <volume>17</volume>
          (
          <issue>2</issue>
          ):
          <fpage>157</fpage>
          -
          <lpage>182</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>