Difference between revisions of "Validator"

From PC2wiki
Jump to: navigation, search
(first edition)
 
m (Fixed minor typos in CLICS Validator section)
 
(12 intermediate revisions by one other user not shown)
Line 1: Line 1:
A validator is a program that judges a run and recommends a judgement. To use the PC²  
+
A validator is a program that validates team's output and judge's solutions and judge's data.
auto judge feature a [[Problem]] must be defined to use a validator.
+
 
 +
To use the PC² auto judge feature a [[Problem]] must be defined to use a validator.
 +
 
 +
==PC² Output Validator==
 +
 
 +
See * [[PC² Validator]] article.
 +
 
 +
==CLICS Output Validator==
 +
 
 +
An Output Validator judges a submission and assigns a judgement.
 +
 
 +
An Output Validator can be use to validate:
 +
* a team's submission/solution
 +
* judge's solutions
 +
* problem samples
 +
 
 +
An output validator can be specified in the [[CDP]] under
 +
config/<SHORT_NAME>/output_validators/<VALIDATORNAME>/<FILES>
 +
 
 +
Example:
 +
  config/squares/output_validators/sqval/squares_valiator.cpp
 +
  config/squares/output_validators/sqval/build
 +
  config/squares/output_validators/sqval/run
 +
 
 +
* build - a script to build the validator executable
 +
* run - a script to run the validator
 +
 
 +
run usage
 +
run datafile answerfile feedbackfile [options] < teamsoutput
 +
where
 +
* datafile - judge's input data file
 +
* answerfile - judge's expected output/answer file
 +
* feedbackfile - additional output from the validator, maybe of help to judges
 +
* teamsoutput - team's output
 +
 
 +
run results/output
 +
* exit code 42 - AC judgement (yes)
 +
* exit code 43 - WA judgement (no, wrong answer)
 +
* (non-42 exit code is either WA or JE (Judging Error)
 +
 
 +
==CLICS Input Validator==
 +
 
 +
An Input Validator validates judge's problem input data or sample data.
 +
The validator will read judge's input data and output whether the data
 +
is valid input for the [[Problem]]
 +
 
 +
An Input Validator can be use to validate:
 +
* a judge's input data file, input for [[Problem]]
 +
 
 +
An output validator can be specified in the CDP under
 +
config/<SHORT_NAME>/input_validators/<VALIDATORNAME>/<FILES>
 +
 
 +
Example:
 +
  config/squares/input_validators/inval/squares_input_valiator.cpp
 +
  config/squares/input_validators/inval/build
 +
  config/squares/input_validators/inval/run
 +
 
 +
* build - a script to build the validator executable
 +
* run - a script to run the validator
 +
 
 +
run usage
 +
run feedbackfile < datafile
 +
where
 +
* datafile - judge's input data file
 +
* feedbackfile - additional output from the validator, maybe of help to judges
 +
 
 +
run results/output
 +
* exit code 42 - valid input data file
 +
* any other exit code - invalid input data file
  
 
==See Also==
 
==See Also==
 +
* CCS Reference [https://clics.ecs.baylor.edu/index.php/Output_validator Output Validator]
 +
* CCS Reference [https://clics.ecs.baylor.edu/index.php/Input_format_validator Input Format Validator]
 +
 
* [[Edit Problem]] [[Validator Tab]]
 
* [[Edit Problem]] [[Validator Tab]]
 
* [[Automated Judging]]
 
* [[Automated Judging]]
 
* [[International Collegiate Programming Contest Validator Interface Standard]]
 
* [[International Collegiate Programming Contest Validator Interface Standard]]
 +
* [[PC&sup2; Validator]]
 +
* [[External Validator]]

Latest revision as of 18:25, 16 December 2016

A validator is a program that validates team's output and judge's solutions and judge's data.

To use the PC² auto judge feature a Problem must be defined to use a validator.

PC² Output Validator

See * PC² Validator article.

CLICS Output Validator

An Output Validator judges a submission and assigns a judgement.

An Output Validator can be use to validate:

  • a team's submission/solution
  • judge's solutions
  • problem samples

An output validator can be specified in the CDP under

config/<SHORT_NAME>/output_validators/<VALIDATORNAME>/<FILES>

Example:

 config/squares/output_validators/sqval/squares_valiator.cpp
 config/squares/output_validators/sqval/build
 config/squares/output_validators/sqval/run
  • build - a script to build the validator executable
  • run - a script to run the validator

run usage

run datafile answerfile feedbackfile [options] < teamsoutput

where

  • datafile - judge's input data file
  • answerfile - judge's expected output/answer file
  • feedbackfile - additional output from the validator, maybe of help to judges
  • teamsoutput - team's output

run results/output

  • exit code 42 - AC judgement (yes)
  • exit code 43 - WA judgement (no, wrong answer)
  • (non-42 exit code is either WA or JE (Judging Error)

CLICS Input Validator

An Input Validator validates judge's problem input data or sample data. The validator will read judge's input data and output whether the data is valid input for the Problem

An Input Validator can be use to validate:

  • a judge's input data file, input for Problem

An output validator can be specified in the CDP under

config/<SHORT_NAME>/input_validators/<VALIDATORNAME>/<FILES>

Example:

 config/squares/input_validators/inval/squares_input_valiator.cpp
 config/squares/input_validators/inval/build
 config/squares/input_validators/inval/run
  • build - a script to build the validator executable
  • run - a script to run the validator

run usage

run feedbackfile < datafile

where

  • datafile - judge's input data file
  • feedbackfile - additional output from the validator, maybe of help to judges

run results/output

  • exit code 42 - valid input data file
  • any other exit code - invalid input data file

See Also