Skip to content

CLICS Validator

John edited this page Sep 4, 2019 · 7 revisions

Overview

PC2V9 provides an implementation of Output Validators as defined by the CLICS Validator specification.
The implementation supports all of the specified options for CLICS output validators, including

  • ''case_sensitive''
  • ''space_change_sensitive''
  • ''float_relative_tolerance E''
  • ''float_absolute_tolerance E''
  • ''float_tolerance E''

where ''E'' is a float value in either decimal notation (e.g. ''0.01'') or scientific notation (e.g. ''1e-02'').

In addition, the PC2V9 implementation accepts keywords ''case-sensitive'', ''space-change-sensitive'', ''space-sensitive'', ''float-relative-tolerance'', ''float-absolute-tolerance'', and ''float-tolerance'' as replacements for the corresponding keywords using underscores.

The operation of all of the above options is exactly as described in the CLICS Validator specification.

Validator Feedback

The CLICS Output Validator specification states that an output validator may optionally write additional "feedback information" into the feedback directory. The PC2V9 Clics Validator implementation does this. Specifically, it creates a judgement feedback file in the feedback directory containing a description of the validation result. If the team's output is deemed correct then it uses method outputSuccess() to write a "correct answer" message into the judgement feedback file, whereas if the team's output is deemed incorrect then it uses method outputFailure() to write a failure message into the judgement feedback file.

If the team's output is deemed incorrect, then the PC2V9 CLICS Validator also creates a second file, called the judgement details file, in the feedback directory. Examples of judgement details file messages are things like

  • "Expected float token in team output, got "
  • "Float tolerance output of range" (plus some specific details on the expected and actual float values)
  • "String token mismatch", followed by the judge's (expected) token and the team's (actual) token
  • "Space change error", followed by the judge's (expected) token/spacing and the team's (actual) token/spacing
  • "Incomplete output", followed by the judge's token which was expected but missing from the team's output
  • "Team has trailing output beyond what judge answer file contains"

These feedback files are used by PC2V9 to display detailed information to the judges regarding what happened during the output validation process. (The detail messages are displayed on the Judge's GUI during manual judging of problems.)

Examples

An example showing the use of all options:

case_sensitive space_change_sensitive float_absolute_tolerance 4.0042354 float_relative_tolerance 4.0042354

Examples of individual options:

case_sensitive
space_change_sensitive
float_absolute_tolerance 4.0042354
float_relative_tolerance 4.0042354

See Also

PC2 Logo

Clone this wiki locally