/xclasp

A variant of the clasp solver for extracting learned constraints

xclasp Deprecated

A variant of the clasp solver for extracting learned constraints

Overview

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.

Replacing xclasp with clasp

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.

Legacy Code

For reference, xclasp’s original code is archived in the xclasp branch.

Literature

Contributors

  • Benjamin Kaufmann (xclasp, integration into clasp)
  • Patrick Lühne (xclasp)