Problem Submission Specification: Input, Output, Checking
Quick Directions
Package Submission Instructions
Preliminary submission (see Example) simply requires problem name and description/specification only, even if the submission of sample instances is encouraged. In case you want to propose the problem for the System Competition, an ASP encoding is also strongly suggested. If possible, please also mention the complexity of your problem.
 Preliminary submissions are now over. Complete problem submissions are now reserved to selected problem authors.
Complete problem specifications (see Example): Final package submissions are handled by submitting the problem package via Easychair (here), packaged in a single compressed archive named benchmark_namecontributor_name.zip containing:
a specification.txt file containing the textual problem description, with a clear specification of the input and output formats. Names and arguments of input and output predicates must be clearly specified (see Problem I/O, a template example is also available, see below);
a file encoding.asp containing a proposed encoding in ASP for the problem (only required for the System Competition);
a folder named checker containing a startup file checker.sh and possibly further sources of a correctness checker (see Checker Description for details);
a folder named instances containing at least 50 instances instances (one instance per text file, following our instance naming convention) or the generator thereof (together with a README.txt that provides instructions for building and running it, see Generator Description);
a folder named example containing a satisfiable example instance instance.asp and the expected outcome outcome.txt in order to help in disambiguating blurred specifications.
Package Example Download
Preliminary Submission Example GraphColouringPreliminary.zip
Complete Submission Example GraphColouring.zip
Changelog:
 February 11, 2013: fixed (and added) specification for checkers of optimization problems
 October 23, 2012: fix compatibility with gringo and lparse
Problem InputOutput predicates and Instance Specification (mandatory for the System Competition)
In the following the allowed format for specifying input and output of problems and instances is given. Samples are available in the competition web site.
Problem Input and Output.
Benchmark problems specifications have to clearly indicate the vocabulary of input and output predicates, i.e., a list of predicate names for the input and a list of predicate names for the output and their arity in the usual logic programming notation (e.g. edge/2 denotes the binary predicate edge).
Instance Specification.
Input instance are sequences of Facts (atoms followed by the dot "." character) with only predicates of the input vocabulary, possibly separated by spaces and line breaks, entirely saved in a text file (instances and files must be in 1to1 correspondence). Examples of facts: node(a), edge(a,b). The terms a and b can be positive integers, double quoted strings or unquoted strings belonging to the vocabulary [azAZ][azAZ09]*.
Maximum Integer and maximum function nesting level,
have to be provided in a perinstance basis. In particular, they are specified in the filename containing a given instance. We recall that instances must be named XXbenchmark_nameMAXINTMAXLEVEL.asp where XX is the instance number, MAXINT is the maximum integer (0 if not relevant/no arithmetics are required), and MAXLEVEL is the maximum function nesting level (0 if not relevant). These data should be provided for those solvers needing an explicit bound on the range of integers and/or function symbols. One or both can be set to 0 if your problem domain does not use either numbers or function symbols or both.
Checker Description
The checker gets as parameters
 the exit code from the solver, which is 10 for satisfiable instances, 20 for unsatisfiable instances, and any other value in case of an error (e.g. timeout, segmentation fault, etc.)
 the file name of the problem instance
If the solver exit code is 10, the checker reads from standard input a witness, i.e. an answer to the problem instance at hand. If the solver exit code is 20, it reads from standard input the constant string INCONSISTENT. If the solver exit code is any other value, it reads from standard input the constant string INCOMPLETE.
To sum it up, the checker is called in the following way:
./checker.sh EXITCODE INSTANCEFILE < ASSOLVEROUTPUT
The checker is expected to write to standard output a single row of text containing the string OK with exit code 0 if the solver exit code and standard input correspond to the expected output for the given instance. That is, the instance is satisfiable and the solver correctly returned 10 and produced an answer set, or the instance is unsatisfiable and the solver correctly returned 20 and the input to the checker was INCONSISTENT.The checker is expected to write a single row of text containing the string FAIL with exit code 1 if the solver result was wrong. That is, e.g., the solver produced an answer set of an inconsistent instance or returned 20 for a satisfiable one. For optimization problems, the checker must also verify the costs claimed by the solver and write FAIL with exit code 1 if a discrepancy is found.
Remark: Additionally, the checker may return 2 and the string DONTKNOW if the checker is not able to verify or falsify the solver result. This result should be avoided whenever possible, but might be used if it is computationally too costly to determine an answer, e.g., to verify an INCONSISTENT result (i.e. to prove that the instance is indeed unsatisfiable) or to prove minimality of an answer set of a disjunctive program.
Furthermore, the checker can return WARN and exit code 3 in case an internal checker error occurs. For example, this may be the case when exit code 10 is provided but the given answer set contains a syntactic error or the checker fails due to any unexpected reason. The intuition behind WARN is to detect faulty behavior (i.e. errors that are not related to the correctness of a result but to bugs or noncompliance to the ASPCompetition specifications) of a checker or participating asp solver.
In summary, the following cases are possible:
Solver 
Checker 

exit code 
standard output 
standard input 
possible outputs 
10 
an answer set (including costs for optimization problems) 
an answer set (including costs for optimization problems, see here) 
OK with exit code 0 if the answer set is correct; FAIL with exit code 1 if the answer set is incorrect; DONTKNOW with exit code 2 if the checker cannot verify the result; WARN with exit code 3 if there is an internal error 
20 

INCONSISTENT 
OK with exit code 0 if the instance is indeed inconsistent; FAIL with exit code 1 if the instance is consistent; DONTKNOW with exit code 2 if the checker cannot verify the result; WARN with exit code 3 if there is an internal error 
any other value different from 0 

INCOMPLETE 
FAIL with exit code 1; WARN with exit code 3 if there is an internal error 
Note that witnesses given in input to checkers are assumed to be inclusive of both instance facts (input predicates) and solution facts (output predicates), but the file name of the instance is additionally passed as second parameter to the checker.
The source code of the correctness checker has to be be included in the package; the provided software must be able to (be built and) run on the Debian i686 GNU/Linux(kernel ver. 2.6.26) operating system. A checker can be built on top of a logic specification for a solver of choice: in such a case binaries of the solver must be provided together with the checker encoding.
Additional Checker Output For Optimization Problems
For optimization problems it is necessary that the checker additionally computes the quality of the provided answer set. In case the solver exit code is 10 and the answer set is indeed a solution of the problem, the checker must write to standard output a single row of text containing the string OK followed by a list of costs per level (priority) in the format COSTS@LEVEL. LEVEL is a nonnegative Integer. A higher level gives higher priority to the corresponding costs. The leastimportant level must be specified with LEVEL=0. Each level from least to most important must get assigned costs. Example: OK 20@0 3@1 1@2 specifies that the costs at (most prioritized) level 2 are 1, at level 1 the costs are 3 and at the least prioritized level 0 they are 20.
Checker Example Download
An example checker is contained in the Complete Submission Example: GraphColouring.zip
Generator Description
The generator should create one instance per call, printing it to standard out.
The file README.txt must explain how the instance generator is built and run. In particular, the parameters which may influence the hardness of the instance need to be described, such that we can produce useful benchmark instances ranging from easy to difficult ones.
Furthermore, it must describe how the maximum integer and maximum function nesting level are obtained for a generated instance. This allows us to generate instances according to the naming conventions (see instance naming convention). In case any of those values are irrelevant for your problem, please mention that the respective value(s) can be set to 0.