Example Smodels Program

Command line

    lparse prog1 prog2 ... progn | smodel number_of_models

where prog1, ..., progn are program names number_of_models is an non-negative integer indicating the number of answer sets that you want to compute (0 stands for all answer sets).

For example, the graph coloring file is stored in 'prog17', the call is

    lparse prog17 | smodel

if I separate this file into two files 'prog17-1' and 'prog17-2', the call is

    lparse prog17-1 prog17-2 | smodel

To run the queens problem, you need to specify the dimension of the board on the command line. This is done by using the '-c' option as follows:

    lparse -c n=4 prog19 | smodel

The graph coloring problem:
bulletThe version  without weighted-atom and the version with weighted atoms.
bulletThe separation version the graph file (or input) and the independent rules.

The n-queens problem:
bulletThe version without weighted-rule.
bulletThe code with weighted-rule.

The tile covering problem:
bulletThe program for eliminating an assignment in which there is some tile covers more than 2 cells, or two half of the tiles are not neighbor, or two half of the tiles are on a diagonal.
bulletThis program contains an example for which there is no solution no solution
bulletThis program improves the previous program by using another strategy to generate a solution. 

The k-clique problem:
bulletThe program for solving the k-clique problem.

The Yale-Shooting domain
bulletThe program representing the action theory with action 'shoot' occurs at time 0: proga1
bulletThe program ..

09/29/2005