Next Previous Contents

9. DOMjudge and the ICPC validator interface standard

DOMjudge supports the ICPC validator interface standard, which can be found at: http://www.ecs.csus.edu/pc2/doc/valistandard.html

As short summary, this interface standard consists of two parts: the invocation and the result interface. The invocation interface specifies that a validator must be called as a separate executable with at least four command line parameters:


/path/to/validator <input_data> <program_output> <reference_output> <result_file> [<extra_options>...]

The result interface specifies that result_file should be a valid XML document containing a root element


<result outcome="string1"> string2 </result>

where string1 is the result reported to the judging system and a value "accepted" indicates a correct result.

The invocation code (judge/testcase_run.sh) adheres to the invocation interface. It passes as a 5th optional parameter to the validator program the filename in which it expects a difference output between the program and jury output (parameters 2 and 3 respectively).

Parsing of the result XML file (in the result interface) is done with the `xsltproc' program, which is part of the GNOME libxslt package. The exitcode of the validator program should be zero, otherwise an internal error is generated.

DOMjudge currently has two validator scripts: judge/compare and judge/compare_wrapper. The first does a compare with a plain diff, the second script calls an external program for checking (e.g. judge/check_float for comparison of floating point results). When passed a 5th parameter, this is interpreted as a filename to which these scripts will write a comparison of the program and jury output. Both scripts also generate XML compliant output, which is written to the result file specified in parameter 4 and fully complies with the validator standard.


Next Previous Contents