| Wissensverarbeitung und Informationssysteme |
Susanne Grell
Universität Potsdam, Institut für Informatik,
The integration of preferences into answer set programming constitutes an
important practical device for distinguishing certain preferred answer sets from
non-preferred ones.
To this end,
we elaborate upon rule dependency graphs and their colorings for
characterizing different preference handling strategies found in the literature.
We exemplarily develop an operational characterization for computing preferred
answer sets (according to D-preferences [1]) in terms of operators on partial colorings.
In analogy to the notion of a derivation in proof theory,
our operational characterization is expressed as a (non-deterministically
formed) sequence of colorings,
gradually turning an uncolored graph into a totally colored one.
The NoMoRe
system is divided in several components which read an ordered logic
program out of a file, generate the ordered rule dependence graph (DG ),
which represents the ordered logic program, and compute order preserving admissible colorings , which corresponds to
preferred answer sets of ordered logic
programs.
The implementation is written in C++.
Now you must download and unpack the NoMoRe
files.
> gunzip nomorepref-1.0.tar.gz > tar -xf nomorepref-1.0.tarAfter unpacking you find the source files in the /nomorepref/ directory.
To install the NoMoRe
system run:
> ./configure > makeThen, the executable file nomorepref is created under /nomorepref-1.0/src/.
To install NoMoRe
under /usr/local/bin/ you have to run:
> make install
Now the NoMoRe
system should be install and ready to use.
Let us consider the following example, called littleexample.lp:
The preference states that rule r1 is higher preferred than rule r2, which results in the only preferred answer set {a}.
To compute the preferred answer sets for our example we proceed in the following way:
lparse -d all littleexample.lp | nomorepref -pref
The lparse option -d all is essential. It is not possible to correctly compute preferred answer sets, if this option is omitted, since lparse would delete information we need.
The output of NoMoRe
returns additionally to the preferred
answer sets, conclusions about the number of
choice points and the duration for computing the order preserving admissible
colorings.
nomorepref 0.1 Reading ... done Preferred Answer Set 1: a No Time: 0.000 Call to choice points : 1
We have developed different operators for computing deterministic
consequences (
,
) for answer sets with and without preferences, choices
and
for computing answer set without preferences and the choice
operators
and
for computing answer sets with preferences.
Furthermore, we have developed different strategies for coloring
sequences for computing preferred answer sets. (For more details see ([2])
When using NoMoRe
different options can be specified.
nomorepref [number] [-pref] [-op pre:nd:d:post]
| number | specifies the number of answer sets to be computed, if this option is omitted or set to 0 all answer sets are computed |
| -pref | only preferred answer sets will be computed |
| -op | the following string has to be enclosed in " ", it is used to specify the operators used, the default is "Pre:D:(Ps,U)*:N" |
| pre | specifies the preprocessing operator, possible are Pre or None |
| nd | specifies the non-deterministic (choice) operator, e.g. D, DH |
| d | specifies the deterministic operator / a sequence of deterministic operators, e.g. (Ps,U)* |
| Ps stands for |
|
| U stands for |
|
| (Ps,U)* stands for ( |
|
| post | specifies the postprocessing operator, e.g. N or None |
| N stands for the |
When using the -op option it is possible to combine different operators, but not all combinations are possible, e.g. it is not possible to use the DH operator if all standard answer sets are computed and not only the preferred ones
The most efficient coloring sequences are:
-op DH:(Ps,U)*:N
-op D:(Ps,U)*:N
Calls for littleexample.lp could look like the following:
lparse -d all littleexample.lp | nomorepref 0 -pref -op ''Pre:DH:(Ps,U)*:N''
lparse -d all littleexample.lp | nomorepref 0 -pref -op ''Pre:D:(Ps,U)*:N''
For more details about coloring sequences see [2].