Execution environment

Host

The solver will be executed on a virtual machine that simulates a GNU/Linux host of architecture x86, 32 bit, single-processor. The OS running on the virtual machine is debian squeeze + security updates.

Available software

The version of all available software, if not specified, is equal to the version of the software present in debian lenny + security updates.

On the virtual machine are installed:

  • A standard POSIX environment. In particular a POSIX-compatible shell, which may be invoked by /bin/sh, will be available, as well as a GNU Bourne-Again SHell (invoked as /bin/bash).

  • A Sun (Oracle) Java runtime environment; the Java application launcher can be invoked as /usr/bin/java.

  • A Python 2.6.* environment; the main Python interpreter can be invoked as /usr/bin/python.

No other libraries, for any programming language, can a priori be assumed to be available in the chroot environment. That means:

  • Solvers prepared using compilers supporting compilation to ELF must be submitted as statically linked ELF binaries. No assumptions can be made on available shared libraries (so) in the chroot environment.

  • Solvers written in some (supported) interpreted language must use the usual shebang lines (#!/path/to/interpreter) to invoke their interpreter.

  • Solvers written in Java must be wrapped by shell scripts invoking the Java application launcher as needed.

  • Solvers needing other kind of support in the chroot must make specific arrangements with the competition organizers before the final submission.

Resource limitation

The solver execution will be additionally constrained by the following limits (as implemented by ulimit):

  • Maximum execution time: 5 minutes
  • Maximum memory (RAM): 1 GB
  • Maximum file system space: 1 GB (including the solver itself)

The execution time is cpu time, measured in the same way as ulimit -t. About 20 seconds before the timeout, the signal SIGUSR1 will be sent to the solver process and all its sub processes. It is the responsibility of the solver to catch that signal, produce an output, and terminate normally. The utility runsolver used to enforce these limits can be downloaded here.

Solver invocation

  • The solver will be executed from within the solver directory.

  • Each problem of the competition will be run in a fresh copy of the solver directory.

  • The solver will be called with 2 command line arguments: cudfin and cudfout, in this order. Both arguments are absolute file systems paths.

    • cudfin points to a complete CUDF 2.0 document, describing an upgrade scenario. The CUDF document will be encoded as ASCII plain text, not compressed. The CUDF 2.0 format is specified here. According to the specifications, the document will consist of an optional preamble stanza, followed by several package stanzas, and ended by a request stanza.

    • cudfout points to a non-existent file that should be created by the solver to store its result.

    • In the "user" track, the solver will be called with three command line arguments: cudfin, cudfout, and criterion, in this order. The first two arguments are as above, the criterion argument desribes the optimization criterion. The criterion is a non-empty and comma-separated list of signed function names. Each sign is either "+" or "-", and each function name is one of removed, new, changed, notuptodate, unsat_recommends, sum(property) where property is a package property of type int or one of its subtypes. See the detailed description of the optimizaton criteria for the precise meaning of these.

Solver output

  • The solver's standard output may be used to emit informative messages about what the solver is doing.

  • If the solver is able to find a solution, then it must:

    • write to cudfout the solution encoded in CUDF syntax as described in Appendix B of the CUDF 2.0 specification;

    • exit with an exit code of 0.

  • If the solver is unable to find a solution, then it must:

    • write to cudfout the string "FAIL" (without quotes), possibly followed by an explanation in subsequent lines (lines are separated by newline characters, ASCII 0x0A);

    • exit with an exit code of 0.

  • All exit codes other than 0 will be considered as indications of unexpected and exceptional failures not related to the inability to find a solution.