Reproduce “DiffSpec: Differential Testing with LLMs using Natural Language Specifications and Code Artifacts” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Nikitha Rao, Elizabeth Gilbert, Harrison Green, Tahina Ramananandro, Nikhil Swamy, Claire Le Goues, Sarah Fakhoury

The DiffSpec framework integrates large language models with natural language specifications and various code artifacts to enhance differential testing, successfully identifying multiple confirmed, previously unknown bugs in eBPF runtimes and WebAssembly validators.

Key insights

  • Rich, structured context derived from historical bugs and implementation code differences is essential for LLMs to generate effective differentiating tests.
  • A two-phase test generation approach, starting with natural language descriptions, generally yields more syntactically and semantically valid code.
  • Integrating human-written guidelines into the test generation process significantly improves the overall validity of LLM-produced tests.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.