VeraCodeChecker
Back to Documentation
Technical Deep Dive

Evaluator Internals

A comprehensive technical overview of how VeraCodeChecker executes, tests, and evaluates student code submissions.

Execution Engine (High Level)

VeraCodeChecker's execution engine is built on a sandboxed, cloud-based runtime that safely compiles and executes student code without compromising system security or stability.

Runtime Environment

Piston API Integration

All code execution is handled by the Piston API, a battle-tested, sandboxed code execution engine that supports multiple programming languages.

  • Isolation: Each submission runs in a completely isolated environment
  • Language Support: Native support for Python, Java, and C compilers/interpreters
  • Stateless: No persistent state between executions—every run is fresh

I/O Harness

For I/O-based testing, the evaluator follows a simple but robust pipeline:

1. Input Injection

Test input is fed via stdin

2. Execution

Student code runs and produces output

3. Comparison

stdout compared to expected output

Default Behavior: Output comparison is exact by default (whitespace and case-sensitive). Future updates will add leniency options.

Resource Limits

To prevent abuse and ensure fair resource allocation, the following limits are enforced:

ResourceLimitNotes
Execution Time15 secondsPer test case
Memory256 MBRAM allocation
CPUSharedManaged by Piston
NetworkDisabledNo external connections

* Limits are subject to change as we optimize performance. Check back for updates.

Java Assertion Testing (How It Works)

Why is this complex? Off-the-shelf code runners execute main methods or public classes—they don't natively run teacher-authored assertion tests in a custom harness across multi-file student submissions.

The Challenge

Unlike simple I/O testing, assertion-based testing requires:

  • Merging student code with teacher test cases
  • Ensuring single-file compilation (no package conflicts)
  • Extracting and substituting method bodies safely
  • Running JUnit/assertion tests in a sandboxed environment

Our Approach: Hybrid Parsing + Templating

VeraCodeChecker uses a sophisticated multi-step pipeline combining regex patterns, AI-assisted parsing, and code templating:

1

Run Teacher Answer Key

Execute the teacher's solution to record baseline behavior (expected outputs, method signatures, etc.)

2

Skeletonize Answer Key

Detect class/method boundaries and create a template with empty method bodiesfor methods under test:

java
public class Calculator {
    // Method to be tested
    public int add(int a, int b) {
        // PLACEHOLDER - will be replaced with student code
    }
    
    // Other methods remain intact...
}
3

Method-Level Substitution

Extract method bodies from student submission and safely merge them into the skeleton. This preserves the teacher's test structure while evaluating student logic.

4

Generate Test Harness

AI + regex patterns generate a JUnit-compatible test runner that:

  • Imports necessary testing libraries
  • Instantiates the merged class
  • Runs assertions from teacher's test cases
  • Reports pass/fail results
5

Compile & Execute

Send the merged code + test harness to Piston API for compilation and execution. Results are parsed and returned to the student.

Parsing Techniques

Regex + AI Hybrid Approach

We combine traditional regex patterns with AI-powered code analysis:

  • ✓ Find main method
  • ✓ Ensure a single public class
  • ✓ Sanitize structure (remove packages, resolve imports)
  • ✓ Identify target methods and extract bodies safely
  • ✓ Concatenate multiple files deterministically (alphabetical order)

Constraints & Rules

⚠️ Critical Requirements for Assertion Testing

  • Main method required in the answer key
  • One public class after merge (enforced automatically)
  • No package statements or import conflicts that break single-file compilation
  • Method signatures must match exactly between teacher and student code
  • Multi-file concatenation supported (order: alphabetical by filename)

Beta Stability Note: This workflow is actively being tested and refined. Some edge cases (complex inheritance, inner classes, reflection) may not be fully supported yet.

Known Limitations (Beta)

VeraCodeChecker is in active development. The following limitations are known and will be addressed in future releases:

No Scheduled Publishing

Activities can only be published immediately or saved as drafts. Date/time-based scheduling is not yet available.

Assertion Testing: Java Only

Assertion-based testing currently supports Java exclusively. Python and C support is planned for future releases.

Exact Output Matching

I/O tests use exact string comparison (whitespace and case-sensitive). Leniency options (ignore whitespace/case) are coming soon.

Limited Post-Publish Edits

Some refactors to test types after publishing may require re-validation or be restricted to preserve grading integrity.

We're actively working on addressing these limitations. Follow our roadmap for updates on upcoming features and improvements.

Roadmap

We're committed to continuously improving VeraCodeChecker. Here's what's on the horizon:

Scheduled Publishing

Set specific dates and times for activities to become visible to students.

Q2 2025

Python & C Assertion Testing

Extend assertion-based testing to Python (unittest/pytest) and C (custom harness).

Q3 2025

Plagiarism Detection

AI-powered similarity analysis to detect copied code across submissions.

In Research

Test Leniency Options

Configure output comparison to ignore whitespace, case, trailing newlines, etc.

Q2 2025

LMS Exports & Integrations

Direct integration with Canvas, Moodle, Blackboard, and grade export to CSV/Excel.

Planned

Have a feature request or suggestion?

Share Your Ideas