Refactor eval code in preparation for new task types.
Review Request #205 - Created April 10, 2012 and updated
Information | |
---|---|
Bogdan-Cristian Tătăroiu | |
infoarena | |
Reviewers | |
hackers | |
Previously, our eval code consisted of a 300 line method in classic_grader.php, which was painful. :( I've split the functionality into separate methods inside a BaseGrader and ClassicGrader class. BaseGrader provides functionality which is common for all task types such as setting up a jail, compiling evaluators, handling test groups, judging outputs (via diff or custom evaluator), etc. Every different type of task will require a new class which extends the BaseGrader and implements the method testCaseJudge which will contain the task type's specific behaviour. Other methods in BaseGrader can be subclassed as well: for example, for output only tasks one would replace the 'compile user source code' method with a 'extract user outputs' method.
-
trunk/eval/BaseGrader.php (Diff revision 2) -
Why is there no verification if this works?
-
trunk/eval/BaseGrader.php (Diff revision 2) -
Use defined constant instead of 100?
Review request changed
-
trunk/eval/BaseGrader.php (Diff revision 3) -
Where is it declared? A good location might be www/config.php