Mokav: Execution-driven Differential Testing with LLMs
Not on the map. Why?
Abstract (arXiv)
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 Mokav on 1535 pairs of Python programs collected from the Codeforces competition platform and 32 pairs of programs from the QuixBugs dataset. Our experiments show that Mokav outperforms the state-of-the-art, Pynguin and Differential Prompting, by a large margin. Mokav can generate DETs for 81.7% (1,255/1535) of the program pairs in our benchmark (versus 4.9% for Pynguin and 37.3% for Differential Prompting). We demonstrate that the iterative and execution-driven feedback components of the system contribute to its high effectiveness.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Jun 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 3.
6 papers.
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesiscited by 15
- 2025Evaluating LLM-Based Regression Test Generationcited by 6
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verificationcited by 0
- 2026Agentic Method for Deterministic Validation of Legacy Code Migrationcited by 0
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agentscited by 0
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agents28 Sep 2026
- 2026Agentic Method for Deterministic Validation of Legacy Code Migration30 Jul 2026
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verification11 Jul 2026
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesis29 Mar 2025
- 2025Evaluating LLM-Based Regression Test Generation19 Jan 2025
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024