| Wissensverarbeitung und Informationssysteme |
Kathrin Konczak and Torsten Schaub and Thomas Linke
Universität Potsdam, Institut für Informatik, {konczak, torsten, linke}@cs.uni-potsdam.de
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 a preference handling strategy found in the literature.
We exemplarily develop an operational characterization of
-preferred
answer sets 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 GCplp 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
- preserving admissible colorings , which corresponds to
- preserving answer sets [2] of ordered logic programs. The
implementation is written for different Prolog systems like
ECLiPSe,
SICStus
and
SWI.
After parsing the ordered logic program out of a file, the DG is
constructed.
For a better representation the DG is compiled into temporary files.
Now a sequence of operators defined in [1] computes
- preserving admissible colorings of the
DG , which corresponds to
- preserving answer sets of the ordered logic
program.
> gunzip gcplp-1.0.tar.gz > tar -xf gcplp-1.0.tarAfter unpacking you find the source files in the /GCplp/Source directory. For starting the GCplp system call the gcplp.pl prolog file and select your prolog system. In the directory /GCplp/Examples are some ordered logic programs for testing the GCplp system. If you want to use the daVinci output you must install the daVinci interface for visualizing the DG (daVinci visualization tool).
[eclipse 1]: [gcplp].This loads all necessary files.
!!!!! Which Prolog are you working with? !!!!! (enter number followed by ENTER) !!!!! (0) ECLIPSe (1) SWI (2) Sicstus (3) Exit !!!!!Press 0 and confirm with <Return>. If you use an other system enter the corresponding value.
!!!!! 0 Flag prolog(eclipse) set Flag output set ************************************* ECLiPSe version of the GCplp system ************************************* .....
[eclipse 2]: flags. output = on prolog(eclipse) = on prolog(swi) = off prolog(sicstus) = off daVinci = off
[eclipse 3]: cload(c1).
[eclipse 4]: gcplp('../Examples/example.lp', 0).
This call returns conclusion about the number of preferred answer sets and
choice points and the duration for computing the order preserving admissible
colorings.
parse file ... ready
generate DG ... ready
precompile DG ... ready
computing preferred answer sets ...
D-Preferred Answer Set 1: { b, nf, p }
answer sets done
number of choice points : 1
number of solutions : 1 (for program ../Examples/example.lp)
duration : 0.0s
[eclipse 6]: set_flag(daVinci). Flag daVinci set
We have developed different operators for computing deterministic
consequences (
,
), choices
(
,
), and an operator (
) for preferred answer set checking. For more
details see [1] .
To compute total colorings of DG, which corresponds to preferred answer sets, you have a lot of possibilities. Some of them are listed in Figure 2 and are explained in [1] .