I recently hosted an episode of Software Engineering Radio called “Danilo Krummrich on Rust in the Linux Kernel”!

  • Home
  • Teaching
    • Overview
    • Algorithm Analysis
    • Computer Security
  • Research
    • Overview
    • Papers
    • Presentations
  • Outreach
    • Software
    • Service
    • Blog
  • About
    • Biography
    • Schedule
    • Contact
    • Blog
    • Service
    • Papers
    • Presentations
    • Light
    • Dark
    • System

Contents

  • Introduction
  • Key Contributions
  • Empirical Results
  • Future Work

Introducing multiplex, a workbench for building and comparing LLM-driven mutant generators

post
research paper
mutation testing
Multiplex is a mutant testing framework with interchangeable mutant generators, using any LLM!
Author

Gregory M. Kapfhammer

Published

2026

Introduction

Comparing two techniques for generating mutants with a large language model (LLM) should be easy. At their core, an LLM-driven approach for creating mutants is a program that sends prompts to a model. However, in practice, each technique ships inside its own prototype, which fixes the programming language, the build tool, and the model provider. This means that a researcher who wants a fair comparison often has to re-implement the technique in a shared environment. Of course, these steps take time and raise questions about whether the new implementation still captures the original idea. In (Maton et al. 2026) , presented at the tools and datasets track of the International Conference on Automated Software Engineering, my colleagues and I describe multiplex, a modular framework that separates the parts of an LLM mutation experiment so that techniques can be swapped, configured, and compared. Read the rest of this post to see how the framework is organized and what experiments we ran with it!

Key Contributions

  • Interchangeable Modules: The multiplex tool divides an LLM mutation experiment into separate modules for method extraction, mutant generation, model access, and mutant execution and evaluation, along with language definitions. A researcher can replace one module without disturbing the others, which is what makes a controlled comparison possible.

  • Configuration as the Experiment: A single YAML file records the project under test, the mutant generation approach, the model and endpoint, and the system prompts, and cloud models read the API token from a named environment variable so that configurations can be shared safely. uv run multiplex turns such a file into a reproducible run, and the file itself documents the experiment.

  • Techniques as Reusable Modules: We provide modules for hazard-guided generation (i.e., m-hazop and m-stpa), for the earlier LLMorpheus and Mutahunter strategies (i.e., m-llmorpheus and m-mutahunter), and for an unguided baseline (i.e., m-unguided). Comparisons therefore happen inside one version of one tool rather than across separate prototypes.

  • Multi-Language Execution and Transparent Outputs: Method extraction uses TreeSitter for Java and Python, and the execution module can drive Maven, Defects4J, or Pytest. Every stage is archived in the output directory, including the original method, each generated mutant, intermediate artifacts such as control flow diagrams and unsafe control actions, and the test outcomes that decided whether a mutant survived, and a summary CSV records which tests killed it. A flag also emits a Marv-compatible file for interactive mutant review.

Empirical Results

The paper demonstrates the framework with experiments in two languages:

  • The same method, five different mutants: For the println method in Defects4J’s Csv version 5, each technique produces a distinct mutant. m-stpa drops the null check, m-hazop applies the More guide word and repeats an append inside a loop, m-unguided replaces the whole method body, m-llmorpheus changes the variable used in the condition, and m-mutahunter appends a corrupted string. This contrast shows why a shared harness matters.

  • A Java study at scale: The framework ran a comparison of five LLM techniques and the rule-based tool Major over 279 Defects4J bugs. The hazard-guided approaches generated large, unique method-level mutants that complemented the other techniques. The full analysis appears in a companion paper and in my post on that paper’s empirical study.

  • A first Python study: Applying m-hazop, m-stpa, and m-unguided to 10 functions from the PySnooper project with the local gpt-oss:20B model produced 434 mutants. Across the 215 competent mutants, which are those that did not cause errors, the mutation scores were 0.72, 0.53, and 0.80, respectively, showing that the same framework supports a study in a second programming language.

Future Work

The paper introduces multiplex as a workbench that should keep growing. A core goal is a plugin and template system so that researchers can add modules without forking the repository, together with configuration options that let them create their own modules independently. The authors also plan an open-source record of mutant generation modules that researchers can draw on and contribute to. Finally, because working at the method or function level may not suit every programming paradigm, the framework should let users configure the code structures that a study mutates.

NoteFurther Details

Mutation testing is a long-standing theme of my research, and this framework is the infrastructure behind my recent work on hazard-guided mutants. If you want to prototype or compare an LLM-based mutant generation technique, the multiplex repository and the video demonstration are a good place to start, and the study’s replication package shows a complete configuration. For the design details, please read (Maton et al. 2026) . If you have questions about the framework or want to share a technique you would like to plug into it, please contact me. To stay up to date on this research, subscribe to my blog’s RSS feed.

Return to Blog Post Listing

References

Maton, Megan, Gregory M. Kapfhammer, and Phil McMinn. 2026. “Multiplex: A Modular LLM-Based Mutation Framework.”Proceedings of the 41st International Conference on Automated Software Engineering – Tools and Datasets Track.

GMK

Top

  • GitHub

  • Mastodon

  • LinkedIn

  • Google Scholar