First Phase: Compilation
- 
    Create a temporary directory for autograding this student’s submission. 
- 
    Create a temporary subdirectory for compilation. 
- 
    Copy the student’s submitted source code (for compiled languages) to this temporary directory. Note: The copied files can be controlled with the submission_to_compilationvariable inconfig.json.
- 
    Copy the files from the provided_codedirectory into the temporary compilation subdirectory.
- 
    Scan through the testcases in the config.jsonfor all testcases with type = “compilation”.
- 
    Execute the “command”(s) for the compilation testcases. 
- 
    Rename the STDOUT.txt,STDERR.txt, execution logfiles, and specified output files that are to have been created by the program execution (prefix with test case number).

Second Phase: Execution
- 
    Create a temporary subdirectory for runner and validation work. 
- 
    Copy the student’s submitted source code (for interpreted languages) to the tmp_worksubdirectory. Note: The copied files can be controlled with thesubmission_to_runnervariable inconfig.json.
- 
    Copy the test input files to the tmp_worksubdirectory.
- 
    Copy the compiled executables from the tmp_compilationsubdirectory to thetmp_worksubdirectory. Note: The copied files can be controlled with thecompilation_to_runnervariable inconfig.json.
- 
    Scan through the testcases in the config.jsonfor all testcases with type = “execution”.
- 
    Execute the “command”(s) for the execution testcases. 
- 
    Rename the STDOUT.txt,STDERR.txt, execution logfiles, and specified output files that are to have been created by the program execution (prefix with test case number).

Third Phase: Validation
- 
    Copy specific files as needed from the student’s submission languages to the tmp_worksubdirectory. Note: These files are specified with thesubmission_to_validationvariable inconfig.json.
- 
    Copy the custom validation code into the tmp_worksubdirectory.
- 
    Copy the expected test output into the tmp_worksubdirectory.
- 
    Copy output files from compilation from the tmp_compilationsubdirectory to thetmp_worksubdirectory. Note: The copied files can be controlled with thecompilation_to_validationvariable inconfig.json.
- 
    Scan through the test cases in the config.jsonand perform the validation checks indicated within each check.
- 
    Calculate the score for each test case, and determine what messages and files should be displayed for each test case. 
- 
    Write the results.jsonandgrade.txtfiles.
- 
    Copy files as needed from the tmp_workdirectory for archive to the details subfolder of the student’s results directory for this assignment and submission version. Note: The copied files can be controlled with thework_to_detailsvariable inconfig.json.

Variables to move files
As outlined in the above sections & diagrams, there are 6 different
configuration settings in the config.json to control the movement of
files.  Some of them have reasonable defaults for assignments that are
compiling and running Python, C++, and Java programs (we may update
these defaults in future revisions to Submitty).  Each setting should
be a list of one or more strings to match against files.  You may use
wildcards.  Example of syntax:
    "autograding" : {
        "submission_to_compilation" : [ "part1/*.pdf" ],
        "submission_to_runner" : [ "part2/*.pdf", "special.xlsx" ],
        "compilation_to_runner" : [ "**/*.pdf" ],
        "submission_to_validation" : [ "part3/*.png" ],
        "compilation_to_validation" : [ "*/*.pdf" ],
        "work_to_details" : [ "*.pdf" ]
    },
These file match patterns will be appended to the Submitty defaults, defined here: grading/load_config_json.cpp
