paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Call Me Maybe: Using NLP to Automatically Generate Unit Test Cases Respecting Temporal Constraints

Call Me Maybe:利用 NLP 自动生成遵守时序约束的单元测试用例
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 4/10 · 该论文属于PL+ML的测试生成工作,关注时序约束并利用NLP减少无效运行时异常,与用户所列的静态分析、LLM/Agent改进程序分析、浮点/贝叶斯程序分析等核心问题只有较弱的交叉。NLP也不一定是当前强LLM/Agent方法,因此匹配度有限。引用 23 inbox
Arianna Blasi, Alessandra Gorla, Michael D. Ernst, Mauro Pezzè
crossref: 2026-09-12

AI 速览

一句话:提出用 NLP 自动生成遵守类时序约束的单元测试,减少协议违反导致的运行时异常。

许多类在正确使用时需要遵守时序约束,例如迭代器必须先检查是否还有下一元素再请求,否则会抛出 NoSuchElementException。Randoop、EvoSuite 等自动测试生成工具没有时序约束的概念,因此可能随机调用方法并触发仅由协议违反导致的运行时异常,而非真正的软件缺陷。本文提出使用自然语言处理(NLP)自动生成遵守时序约束的单元测试用例,使生成的调用序列符合类的正确使用协议,从而减少这类无意义的异常。摘要未报告具体实验数据;其核心贡献是将时序约束引入单元测试生成流程。

问题
类常需遵守使用时序约束,而 Randoop、EvoSuite 等测试生成工具忽略这些约束,随机调用方法会抛出并非由软件缺陷引起的运行时异常。
方法
论文提出利用自然语言处理自动生成尊重时序约束的单元测试用例,使测试遵循类的正确使用协议。
评估
摘要未说明具体评估方式与结果。
原文摘要(Abstract)

A class may need to obey temporal constraints in order to function correctly. For example, the correct usage protocol for an iterator is to always check whether there is a next element before asking for it; iterating over a collection when there are no items left leads to a NoSuchElementException. Automatic test case generation tools such as Randoop and EvoSuite do not have any notion of these temporal constraints. Generating test cases by randomly invoking methods on a new instance of the class under test may raise run time exceptions that do not necessarily expose software faults, but are rather a consequence of violations of temporal properties.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7365,
  title = {Call Me Maybe: Using NLP to Automatically Generate Unit Test Cases Respecting Temporal Constraints},
  author = {Arianna Blasi and Alessandra Gorla and Michael D. Ernst and Mauro Pezzè},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3556961}
}