defaultParams.json

The file defaultParams.json contains generated information about the task it is present in, and is used to auto-fill some values for the taskgrader.

It simplifies input JSON writing by allowing to omit some values in it and letting the taskgrader grab them from the defaultParams. More information in the input JSON documentation page.

It is generated by the genJson tool, and the stdGrade tool uses it for evaluations. It is a JSON object containing key-value pairs, and is not meant to be manually modified. Check the taskSettings.json file to control the generation of this file.

The following list is the list of keys it contains. Note that the types are from the schema_input.json file, describing the input JSON schema.

Task components information

These keys are the task components which were detected by the genJson tool.

Key name Type Description
defaultToolCompParams executionParams Compilation parameters for the components of the task
defaultToolExecParams executionParams Execution parameters for the components of the task
defaultGenerator list of objects Generator for the task
defaultGeneration object Generation associated with the detected generator
defaultExtraTests list of fileDescr Test cases given as-is
defaultFilterTests-[lang] list of glob List of test cases for each language
defaultFilterTests list of glob List of test cases for all languages (most defaultFilterTests-[lang] are aliases to this one)
defaultDependencies-[lang] list of fileDescr Detected dependencies for each language
defaultSanitizer compileAndRunParams Sanitizer for the task
defaultChecker compileAndRunParams Checker for the task

Default evaluation values (defaultEvaluation* keys)

These keys correspond to (almost) each root key in the input JSON for the taskgrader. They are used by the taskgrader if the corresponding key is omitted in the input JSON; check the documentation on input JSON for more information on how to use these keys. Here are the default values for all of them:

"defaultEvaluationGenerators": ["@defaultGenerator"],
"defaultEvaluationGenerations": ["@defaultGeneration"],
"defaultEvaluationExtraTests": "@defaultExtraTests",
"defaultEvaluationSanitizer": "@defaultSanitizer",
"defaultEvaluationChecker": "@defaultChecker",
"defaultEvaluationSolutions": [{
    "id": "@solutionId",
    "compilationDescr": {
        "language": "@solutionLanguage",
        "files": [{"name": "@solutionFilename",
                   "path": "@solutionPath",
                   "content": "@solutionContent"}],
        "dependencies": "@solutionDependencies"
        },
    "compilationExecution": "@defaultSolutionCompParams"
    }],
"defaultEvaluationExecutions": [{
    "id": "@solutionExecId",
    "idSolution": "@solutionId",
    "filterTests": "@solutionFilterTests",
    "runExecution": "@defaultSolutionExecParams"
    }]

To change the task behavior, you generally need to tweak these defaultEvaluation keys (through taskSettings.json); for instance, the example in examples/taskRunner changes the solution execution, check the documentation about this example for more information.

Solution default values

Some default values are stored to be used for the defaultEvaluation keys if not specified in the input JSON.

Key name Type Default Description
defaultSolutionCompParams executionParams CFG_TESTSOL_PARAMS Compilation parameters for the solution (defaults to those specified in CFG_TESTSOL_PARAMS in genJson's config.py)
defaultSolutionExecParams executionParams CFG_TESTSOL_PARAMS Execution parameters for the solution (same as above)
solutionDependencies list of fileDescr [] List of dependencies for the solution (should be set to '@defaultDependencies-[lang]' in the input JSON)
solutionFilterTests list of strings '@defaultFilterTests' List of test cases to use on the solution
solutionId string "solution" Internal ID for the solution
solutionExecId string "execution" Internal ID for the execution of the solution

Also, one of these two keys must be specified in the input JSON (if solutionPath is filled, solutionContent will be ignored):

Key name Type Description
solutionPath string Path to the solution
solutionContent string Content of the solution

Other information

Key name Type Description
rootPath string Value of the rootPath which was used when the defaultParams were generated.
genJsonVersion string Version of genJson which generated these defaultParams.