Garademi is auto grading system that use for judging user's source code.
Garedami are from 2 words.
- Gareda(ガレダ) is Grader
- mi(ミ) is stand for Miracle
- Compile and run in any programming language.
- Flexible Configurable Problem
- python 3.8
- yaml
- json
To use it you have to call function Judge in judge.py and require 4+2 arguments.
- idTask (as str) ... self-explanatory but we don't use them much.
- proLang (as str) is programming language that user what to compile
- problemDir (as str) is Directory of that problem.
- src (as str) is source code that user want to judge
- timeJudge (as int) (optional)
- memJudge (as int) (optional) is memory that use for during Judge (available for linux)
After call by judge.py, it will do 4 main Process
- Gathering problem info
- Checking src lang with Problem
- Compile src
- Run and Judge src
You can config anything you want in Config Folder
If it not found, it will create by itself for first time
Config folder will look like this
Config/
├── Langs/
| ├── C.yaml
| └── Cpp.yaml
| ...
├── Grader.yaml
├── ProblemDefault.yaml
└── Verdict.yaml
in each lang you can config 3 things
BIN_FILE: Path for Binary fileBIN_PATH: Path for Binary FolderTIME_FACTOR: Time factor for each language (eg. C = 1, Python = 5,Java = 1.5) Because each language have different performance
COMPILE_TIME: Compiler time (in ms)JUDGE_TIME: Judge time (in ms)MAX_DISPLAY: Max verdict to display. If it over, we will use short form.MAX_TEST_CASE: self explain
is config for each problem
timeLimit: is Time limit in each testcase (in ms)memLimit: is Memory limit in each testcase (in md)judging: is cmd for judging in each testcasecompiling: is cmd for compile in each languagerunning: is cmd for run in each language
use to convert verdict symbol to Full form.For example
P: Pass-: Wrong answerT: Time Limit Exceed
...
?: use for unknown verdict symbol
In this Garademi you can make a lot of thing in one problem. So I will show example Basic problem to FULL custom problem
It just use for compare between src output and solution in each test-case. Here is stucture for Basic Problem.
SomeProblem/
├── CompileSpace
| |-- Custom_Header...
| └── Src_Program
|
├── 1.in
├── 1.sol
├── 2.in
├── 2.sol
├── ...
├── 10.sol
└── Config.yaml (Not require but better than noting)
Every time when you use grader.User's src will go in CompileSpace\Src_Program and run it.
It will use input from ?.in and check output with ?.sol.In each ?.in and ?.sol we call it Testcase.You can have any Testcase Number that you want.(But not over than MAX_TEST_CASE in Config\Grader)
In Basic Problem you must output exactly as ?.sol.But some problem you there are more than one answer.You can use Custom Judge by config them in Config.yaml.You can look example from StandardJudge\StdJudge which just use in Basic Problem.
SomeProblem/
├── Shadow
| └── Original Header
├── CompileSpace (will copy from Shadow)
| |-- Custom_Header...
| └── Src_Program
|
├── 1.in
├── 1.sol
├── 2.in
├── 2.sol
├── ...
├── 10.sol
├── Custom_Judge
└── Config.yaml
It's not different from Basic Problem
But you can custom in Config.yaml and Custom_Judge