Runtime Class Recompilation for Parallel Mutation Testing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current mutation testing tools for JVM-based programming languages like Gosu require full re-compilation of all object code for each individual mutation, leading to inefficiencies and prolonged testing times, especially in environments with large numbers of unit tests.

Innovation Solution

Implement a compiler that performs iterative, per-class compilation and dynamic recompilation during runtime, allowing individual mutations to be tested without recompiling the entire object code, using a Dynamic Code Evolution Virtual Machine (DCEVM) to support class recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If full re-compilation of all object code is performed for each individual mutation, then testing completeness is improved, but testing time and computing resource consumption increase significantly

Engineering Contradiction:
Improvetesting completenessVSAvoidmutation testing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides the monolithic compilation process into granular per-class compilation units. Instead of recompiling all object code for each mutation, the system identifies and recompiles only the specific class files that contain mutations, allowing parallel compilation of multiple classes simultaneously. This segmentation reduces the compilation scope from the entire codebase to individual mutation-affected classes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic recompilation during runtime using a custom virtual machine (DCEVM) that supports loading and executing recompiled class files without restarting the entire application. The system dynamically identifies which classes need recompilation based on mutation locations, recompiles them on-the-fly, and loads the updated classes into the running JVM, enabling continuous testing without static compilation constraints.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If full re-compilation of all object code is performed for each individual mutation, then mutation detection accuracy is improved, but computing resource consumption increases

Engineering Contradiction:
Improvemutation detection accuracyVSAvoidcomputing resource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The compilation workload is segmented into independent per-class units that can be processed in parallel. The system analyzes the mutation impact scope to identify only the minimal set of classes requiring recompilation, rather than recompiling the entire object codebase. This selective segmentation maintains mutation detection accuracy while reducing CPU and memory consumption.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs partial recompilation by compiling only the specific classes containing mutations and their immediate dependencies, rather than performing excessive full-codebase recompilation. The system calculates the minimal recompilation scope by tracing mutation impacts through class relationships, recompiling only what is necessary to detect the mutation, thus conserving computing resources while preserving detection accuracy.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If thousands of unit tests are run against each mutation with full re-compilation, then test quality assessment is improved, but productivity decreases

Engineering Contradiction:
Improvetest quality assessmentVSAvoidtesting throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the testing process into independent parallel workflows where multiple classes with mutations can be compiled and tested simultaneously. Each mutation is associated with specific class files that are independently compiled and tested, allowing the test suite to process multiple mutations in parallel rather than sequentially, thereby maintaining thorough quality assessment while increasing overall testing throughput.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary analysis to identify and isolate mutation-affected classes before compilation begins. By pre-calculating the minimal set of classes requiring recompilation based on mutation locations and class dependencies, the system avoids unnecessary compilation overhead and prepares the exact compilation scope in advance, enabling efficient parallel processing of test suites against multiple mutations.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20260003771A1Runtime class recompilation during mutation testing
Publication Date: 2026.01.01 STATE FARM MUTAL AUTOMOBILE INSURANCE COMPANY
  • US20260003771A1 patent drawing
  • US20260003771A1 patent drawing
  • US20260003771A1 patent drawing

AI summary

In mutation testing, source code is mutated at various positions, and test suites are run against the original object code and each version of the mutated object code, to determine the quality of test suites against arbitrary changes in the object code. The present disclosure provides a mutation test manager configured to initialize multiple computing threads configuring a computing host to perform parallel computation; mutate class files within context of each computing thread; recompile mutated class files independently in each respective computing thread to generate heterogeneous mutants; and execute pending unit tests against heterogeneous mutants independently in each respective computing thread. Consequently, the mutation testing process is decoupled from computational bottlenecks which would result from linear, sequential generation, compilation, and testing of each mutation, especially in the context of JVM® programming languages configured to generate class-rich object code.