-
Notifications
You must be signed in to change notification settings - Fork 291
Open
Labels
Description
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_argsare specified, the generator is run with arguments (and no file input). Includinginput_fileorgenerator_input_filewill result in anInvalidInitException.- If
output_fileis included, it will be passed as the judge output.
- If
- Otherwise:
- If
generator_input_fileis specified, the generator is fed the input file. Includinginput_filewill result in anInvalidInitException.- If
output_fileis included, it will be passed as the judge output.
- If
- Otherwise:
- If
input_fileis 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, andoutput_fileis passed as judge output if it exists.
- If
- If
This should hopefully result in more intuitive and well-documented behaviour.
Reactions are currently unavailable