JBenge: Benchmark Generator for answer set programming
Introduction
We provide a benchmark generator for normal logic programs, which can be used for answer set programming systems.
The benchmark generator is implemented in Java, under JDK 1.4.2. The different encodings for these problems are taken from smodels, DLV, J. Ward, J. Schlipf, F. Lin, J. Zhao, and TheoryBase.
We provide two Java archive files, one with a graphical interface
and another one, which can directly be used on the shell.
- Download jbenge.jar [Version: June 14, 2006], benchmark generator with graphical interface
- Download benchmarks.jar [Version: June 14, 2006] , pure benchmark generator
How to use jbenge.jar
- Download the jar-File
Start the application by
java -jar jbenge.jar
- A Dialog window is opened
- Follow the Instructions
How to use benchmarks.jar
-
Call:
java -jar benchmarks.jar [-graph=Graph -n=NBG] [-encoding=Enc [-nc=NBE]] [-planning=Plan [-np=NBP]] [-o=OutFile] - -graph=Graph -n=NBG specifies a graph including parameter.
- -encoding=Enc [-nc=NBE] specifies an encoding
- -planning=Plan [-np=NBP] specifies a planning problem
- -o=OutFile specifies an output file
Options
Graph Problems
We have the following possibilities for generating graph instances:
| Graph Problem |
Option in JBenge |
required Parameter |
Call for benchmarks.jar |
|---|---|---|---|
| Circle graph with n vertices | circle |
n |
-graph=circle -n=n,0,0 |
| Complete graph with n vertices |
complete |
n |
-graph=complete -n=n,0,0 |
| Ladder graph with n runges |
ladder |
n |
-graph=ladder -n=n,0,0 |
| Simplex graph with n levels |
simplex |
n |
-graph=simplex -n=n,0,0 |
| K n×m graph with n upper and m lower vertices |
knm |
n and m |
-graph=knm -n=n,m,0 |
| Random graph with n vertices, where an edge between two vertices has propability p |
random |
n and p |
-graph=random -n=n,0,p |
| Windmill graph with n wings |
windmill |
n |
-graph=windmill -n=n,0,0 |
| Clumpy graph with n clumps, where each clump has m vertices |
clumpy |
n and m |
-graph=clumpy -n=n,m,0 |
| Smallworld graph with propability p |
smallworld |
n,m, and p |
-graph=smallworld -n=n,m,p |
The graphs are presented as facts
vtx(X). edge(X,Y).for every vertex X and every edge from X to Y. Undirected graphs contain
edge(X,Y). edge(Y,X).for every edge between X and Y.
These graph instances can be connected with one of the following encodings:
| Encoding |
Option in JBenge |
required Parameters |
requires a graph |
Call for benchmarks.jar |
|---|---|---|---|---|
| Independent set problem |
indset |
- |
yes |
-encoding=indset |
| Kernel Problem |
kernel |
- |
yes |
-encoding=kernel |
| Coloring Problem |
coloring |
number of colors |
yes |
-encoding=coloring -nc=nbcolors |
| Hamiltonian cycle problem (by I. Niemelä) (Hint!) |
hamiltonN |
- |
no |
-encoding=hamiltonN |
| Hamiltonian cycle problem (by Lin and Zhao) (Hint!) |
hamiltonL |
- |
no |
-encoding=hamiltonL |
| Hamiltonian cycle problem (by Ward ans Schlipf) (Hint!) |
hamiltonWS |
- |
no |
-encoding=hamiltonWS |
The option „no-encoding“ generates only the instance of a graph, whenever a graph has been choosen.
Important Hint for Hamilton Encoding: For the Hamilton encodings the definition of the initial vertex must be done separately. That is, you have to add the rule
initialvtx(x).to the program, where "x" denotes the initial node for the Hamiltonian cycle.
Planning problems
Considering planning problems and other program instances, we provide the following encodings:
| Planning Problem |
Option in JBenge |
required Parameter |
Call for benchmarks.jar |
|---|---|---|---|
| Queens problem for a chess board of size n*n |
queens |
n |
-planning=queens -np=n |
| Schur problem of partitioning n integers into m boxes |
schur |
n and m |
-planning=schur -np=n,m |
Logic program from nomore++ |
headn |
n |
-planning=headn -np=n |
| Logic program from nomore++ |
bodyn |
n |
-planning=bodyn -np=n |
History
- June 14, 2006: Deletion of syntactical errors in Hamiltonian Encodings
Any Comments?
- detect some errors, or
- have suggestions for including further options,

