Skip to main content

What is Ares 2

Simple Story

Picture a school on the day of an examination.

The head teacher has written everything beforehand: the questions, the grading instructions, and a rule sheet that says what the pupils are allowed to do. Then they stay in their office.

In the room, the teacher hands out one question at a time and marks each answer by the grading instructions. They follow the rule sheet as well. Before the start, they clear every desk of anything that could lead somewhere forbidden. During the examination, they watch for pupils reaching for something the rule sheet does not allow, and stop those they see.

The pupils still answer, and the teacher still marks their answers. The rest of this guide says what the teacher catches, and what they miss.

Who is who

Ares 2 is a framework for the easy and secure remote execution of student submissions on an interactive learning platform. It is the second Java-based implementation of the Secure COder Remote Execution (SCORE) framework, and the first to support Java 25 and later.

Its main features are:

  1. Allowable resource access: your policy file names what a submission can use, such as a file path, a host and port, a command with fixed arguments, or the packages it can import. Ares 2 checks the submission against what you named, within the limits set out in What does Ares 2 not protect against.
  2. Not-allowable resource access: beyond a small built-in allowance, Ares 2 refuses whatever your policy does not name. Some categories, such as reflection, native code or System.exit, have no policy field at all, and Ares 2 rejects a submission whose compiled code contains a route to them. This prevents unsafe operations, reduces cheating, and protects academic integrity, fairness and the learning goal the exercise was set for.
  3. Runtime limitation: @StrictTimeout stops a test that runs too long, and your policy caps how many threads a submission can start, which makes tests and builds more robust.
  4. I/O limitation: utilities for comfortably testing exercises that use System.out and System.in. A test provides the console input up front, and reading past it fails with a clear message. Writing beyond a set amount of output throws a SecurityException, which fails the test unless the submission catches it, and @MirrorOutput(maxCharCount = ...) changes that amount.
  5. Test case result visibility limitation: public tests run and report straight away. Hidden tests do not run before the deadline you set with @Deadline and count as failed until then. The exception is @ActivateHiddenBefore: before the date it names, hidden tests run, so you can try them before you release the exercise. Once they run, a failing hidden test tells the student only that it failed.
  6. Better feedback for students: Ares 2 writes its messages in English or German, following the language the tests run in.
Read the basics before using Ares 2 in production

Ares 2 provides a high level of security, and that comes with a small downgrade in simplicity. Several steps are needed to make tests work properly, and it takes some time to understand what Ares 2 does. Please read at least Setup, Test Annotations and Security Overview before using Ares 2 for a real exercise.

Where to go next​

The rows follow the order of the sidebar, so reading straight down is the same as working through the guide from top to bottom.

If you want toRead
Know what a submission is stopped from doingWhat does Ares 2 protect against
Know where the boundary ends, and what your build still has to doWhat does Ares 2 not protect against
Add Ares 2 to an exercise, for Maven and for GradleHow to protect a Java project with Ares 2
Migrate an Ares 1 exerciseHow to transform an Ares 1 protected project into an Ares 2 protected project
Write a policy for one concrete situationPolicy Cookbook
Look up a single policy fieldPolicy Reference
Check through the abstract syntax tree (AST) how a student wrote a solution, for example without a loopAST Test
Work out what an error message is telling youTroubleshooting
Look up who is who in the Simple Story boxesWho is who

Licence​

Ares 2 is licensed under the MIT Licence. See LICENSE for details.