You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current generator spec consists of several hacks to handle previous unintended use cases (primarily that if the generator crashed, the input/output files would be passed directly to the program).
This has led to an opaque generator spec that is not documented and has several counterintuitive behaviours.
For example, specifying input_file and no output_file will run the generator with the input file passed to the generator via stdin, but if an output file is then specified, the generator will be totally bypassed.
I propose rewriting the spec for generator behaviour to the following. For an init.yml with a valid generator node:
If generator_args are specified, the generator is run with arguments (and no file input). Including input_file or generator_input_file will result in an InvalidInitException.
If output_file is included, it will be passed as the judge output.
Otherwise:
If generator_input_file is specified, the generator is fed the input file. Including input_file will result in an InvalidInitException.
If output_file is included, it will be passed as the judge output.
Otherwise:
If input_file is specified, the generator is ignored for that test case, and the files are passed directly to the submission
Otherwise, the generator is run with empty stdin, and output_file is passed as judge output if it exists.
This should hopefully result in more intuitive and well-documented behaviour.
The text was updated successfully, but these errors were encountered:
The current generator spec consists of several hacks to handle previous unintended use cases (primarily that if the generator crashed, the input/output files would be passed directly to the program).
This has led to an opaque generator spec that is not documented and has several counterintuitive behaviours.
For example, specifying
input_file
and nooutput_file
will run the generator with the input file passed to the generator viastdin
, but if an output file is then specified, the generator will be totally bypassed.I propose rewriting the spec for generator behaviour to the following. For an
init.yml
with a validgenerator
node:generator_args
are specified, the generator is run with arguments (and no file input). Includinginput_file
orgenerator_input_file
will result in anInvalidInitException
.output_file
is included, it will be passed as the judge output.generator_input_file
is specified, the generator is fed the input file. Includinginput_file
will result in anInvalidInitException
.output_file
is included, it will be passed as the judge output.input_file
is specified, the generator is ignored for that test case, and the files are passed directly to the submissionstdin
, andoutput_file
is passed as judge output if it exists.This should hopefully result in more intuitive and well-documented behaviour.
The text was updated successfully, but these errors were encountered: