PC² Validator

From PC2wiki
Jump to: navigation, search

The PC² Validator reads the run output and the judge's answer file and produces an XML file that conforms to the International Collegiate Programming Contest Validator Interface Standard

Adding/Configuring a Validator to a Problem

Using the Validator tab on the Edit Problem a user can add the PC² Validator.

Here is a quick list of steps to add a PC² Validator to a problem.

  1. Add or Edit a Problem
  2. Add or update the input and/or answer files
  3. Select the Validator Tab
  4. Select the Use PC^2 Validator radio button
  5. Select the Validator Option
  6. Optionally check the Ignore Case in Output checkbox
  7. Add or Update the problem.

PC² Validator Judgements

The PC² Validator is very limited and returns only the following judgements:

  • accepted means judged Yes
  • No - Wrong Answer means No failed to match Judge's answer file
  • No - Indeterminant means could not determine a judgement

The PC² provides support for an External Validator which should be used to provide specific judgements for problems.


Usage: java Validator [options] <inputfile name> <outputfile name> <answerfile name> <resultfile name> <-pc2> [pc2_option] icflag

pc2 options are: 
1 - diff
2 - ignore whitespace at start of file
3 - ignore leading whitespace on lines
4 - ignore all whitespace on lines
5 - ignore empty lines

icflag - ignore case flag during diff/compare (true or false)

  --help    this messge 
  --verbose more info like EOF: line counts
  --debug   a large amount of debugging output

If a input, output or answer file is not needed/used use - (dash) for the name, for example:
java Validator - sumit.dat sumit.ans result.xml -pc2 1 true

Version 9.1.5 20091202 (Wednesday, December 2nd 2009 04:09 UTC) Java ver 1.6.0_22 build 1969 Windows 7 6.1 (x86)

Note: the icflag is case in-sensitive. To make the validator compare case sensitive use false.

See Also