@ -222,62 +222,72 @@ Provided web application runs as javascript client inside user's browser. It com
## Assignments
## Assignments
Assignments are programming tasks that can be tested by a worker after a user
submits their solution. An assignment is described by a YAML file that contains information on how to
Assignments are programming tasks that can be tested and evaluated by a worker after user submits his solution. An assignment is described by a YAML file that contains information on how to build, run and test it. One submitted assignment is called a (worker) job.
build, run and test it.
### Basics
### Basics
Job is a set/list of tasks (it is generally a set, but order of tasks have some meaning). These tasks may have dependencies (arbitrary number), which needs to be observed. When recodex-worker processes job, it creates a task graph, where tasks are vertices and dependencies are edges (A -> B means that the task A is on the dependency list of task B) and creates its linear ordering. The graph must be acyclic (otherwise linear ordering will not exist) and the recodex-worker attempts to execute maximal number of tasks possible. Tasks without dependencies can be executed directly, other tasks are executed when all their dependencies have been successfully completed.
Tasks are executed sequentially -- by the linear ordering of the task graph. Parallel tasks (tasks, which are not directly dependent and thus their linear ordering may be arbitrary) are ordered first by their priority (higher number => higher priority) and second by their order in the configuration file. Priority is important for specifying evaluation flow. See sample picture for better understanding.
Job is a set/list of tasks (it is generally a set, but order of tasks have some meaning). These tasks may have dependencies (arbitrary number), which needs to be observed. When worker processes a job, it creates a task graph, where tasks are vertices and dependencies are edges (A -> B means that the task A is on the dependency list of task B, so A must be run earlier) and creates its linear ordering. The graph must be acyclic (otherwise linear ordering will not exist) and the worker attempts to execute maximal number of tasks possible. Tasks without dependencies can be executed directly, other tasks are executed when all their dependencies have been successfully completed.
Tasks are executed sequentially -- by the linear ordering of the task graph. Parallel tasks (tasks, which are not directly dependent and thus their linear ordering may be arbitrary) are ordered first by their priority (higher number means higher priority) and secondly by their order in the configuration file. Priority is important for specifying evaluation flow. See sample picture for better understanding.
![Picture of task serialization](https://github.com/ReCodEx/wiki/raw/master/images/Assignment_overview.png)
![Picture of task serialization](https://github.com/ReCodEx/wiki/raw/master/images/Assignment_overview.png)
Each task has a unique ID (alphanum string like _CompileA_, _RunAA_, or _JudgeAB_ in the picture). These IDs are used to identify tasks (for dependency references, in the log, ...). Numbers in bottom right corner are priorities of each task. Higher number is greater priority. It means, that if task _RunAA_ is done, next must be _JudgeAA_ and not _RunAB_ (that will be also valid linear ordering, but _RunAB_ has lower priority).
Each task has a unique ID (alphanum string like _CompileA_, _RunAA_, or _JudgeAB_ in the picture). These IDs are used to identify tasks (for dependency references, in the log, ...). Numbers in bottom right corner are priorities of each task. Higher number is greater priority. It means, that if task _RunAA_ is done, next must be _JudgeAA_ and not _RunAB_ (that will be also valid linear ordering, but _RunAB_ has lower priority).
### Task
### Task
Task is an atomic piece of work executed by recodex-worker. There are two basic types of tasks:
Task is an atomic piece of work executed by recodex-worker. There are two basic types of tasks:
- **Execute external process** (optionally inside Isolate). Linux default is mandatory usage of isolate, this option is here because of Windows, where is currently no sandbox available.
- **Perform internal operation**. External processes are meant for compilation, testing, or execution of external judges. Internal operations comprise commands, which are typically related to file/directory maintenance and other evaluation management stuff. Few important examples:
- **Execute external process** (optionally inside Isolate). External processes are meant for compilation, testing, or execution of external judges .Linux default is mandatory usage of isolate sandbox, this option is present because of Windows, where is currently no sandbox available.
- **Perform internal operation**. Internal operations comprise commands, which are typically related to file/directory maintenance and other evaluation management stuff. Few important examples:
- Create/delete/move/rename file/directory
- Create/delete/move/rename file/directory
- (un)zip/tar/gzip/bzip file(s)
- (un)zip/tar/gzip/bzip file(s)
- fetch a file from the file repository (either from worker cache or download it by HTTP GET or through SFTP).
- fetch a file from the file repository (either from worker cache or download it by HTTP GET or through SFTP).
Even though the internal operations may be handled by external executables (`mv`, `tar`, `pkzip`, `wget`, ...), it might be better to keep them inside the recodex-worker as it would simplify these operations and their portability among platforms. Furthermore, it is quite easy to implement them using common libraries (e.g., _zlib_, _curl_).
Even though the internal operations may be handled by external executables (`mv`, `tar`, `pkzip`, `wget`, ...), it might be better to keep them inside the worker as it would simplify these operations and their portability among platforms. Furthermore, it is quite easy to implement them using common libraries (e.g., _zlib_, _curl_).
#### Internal tasks
#### Internal tasks
**Archivate task** can be used for pack and compress a directory. Calling command is `archivate`. Requires two arguments:
- **Archivate task** can be used for pack and compress a directory. Calling command is `archivate`. Requires two arguments:
- path and name of the directory to be archived
- path and name of the target archive. Only `.zip` format is supported.
- path and name of the directory to be archived
- **Extract task** is opposite to archivate task. It can extract different types of archives. Supported formats are the same as supports `libarchive` library (see [libarchive wiki](https://github.com/libarchive/libarchive/wiki)), mainly `zip`, `tar`, `tar.gz`, `tar.bz2` and `7zip`. Please note, that system administrator may not install all packages needed, so some formats may not work. Please, consult your system administrator for more information. Archives could contain only regular files or directories (ie. no symlinks, block and character devices sockets or pipes allowed). Calling command is `extract` and requires two arguments:
- path and name of the target archive. Only `.zip` format is supported.
**Extract task** is opposite to archivate task. It can extract different types of archives. Supported formats are the same as supports `libarchive` library (see [libarchive wiki](https://github.com/libarchive/libarchive/wiki)), mainly `zip`, `tar`, `tar.gz`, `tar.bz2` and `7zip`. Please note, that system administrator may not install all packages needed, so some formats may not work. Please, consult your system administrator for more information. Archives could contain only regular files or directories (ie. no symlinks, block and character devices sockets or pipes allowed). Calling command is `extract` and requires two arguments:
- path and name of the archive to extract
- directory, where the archive will be extracted
- path and name of the archive to extract
- directory, where the archive will be extracted
**Fetch task** will give you a file. It can be downloaded from remote file server or just copied from local cache if available. Calling comand is `fetch` with two arguments:
- **Fetch task** will give you a file. It can be downloaded from remote file server or just copied from local cache if available. Calling comand is `fetch` with two arguments:
- name of the requested file without path
- name of the requested file without path (file sources are set up in worker configuratin file)
- path and name on the destination. Providing a different destination name can be used for easy rename.
- path and name on the destination. Providing a different destination name can be used for easy rename.
**Copy task** can copy files and directories. Detailed info can be found on reference page of [boost::filesystem::copy](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#copy). Calling command is `cp` and require two arguments:
- path and name of source target
- **Copy task** can copy files and directories. Detailed info can be found on reference page of [boost::filesystem::copy](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#copy). Calling command is `cp` and require two arguments:
- path and name of destination targer
**Make directory task** can create arbitrary number of directories. Calling command is `mkdir` and requires at least one argument. For each provided one will be called [boost::filesystem::create_directories](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#create_directories) command.
- path and name of source target
- path and name of destination targer
**Rename task** will rename files and directories. Detailed bahavior can be found on reference page of [boost::filesystem::rename](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#rename). Calling command is `rename` and require two arguments:
- path and name of source target
- **Make directory task** can create arbitrary number of directories. Calling command is `mkdir` and requires at least one argument. For each provided argument will be called [boost::filesystem::create_directories](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#create_directories) command.
- path and name of destination target
- **Rename task** will rename files and directories. Detailed bahavior can be found on reference page of [boost::filesystem::rename](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#rename). Calling command is `rename` and require two arguments:
- path and name of source target
- path and name of destination target
- **Remove task** is for deleting files and directories. Calling command is `rm` and require at least one argument. For each provided one will be called [boost::filesystem::remove_all](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#remove_all) command.
**Remove task** is for deleting files and directories. Calling command is `rm` and require at least one argument. For each provided one will be called [boost::filesystem::remove_all](http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/reference.html#remove_all) command.
#### External tasks
#### External tasks
These tasks are typically executed in isolate (with given parameters) and the `recodex-worker` waits until they finish. The exit code determines, whether the task succeeded (0) or failed (anything else). A task may be marked as essential; in such case, failure will immediately cause termination of the whole job.
External tasks are arbitrary executables, typically ran inside isolate (with given parameters) and the worker waits until they finish. The exit code determines, whether the task succeeded (0) or failed (anything else). A task may be marked as essential; in such case, failure will immediately cause termination of the whole job.
- **stdin** - can be configured to read from existing file or from `/dev/null`.
- **stdin** - can be configured to read from existing file or from `/dev/null`.
- **stdout** and **stderr** - can be individually redirected to a file or discarded. If this output options are specified, than it is possible to upload output files with results by copying them in result directory.
- **stdout** and **stderr** - can be individually redirected to a file or discarded. If this output options are specified, than it is possible to upload output files with results by copying them in result directory.
@ -285,58 +295,69 @@ These tasks are typically executed in isolate (with given parameters) and the `r
The task results (exit code, time, and memory consumption, etc.) are saved into result yaml file and sent back to frontend application to address which was specified on input.
The task results (exit code, time, and memory consumption, etc.) are saved into result yaml file and sent back to frontend application to address which was specified on input.
#### Judges
#### Judges
Judges are treated as normal external command, so there is no special task for them. They should be used for comparision of outputted files from execution tasks and sample outputs. Results of this comparision should be at least information if files are same or not. Extension for this is percentual results based on similarity of given files.
Judges are treated as normal external commands, so there is no special task type for them. Binaries are installed alongside with worker executable in standard directories (on both Linux and Windows systems).
Judges should be used for comparision of outputted files from execution tasks and sample outputs fetched from fileserver. Results of this comparision should be at least information if files are same or not. Extension for this is percentual results based on similarity of given files. All of the judges results have to be printed to standard output.
All packed judges are adopted from old Codex with only very small modifications. ReCodEx judges base directory is in `${JUDGES_DIR}` variable, which can be used in job config file.
All packed judges are adopted from old Codex with only very small modifications. ReCodEx judges base directory is in `${JUDGES_DIR}` variable, which can be used in job config file.
##### Judges interface
##### Judges interface
For future extensibility is **critical** that judges have some shared **interface** of calling and return values.
For future extensibility is **critical** that judges have some shared **interface** of calling and return values.
- Parameters: There are two mandatory positional parameters which has to be files for comparision
- Parameters: There are two mandatory positional parameters which has to be files for comparision
- Results:
- Results:
- _everything OK_
- _comparison OK_
- exitcode: 0
- exitcode: 0
- stdout: there is one line with double value which should be percentage of similarity of two given files
- stdout: there is one line with double value which should be percentage of similarity of two given files
- _error during execution_
- _error during execution_
- exitcode: 1
- exitcode: 1
- stderr: there should be description of error
- stderr: there should be description of error
##### ReCodEx judges
##### ReCodEx judges
Below is list of judges which is packed with ReCodEx project and comply above requirements.
Below is list of judges which are packed with ReCodEx project and comply above requirements.
**recodex-judge-normal** is base judge used by most of exercises. This judge compares two text files. It compares only text tokens regardless amount of whitespace between them.
- **recodex-judge-normal** is base judge used by most of exercises. This judge compares two text files. It compares only text tokens regardless on amount of whitespace between them.
- file1 and file2 are paths to files that will be compared
```
- switch options `-r` and `-n` can be specified as a 1st optional argument.
- file1 and file2 are paths to files that will be compared
- switch options `-r` and `-n` can be specified as a 1st optional argument.
- `-n` judge will treat newlines as ordinary whitespace (it will ignore line breaking)
- `-n` judge will treat newlines as ordinary whitespace (it will ignore line breaking)
- `-r` judge will treat tokens as real numbers and compares them accordingly (with some amount of error)
- `-r` judge will treat tokens as real numbers and compares them accordingly (with some amount of error)
**recodex-judge-filter** can be used for preprocess output files before real judging. This judge filters C-like comments from a text file. The comment starts with double slash sequence (`//`) and finishes with newline. If the comment takes whole line, then whole line is filtered.
- **recodex-judge-filter** can be used for preprocess output files before real judging. This judge filters C-like comments from a text file. The comment starts with double slash sequence (`//`) and finishes with newline. If the comment takes whole line, then whole line is filtered.
- if `outputFile` is ommited, std. output is used instead.
- if `outputFile` is ommited, std. output is used instead.
- if both files are ommited, application uses std. input and output.
- if both files are ommited, application uses std. input and output.
**recodex-judge-shuffle** is for judging shuffled files. This judge compares two text files and returns 0 if they matches (and 1 otherwise). Two files are compared with no regards for whitespace (whitespace acts just like token delimiter).
- **recodex-judge-shuffle** is for judging shuffled files. This judge compares two text files and returns 0 if they matches (and 1 otherwise). Two files are compared with no regards for whitespace (whitespace acts just like token delimiter).
- `-n` ignore newlines (newline is considered only a whitespace)
- `-n` ignore newlines (newline is considered only a whitespace)
- `-i` ignore items order on the row (tokens on each row may be permutated)
- `-i` ignore items order on the row (tokens on each row may be permutated)
- `-r` ignore order of rows (rows may be permutated); this option has no effect when `-n` is used
- `-r` ignore order of rows (rows may be permutated); this option has no effect when `-n` is used
### Job configuration
### Job configuration
Configuration of the job which is passed to worker is generated on demand by web API. Each job has unique one.
Configuration of the job which is passed to worker is generated on demand by web API. Each job has unique one.
#### Configuration items
#### Configuration items
Mandatory items are bold, optional italic.
Here is the list with description of allowed options. Mandatory items are bold, optional italic.
- **submission** - information about this particular submission
- **submission** - information about this particular submission
- **job-id** - textual ID which should be unique in whole recodex
- **job-id** - textual ID which should be unique in whole recodex
- **language** - no specific function, just for debugging and clarity
- **language** - no specific function, just for debugging and clarity
@ -369,16 +390,15 @@ Mandatory items are bold, optional italic.
- _disk-files_ - number of files which can be opened
- _disk-files_ - number of files which can be opened
- _environ-variable_ - wrapper for map of environmental variables, union with default worker configuration
- _environ-variable_ - wrapper for map of environmental variables, union with default worker configuration
- _chdir_ - this will be working directory of executed application
- _chdir_ - this will be working directory of executed application
- _bound-directories_ - list of structures reprezenting directories which will be visible inside sandbox, union with default worker configuration
- _bound-directories_ - list of structures reprezenting directories which will be visible inside sandbox, union with default worker configuration. Contains 3 suboptions: **src** - source pointing to actual system directory, **dst** - destination inside sandbox which can have its own filesystem binding and **mode** - determines connection mode of specified directory, one of values: RW, NOEXEC, FS, MAYBE, DEV
- **src** - source pointing to actual system directory
- **dst** - destination inside sandbox which can have its own filesystem binding
- **mode** - determines connection mode of specified directory, one of values: RW, NOEXEC, FS, MAYBE, DEV
#### Configuration example
#### Configuration example
This configuration example is written in YAML and serves only for demostration purposes. Therefore it is not working example which can be used in real traffic. Some items can be omitted and defaults will be used.
This configuration example is written in YAML and serves only for demostration purposes. Some items can be omitted and defaults from worker configuration will be used.
```{.yml}
```{.yml}
--- # only one document which contains job, aka. list of tasks and some general infos
---
submission: # happy hippoes fence
submission: # happy hippoes fence
job-id: hippoes
job-id: hippoes
language: c
language: c
@ -476,12 +496,15 @@ tasks:
...
...
```
```
### Job variables
### Job variables
Because frontend does not know which worker gets the job, its necessary to be a little general in configuration file. This means that some worker specific things has to be transparent. Good example of this is directories, which can be placed whenever worker wants. In case of this variables were established. There are of course some restrictions where variables can be used. Basically whenever filesystem paths can be used, variables can be used.
Usage of variables in configuration is then simple and kind of shell-like. Name of variable is put inside braces which are preceded with dollar sign. Real usage is than something like this: ${VAR}. There should be no quotes or apostrophies around variable name, just simple text in braces. Parsing is simple and whenever there is dollar sign with braces job execution unit automatically assumes that this is a variable, so there is no chance to have this kind of substring.
Because frontend does not know which worker gets the job, its necessary to be a little general in configuration file. This means that some worker specific things has to be transparent. Good example of this is that some (evaluation) directories may be placed differently across all workers. To provide a solution, variables were established. There are of course some restrictions where variables can be used. Basically whenever filesystem paths can be used, variables can be used.
Usage of variables in configuration is simple and kind of shell-like. Name of variable is put inside braces which are preceded with dollar sign. Real usage is than something like this: ${VAR}. There should be no quotes or apostrophies around variable name, just simple text in braces. Parsing is simple and whenever there is dollar sign with braces job execution unit automatically assumes that this is a variable, so there is no chance to have this kind of substring anywhere else.
List of usable variables in job configuration:
List of usable variables in job configuration:
- **WORKER_ID** - integral identification of worker, unique on server
- **WORKER_ID** - integral identification of worker, unique on server
- **JOB_ID** - identification of this job
- **JOB_ID** - identification of this job
- **SOURCE_DIR** - directory where source codes of job are stored
- **SOURCE_DIR** - directory where source codes of job are stored
@ -491,21 +514,26 @@ List of usable variables in job configuration:
- **JUDGES_DIR** - directory in which judges are stored (outside sandbox)
- **JUDGES_DIR** - directory in which judges are stored (outside sandbox)
### Directories and Files
### Directories and Files
For each job execution unique directory structure is created. Job is not restricted to specified directories (tasks can do whatever is allowed on system), but it is advised to use them inside job. DEFAULT variable represents worker's working directory specified in each one's configuration. No variable of this name is defined for use in job YAML configuration.
Inside this directory temporary files for job execution are created:
For each job execution unique directory structure is created. Job is not restricted to use only specified directories (tasks can do whatever is allowed on system), but it is advised to use them inside a job. DEFAULT variable represents worker's working directory specified in its configuration. No variable of this name is defined for use in job YAML configuration, it's used just for this example.
- **${DEFAULT}/downloads/${WORKER_ID}/${JOB_ID}** - where the downloaded archive is saved
- **${DEFAULT}/submission/${WORKER_ID}/${JOB_ID}** - decompressed submission is stored here
List of temporary files for job execution:
- **${DEFAULT}/eval/${WORKER_ID}/${JOB_ID}** - this directory is accessible in job configuration using variables and all execution should happen here
- **${DEFAULT}/temp/${WORKER_ID}/${JOB_ID}** - directory where all sort of temporary files can be stored
- **\${DEFAULT}/downloads/\${WORKER_ID}/\${JOB_ID}** -- where the downloaded archive is saved
- **${DEFAULT}/results/${WORKER_ID}/${JOB_ID}** - again accessible directory from job configuration which is used to store all files which will be upload on fileserver, usually there will be only yaml result file and optionally log, every other file has to be copied here explicitly from job
- **\${DEFAULT}/submission/\${WORKER_ID}/\${JOB_ID}** -- decompressed submission is stored here
- **\${DEFAULT}/eval/\${WORKER_ID}/\${JOB_ID}** -- this directory is accessible in job configuration using variables and all execution should happen here
- **\${DEFAULT}/temp/\${WORKER_ID}/\${JOB_ID}** -- directory where all sort of temporary files can be stored
- **\${DEFAULT}/results/\${WORKER_ID}/\${JOB_ID}** -- again accessible directory from job configuration which is used to store all files which will be upload on fileserver, usually there will be only yaml result file and optionally log, every other file has to be copied here explicitly from job
### Results
### Results
Results of tasks are sent back in YAML format compressed into archive. This archive can contain further files, such as job logging information and files which were explicitly copied into results directory.
Results file contains job identification and results of individual tasks.
Results of tasks are sent back in YAML format compressed into archive. This archive can contain further files, such as job logging information and files which were explicitly copied into results directory. Results file contains job identification and results of individual tasks.
#### Results items
#### Results items
Mandatory items are bold, optional italic.
List of items from results file. Mandatory items are bold, optional ones italic.
- **job-id** - identification of job to which this results belongs
- **job-id** - identification of job to which this results belongs
- _error_message_ - present only if whole execution failed and none of tasks were executed
- _error_message_ - present only if whole execution failed and none of tasks were executed
- **results** - list of tasks results
- **results** - list of tasks results
@ -524,22 +552,23 @@ Mandatory items are bold, optional italic.
- **message** - status message on failure
- **message** - status message on failure
#### Example result file
#### Example result file
```{.yml}
```{.yml}
--- # only one document which contains list of results
---
job-id: 5
job-id: 5
results:
results:
- task-id: compile1
- task-id: compile1
status: OK # OK, FAILED, SKIPPED
status: OK
sandbox_results:
sandbox_results:
exitcode: 0
exitcode: 0
time: 5 # in seconds
time: 5
wall-time: 5 # in seconds
wall-time: 5
memory: 50000 # in KB
memory: 50000
max-rss: 50000
max-rss: 50000
status: RE # two letter status code: OK, RE, SG, TO, XX
status: RE
exitsig: 1
exitsig: 1
killed: true
killed: true
message: "Time limit exceeded" # status message
message: "Time limit exceeded"
- task-id: eval1
- task-id: eval1
status: FAILED
status: FAILED
error_message: "Task failed, something very bad happend!"
error_message: "Task failed, something very bad happend!"
@ -550,16 +579,18 @@ results:
```
```
### Scoring
### Scoring
Every assignment consists of tasks. Only some tasks however are part of the evaluation. Those evaluated tasks are grouped into **tests**. Each task might be assigned a _test-id_ parameter, as described above. Every test must consist of at least two tasks: execution and evaluation by a judge. The former retrieves information about the execution such as elapsed time and memory consumed, the latter result with a score - float between 0 and 1.
Total resulting score of the assignment submission is then calculated according to a supplied score config (described below). Total score is also a float between 0 and 1. This number is then multiplied by the maximum of points awarded for the assignment by the teacher assigning the exercise - not the assignment author.
Every assignment consists of tasks. Only some tasks however are part of the evaluation. Those tasks are grouped into **tests**. Each task might be assigned a _test-id_ parameter, as described above. Every test must consist of at least two tasks: execution and evaluation by a judge. The former retrieves information about the execution such as elapsed time and memory consumed, the latter result with a score - float between 0 and 1. There may be more than one execution tasks, but evaluation task must be exactly one.
Total resulting score of the assignment submission is then calculated according to a supplied score config (described below). Total score is also a float between 0 and 1. This number is then multiplied by the maximum of points awarded for the assignment by the teacher assigning the exercise - not the exercise author.
#### Simple score calculation
#### Simple score calculation
At the first stage of development, simple score calculation is used. This will most probably be replaced by more advanced score calculation algorithm in near future.
Simple score calculation just looks at the score of each test. In the score config, author of the assignment must specify weights of each test. Resulting score is calculated as a sum of products of score and weight of each test divided by the sum of all weights. The algorithm in Python would look something like this:
First implemented calculator is simple score calculator with test weights. This calculator just looks at the score of each test and put them together according to the test weights specified in assignment configuration. Resulting score is calculated as a sum of products of score and weight of each test divided by the sum of all weights. The algorithm in Python would look something like this:
```
```
sum = weightSum = 0
sum = 0
weightSum = 0
for t in tests:
for t in tests:
sum += t.score * t.weight
sum += t.score * t.weight
weightSum += t.weight
weightSum += t.weight
@ -567,17 +598,21 @@ score = sum / weightSum
```
```
Sample score config in YAML format:
Sample score config in YAML format:
```
```{.yml}
testWeights:
testWeights:
a: 300 # test with id 'a' has a weight of 300
a: 300 # test with id 'a' has a weight of 300
b: 200
b: 200
c: 100
c: 100
d: 100
d: 100
```
```
#### Logs
#### Logs
During execution tasks can use only one shared log. There is no use for multiple logs which will be used in all tasks, because of pretty small amount of information which is loged. Log is in default disabled and can be enabled in job configuration, then all logged actions in tasks will be visible here.
After execution is log packed and sent back to fileserver where can be further processed.
During the execution tasks can use one shared log. There is no use for multiple logs, one per task for example, because of pretty small amount of information loged. By default loging is disabled, enabling can be done in job configuration.
After execution the log is packed with results into archive and sent back to fileserver. So the log can be found here for further processing.
### Case study
### Case study
@ -591,8 +626,7 @@ For example introductory programming courses such as Programming I or Java
programming.
programming.
In the simplest case we only need one stage that builds the program and passes
In the simplest case we only need one stage that builds the program and passes
the test inputs to its standard input. We will use the C language for this
the test inputs to its standard input. Outputs are compared with the default judge.
example. The build command is `gcc source.c`, the test command is `./a.out`.
#### Compiler principles
#### Compiler principles
@ -600,11 +634,11 @@ This course uses multiple tools in a pipeline-like fashion - for example `flex`
and `bison`.
and `bison`.
We create a stage for each of the steps of this pipeline - we run flex and test
We create a stage for each of the steps of this pipeline - we run flex and test
the output, then we run bison and do the same.
the output, then we run bison on top of previous stage results and do the same. This is more advanced configuration and ReCodEx is specifically designed to support such evaluation pipeline.
#### XML technologies
#### XML technologies
In this course, students choose a topic they model using XML - for example a
In this course, students choose a topic they model using XML -- for example a
library or a bulletin board. During the semester, they expand this project by
library or a bulletin board. During the semester, they expand this project by
adding XSLT transformations, XQuery scripts, XPath queries, etc. These are
adding XSLT transformations, XQuery scripts, XPath queries, etc. These are
tested against fixed requirements (e.g. using some particular language
tested against fixed requirements (e.g. using some particular language
@ -615,7 +649,7 @@ assignments, so we only include it for demonstration purposes.
Because every assignment focuses on a different technology, we would need a new
Because every assignment focuses on a different technology, we would need a new
type of stage for each one. These stages would only run some checker programs
type of stage for each one. These stages would only run some checker programs
against the submitted sources (and possibly try to check their syntax etc.).
against the submitted sources (and possibly try to check their syntax etc.). ReCodEx is not primarily determined to perform static analysis, but surely it's also possible.
#### Non-procedural programming
#### Non-procedural programming
@ -626,13 +660,13 @@ according to a specification (e.g. appends an item at the end of a list).
Due to this, we need to take the function submitted by a student and combine it
Due to this, we need to take the function submitted by a student and combine it
with a snippet of code that reads the standard input and calls the submitted
with a snippet of code that reads the standard input and calls the submitted
function. This could be achieved by setting the build command.
function. This could be nicely achieved by setting the build command.
#### Operating systems
#### Operating systems
The operating systems course requires students to work on a simple OS kernel
The operating systems course requires students to work on a simple OS kernel
that is then run in a MIPS simulator called `msim`. There are various tests that
that is then run in a MIPS simulator called `msim`. There are various tests that
check if the student's implementation of core OS mechanisms is correct. These
checks if the student's implementation of core OS mechanisms is correct. These
tests are compiled into the kernel.
tests are compiled into the kernel.
Each of these tests could be represented by a stage that compiles the kernel
Each of these tests could be represented by a stage that compiles the kernel