Mokav: Execution-driven Differential Testing with LLMs
Khashayar Etemadi, Bardia Mohammadi, Zhendong Su, Martin Monperrus

TL;DR
Mokav is an execution-driven tool leveraging large language models to generate difference exposing tests between program versions, significantly improving detection success rates in software testing tasks.
Contribution
The paper introduces Mokav, a novel LLM-based, execution-driven approach for generating tests that reveal functional differences between program versions, outperforming existing methods.
Findings
Mokav detects differences in 81.7% of program pairs.
It outperforms Pynguin and Differential Prompting significantly.
Iterative, execution-driven feedback enhances detection effectiveness.
Abstract
It is essential to detect functional differences between programs in various software engineering tasks, such as automated program repair, mutation testing, and code refactoring. The problem of detecting functional differences between two programs can be reduced to searching for a difference exposing test (DET): a test input that results in different outputs on the subject programs. In this paper, we propose Mokav, a novel execution-driven tool that leverages LLMs to generate DETs. Mokav takes two versions of a program (P and Q) and an example test input. When successful, Mokav generates a valid DET, a test input that leads to provably different outputs on P and Q. Mokav iteratively prompts an LLM with a specialized prompt to generate new test inputs. At each iteration, Mokav provides execution-based feedback from previously generated tests until the LLM produces a DET. We evaluate…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Real-time simulation and control systems · Formal Methods in Verification
