Description | Usage | Download | Examples | Publications |

CSMODELS is an answer set solver. It uses SMODELS' source code. Instead of SMODELS' heuristic, CSMODELS implements and applies criticality heuristic. Criticality heuristic is described in 'Using Criticalities as a Heuristic in Answer Set Programming'. This paper also shows the speedup gained by the new heuristic compared to SMODELS.

Output of LPARSE is the input language of CSMODELS. However, for now cardinality and weight rules are not supported. Choice rules are supported even with the cardinality constraints in the head.

CSMODELS is implemented by Orkunt Sabuncu. For your questions and comments please send an email to orkunt@ceng.metu.edu.tr.

The basic usage is

The command line options of csmodels are below.

[number] Number of stable models to be found. 0 means all.

[-iterations N] Iterates criticality calculations N number of times.

[-accuracy N] Iterates criticality calculations up to N decimal digit accuracy.

Default stop condition for iterations is 1 decimal digit accuracy.

The current version is csmodels-1.0.tar.gz. It is based on smodels-2.26. Installation steps are

% tar -xvf csmodels-1.0.tar

% cd csmodels-1.0

% make

Here are some example logic programs you can test CSMODELS with. These are used to evaluate CSMODELS.

- Towers of Hanoi with 4 disks (hanoi4.lp). Run with '
`lparse -c n=15 hanoi4.lp | csmodels`'. - Simple Robot-box domain. This representation is based on Knoblock's paper 'Automatically generating abstractions for planning'. It is a planning problem of controlling a robot to move boxes between rooms. Run robot.lp and a problem instance rb_ins with '
`lparse -c n=13 robot.lp rb_ins | csmodels`'. - Blocks-world domain. Two domain representations are bw1.lp and bw2.lp. First one is Erdem's representation and the other is based on Niemela's representation. The problem instances are bw_ins11, bw_ins15, bw_ins17 and bw_ins19. The first one is for the representation bw1.lp, the others are for bw2.lp.
- Colorability problem. The representation color.lp is based on Niemela's representation. You can use his graph files graphs.tar.gz to generate specific problem instances. Run with '
`cat color.lp graphs/p1000 | lparse -c c=4 | csmodels`' for 4-colorability problem. - N-queens problem. queens.lp is Niemela's representation. You can run with '
`lparse -c n=18 queens.lp | csmodels`' for a 18x18 instance.

O. Sabuncu, Using Criticalities as a Heuristic in Answer Set Programming. MS Thesis, Department of Computer Engineering, Middle East Technical University, Turkey, 2002.

O. Sabuncu, F. N. Alpaslan, V. Akman, Using Criticalities as a Heuristic in Answer Set Programming. Unpublished (Submitted to LPNMR'03).