paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models

CodaMosa:利用预训练大语言模型摆脱测试生成中的覆盖率平台期
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 4/10 · 该工作属于用 LLM 引导搜索式测试生成(SBST),与用户'AI→PL'方向上'LLM/Agent 改进程序分析'有方法学上的关联(覆盖率停滞时求助 LLM、面向 benchmark 的评估),但任务本身是测试生成而非静态分析或形式化验证,且仅基于 Codex 等较旧模型,不落在浮点/贝叶斯程序分析交叉点上。引用 263 inbox
Caroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha Sen
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 CodaMosa,在搜索式测试生成陷入覆盖率停滞时用 Codex 生成示例测试引导搜索,显著提升覆盖率。

搜索式软件测试(SBST)通过测试用例生成与变异为被测程序生成高覆盖率测试,但其效果依赖于能触发程序核心逻辑的测试用例;当搜索陷入覆盖率平台期时便难以继续探索。本文提出 CodaMosa,先运行 SBST 直至覆盖率改进停滞,再让预训练代码大模型 Codex 为覆盖不足的函数提供示例测试用例,从而将搜索重定向到更有用的搜索空间区域。作者在 486 个基准上评估,与纯 SBST 和纯 LLM 基线相比,CodaMosa 在显著更多基准上提升了覆盖率(分别为 173 和 279 个),而覆盖率下降的基准仅分别为 10 和 4 个。

问题
搜索式软件测试(SBST)常陷入覆盖率平台期,难以继续生成能触发程序核心逻辑的测试用例。
方法
将 SBST 与预训练代码大模型结合:SBST 覆盖率停滞时,用 Codex 为覆盖不足的函数生成示例测试用例,并将其作为种子引导后续搜索。
评估
在 486 个基准上对比 SBST 与纯 LLM 基线,统计显著提升覆盖率的基准数远多于覆盖率下降的基准数。
原文摘要(Abstract)

Search-based software testing (SBST) generates high-coverage test cases for programs under test with a combination of test case generation and mutation. SBST's performance relies on there being a reasonable probability of generating test cases that exercise the core logic of the program under test. Given such test cases, SBST can then explore the space around them to exercise various parts of the program. This paper explores whether Large Language Models (LLMs) of code, such as OpenAI's Codex, can be used to help SBST's exploration. Our proposed algorithm, CodaMosa, conducts SBST until its coverage improvements stall, then asks Codex to provide example test cases for under-covered functions. These examples help SBST redirect its search to more useful areas of the search space. On an evaluation over 486 benchmarks, CodaMosa achieves statistically significantly higher coverage on many more benchmarks (173 and 279) than it reduces coverage on (10 and 4), compared to SBST and LLM-only baselines.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LemieuxILS23,
  title = {CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models},
  author = {Caroline Lemieux and Jeevana Priya Inala and Shuvendu K. Lahiri and Siddhartha Sen},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00085}
}