welcome: please sign in
location: Diff for "ProblemIOSpecification"
Differences between revisions 3 and 55 (spanning 52 versions)
Revision 3 as of 2012-05-09 14:36:21
Size: 4755
Comment:
Revision 55 as of 2014-03-31 09:16:28
Size: 7223
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Problem Submission Specification: Input, Output, Checking = = Problem Specification: Input, Output, Checking =
Line 3: Line 3:
== Package Submission Templates == <<TableOfContents>>
Line 5: Line 5:
 * '''Preliminary submission''' (see [[#package-example|Example]]) can be done by providing problem name and problem specification only; we encourage to provide an ASP encoding and sample instances also. <<Anchor(package-io)>>
Line 7: Line 7:
 * '''Complete problem specifications''' (see [[#package-example|Example]]) shall be sent by email to [[mailto:benchmark_submission_REPLACE_WITH_AT_mat.unical.it|Benchmark Submission]] enclosed in a single compressed package (zip, rar, and tar.gz are allowed formats), containing: == Problem Input-Output predicates and Instance Specification ==
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.
Line 9: Line 10:
have to be packaged in a single compressed archive named {{{benchmark_name-contributor_name.zip}}} (or {{{tar.gz}}}) containing: === 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}}}).
Line 11: Line 13:
  1. a {{{benchmark_name.spec.txt}}} file containing the textual problem description (a template is available, see below); === 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 1-to-1 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 {{{[a-zA-Z][a-zA-Z0-9]*}}}.
Line 13: Line 16:
  2. a {{{benchmark_name.enc.asp}}} file containing a proposed encoding in ASP for the problem ''(details about the language will follow)''; <<Anchor(MAXINT-MAXLEVEL)>>
Line 15: Line 18:
  3. a folder named {{{checker}}} containing the sources of a correctness checker together with a README.txt file containing the instructions for (possibly building and) running it;

  4. a folder named {{{samples}}} containing some instances (one instance per text file).

{{{benchmark_name}}} and {{{contributor_name}}} should be substituted with their actual value.

<<Anchor(package-example)>>
==== Package Example Download ====
  * ''Sample Package Download'' [[attachment:GraphColouring.zip||&do=get]]
  * ''Preliminary Submission Example'' [[attachment:GraphColouring.txt||&do=get]]
==== Maximum Integer and maximum function nesting level ====
Maximum Integer and maximum function nesting level have to be provided in a per-instance basis. In particular, they are specified in the filename containing a given instance. We recall that instances must be named {{{XX-benchmark_name-MAXINT-MAXLEVEL.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.
Line 27: Line 22:
=== Checker format ===
Line 29: Line 23:
The checker reads from standard input a witness in the prescribed format (see [[http://www.mat.unical.it/aspcomp2011/files/LanguageSpecifications.pdf|File and Language Format]] for details) and writes in standard output a single row of text containing the string {{{OK}}} (if the witness is correctly assessed as a solution), and the string {{{FAIL}}} otherwise. The string {{{OK}}} must be followed by a space-separated integer representing the witness cost in case of optimization problems. The checker outputs {{{WARN}}} and an exit code different from zero in all other cases (e.g. the witness
is not syntactically correct, or the output {{{INCONSISTENT}}} has been incorrectly piped towards the checker). Informative messages
can be output in standard error.
== Checker Description ==
The checker gets as parameters
Line 33: Line 26:
Note that witnesses are assumed to be inclusive of both instance facts (input predicates) and solution facts (output predicates).  1. 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.)
 1. the file name of the problem instance
Line 35: Line 29:
'''Remark''': checkers provided by benchmark authors will be used only for checking existing witnesses. It is not up to the benchmark author
to check validity of other outputs like {{{INCONSISTENT}}}.
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}}}.
Line 38: Line 31:
The source code of the correctness checker has to be be included in the package; moreover, the provided software must be able to (build 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. To sum it up, the checker is called in the following way:
Line 40: Line 33:
==== Instance "Hardness" ==== ./checker.sh EXITCODE INSTANCEFILE < AS-SOLVER-OUTPUT
Line 42: Line 35:
Provided problem instances should be "hard" in a pragmatic sense: we will not compare systems over instances expectedly taking far less than 1 second when run on the Competition hardware. 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.
Line 44: Line 37:
=== Problem Input-Output predicates and Instance Specification === '''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.
Line 46: Line 39:
In the following it is specified the allowed format for specifying input and output of problems and instances. Samples are available in the competition web site. 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 ASP-Competition specifications) of a checker or participating asp solver.
Line 48: Line 41:
==== 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. {{{p/2}}} denotes the binary predicate {{{p}}}).

==== 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 (only one instance per file is allowed).
In summary, the following cases are possible:
||||<tablewidth="851px" tableheight="160px"style="text-align:center">'''Solver<<BR>>''' ||||<style="text-align:center">'''Checker<<BR>>''' ||
||''exit code<<BR>>'' ||''standard output<<BR>>'' ||''standard input<<BR>>'' ||''possible outputs<<BR>>'' ||
||10 ||an answer set (including costs for optimization problems) ||an answer set (including costs for optimization problems, see [[#opt-checker|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 ||
Line 59: Line 49:
<<Anchor(MAXINT-MAXLEVEL)>>
==== Maximum Integer and maximum function nesting level, ====
have to be provided in a per-instance basis. In particular, they are specified in the filename containing a given instance. We recall that instances must be named {{{XX-benchmark_name-MAXINT-MAXLEVEL.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).

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.

<<Anchor(opt-checker)>>

=== 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 non-negative Integer. A higher level gives higher priority to the corresponding costs. The least-important 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.

Problem Specification: Input, Output, Checking

Problem Input-Output predicates and Instance Specification

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 1-to-1 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 [a-zA-Z][a-zA-Z0-9]*.

Maximum Integer and maximum function nesting level

Maximum Integer and maximum function nesting level have to be provided in a per-instance basis. In particular, they are specified in the filename containing a given instance. We recall that instances must be named XX-benchmark_name-MAXINT-MAXLEVEL.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

  1. 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.)
  2. 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 < AS-SOLVER-OUTPUT

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 ASP-Competition 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 non-negative Integer. A higher level gives higher priority to the corresponding costs. The least-important 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.

Fifth Answer Set Programming Competition (ASPCOMP 2014): ProblemIOSpecification (last edited 2014-03-31 09:16:28 by FrancescoCalimeri)