Skip to content
Book Open access

Accurate Specification Recovery for Effective Test Generation

Oct 2026 · Companion Proceedings of the 2026 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity · pp. 12-14 · 0 citations · 12 references

TL;DR

This dissertation aims to make specification recovery from imperfect code accurate, evidence-driven, and uncertainty-aware, so that it consistently yields effective bug-finding tests.

Abstract

Large language model (LLM)-based unit-test generation has largely been studied under the assumption that the code under test is correct, using coverage or test-correctness metrics that do not directly measure defect detection. When the code under test is buggy, however, models can be guided toward assertions that encode the faulty behavior, producing tests that confirm rather than reveal defects. Our recent work quantified this misguidance effect and showed that a specification-based approach, which first recovers a behavioral specification of the focal method from its buggy implementation and then generates tests from that specification, can substantially mitigate it. Although this establishes a specification-recovery-first paradigm for LLM-based unit-test generation, the recovery step itself remains simple and its specifications are themselves fallible. This dissertation therefore aims to make specification recovery from imperfect code accurate, evidence-driven, and uncertainty-aware, so that it consistently yields effective bug-finding tests.

Read PDF

Similar papers

#artificial intelligence Preprint Mar 2026

Spec-Harness: Measuring and Improving Behavioral Adequacy of LLM-Synthesized Formal Specifications

Comparisons of classical and prompt-based JML synthesis approaches are compared, and it is found that prompt optimization through verification feedback raises pass rates but reaches a clear ceiling, and Spec-Harness is introduced, a framework that measures the behavioral adequacy of a specification along four dimension...

M. Rakib, Hossain Misu, IrisMa et al. · 3 citations
#software testing Preprint Oct 2026

On the Risks of using LLM-Generated Tests for Regression Testing

The results reveal a fundamental risk of LLM-generated regression tests: without manual validation, they may encode faulty behavior as expected behavior, allowing bugs to persist across software revisions and largely evade developer-maintained test suites.

Mohammadali Charoosaei, Cedric Richter, Mike Papadakis · 0 citations
#artificial intelligence Preprint Oct 2026

Characterizing Overconfident Failure in LLM-Based Code Generation

Large language models (LLMs) are increasingly used for automated code generation, but generated programs can appear syntactically plausible while still failing execution-based correctness checks. Existing validation methods, such as testing and program analysis, remain essential but are often incomplete, costly, or app...

Ravishka Rathnasuriya, Wei Yang · 0 citations
#small language model Preprint Sep 2026

Path2Spec: Path-Aware Specification Generation via Large Language Models

This work introduces Path2Spec, a divide-and-conquer framework that leverages LLMs to extract all execution paths from an input program, generates path-specific specifications for each, and merges them into a comprehensive overall specification.

Dan Huang, Zhensu Sun, Hui-Hui Huang et al. · 0 citations
#software testing Preprint Sep 2026

How effective are traditional test criteria at detecting bugs in large language models generated code?

An empirical study involving 5 Large Language Models and 4 benchmarks evaluates the effectiveness and efficiency of 3 widely used adequacy criteria: statement coverage, branch coverage, and mutation testing, finding that mutation testing only marginally outperforms traditional coverage criteria in both triggering and d...

Asma Hamidi, Michael Konstantinou, R. Degiovanni et al. · 0 citations
Open access Oct 2026

STARS: Static Analysis-Guided Assertion Synthesis using Large Language Models

Automated unit test generation promises to reduce the cost of software quality assurance, and hence, is attracting attention from both academia and industry. Yet, generating assertions that are executable, meaningful to developers, and able to catch faults remains an unsolved challenge. Existing approaches either rando...

Jia-Lun Cao, Hao-Yu Wang, Hao-Ran Yan et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.