A variant of the clasp solver for extracting learned constraints
xclasp
was an extension of the answer set solver clasp
that allowed for logging the learned constraints.
The extracted constraints could then be reused by offline procedures.
For instance, ginkgo
generalizes learned constraints.
xclasp
is now obsolete, and its functionality has fully been integrated into clasp
with the 3.2 release.
To extract learned constraints, xclasp
was usually invoked as follows:
xclasp --log-learnts --resolution-scheme=named \
--heuristic=Domain --dom-mod=1,16 --loops=no --reverse-arcs=0 --otfs=0
The same result can now be achieved with clasp
:
clasp --lemma-out=- --lemma-out-txt --lemma-out-dom=output \
--heuristic=Domain --dom-mod=1,16 --loops=no --reverse-arcs=0 --otfs=0
The command-line option --lemma-out=<file>
logs the extracted constraints to the specified file or to stdout
if -
is specified instead of a file.
--lemma-out=txt
prints the constraints in text form instead of aspif
.
--lemma-out-dom=output
ensures that only such constraints are logged that contain only (named) output variables.
clasp -h3
provides more details on the new options.
For reference, xclasp
’s original code is archived in the xclasp
branch.
-
Martin Gebser, Roland Kaminski, Benjamin Kaufmann, Patrick Lühne, Javier Romero, and Torsten Schaub: Answer Set Solving with Generalized Learned Constraints. In: Technical Communications of the 32nd International Conference on Logic Programming, 2016, pp. 9:1–9:14
-
Patrick Lühne: Generalizing Learned Knowledge in Answer Set Solving. M.Sc. Thesis, 2015, Hasso Plattner Institute, Potsdam
- Benjamin Kaufmann (
xclasp
, integration intoclasp
) - Patrick Lühne (
xclasp
)