paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Evolutionary improvement of assertion oracles

断言预言的进化式改进
FSE Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2020匹配度 2/10 · 论文关注用协同进化算法自动改进断言预言以减少误报漏报,属于测试/程序合成/进化计算方向,与用户核心的 LLM/Agent 与静态分析/形式化验证交叉、浮点程序分析、贝叶斯程序分析均无直接关联。引用 50 inbox
Valerio Terragni, Gunel Jahangirova, Paolo Tonella, Mauro Pezzè
crossref: 2026-09-12

AI 速览

一句话:提出 GAssert,首个自动改进断言预言、降低误报漏报的协同进化技术。

断言预言是程序中的可执行布尔表达式,应在正确执行时返回真、错误执行时返回假。但设计完美的断言预言十分困难,断言常无法区分正确与错误执行,从而产生误报和漏报。本文提出 GAssert,这是首个自动改进断言预言的技术。给定一个断言预言及其误报、漏报证据,GAssert 采用新颖的协同进化算法探索可能的断言空间,以找到误报和漏报更少的断言。作者在来自 7 个 Java 代码库的 34 个 Java 方法上开展实证评估,结果表明 GAssert 能有效改进断言预言,优于随机改进和基于不变式的预言改进两个基线,并与人工改进断言相当,某些情况下甚至更好。

问题
断言预言因设计困难而常存在误报和漏报,难以准确区分正确与错误执行。
方法
GAssert 基于给定断言及其误报/漏报证据,用协同进化算法搜索断言空间,寻找误报与漏报更少的改进断言。
评估
在 7 个 Java 代码库的 34 个 Java 方法上评估,与随机、不变式基线及人工改进断言对比。
原文摘要(Abstract)

Assertion oracles are executable boolean expressions placed inside the program that should pass (return true) for all correct executions and fail (return false) for all incorrect executions. Because designing perfect assertion oracles is difficult, assertions often fail to distinguish between correct and incorrect executions. In other words, they are prone to false positives and false negatives. In this paper, we propose GAssert (Genetic ASSERTion improvement), the first technique to automatically improve assertion oracles. Given an assertion oracle and evidence of false positives and false negatives, GAssert implements a novel co-evolutionary algorithm that explores the space of possible assertions to identify one with fewer false positives and false negatives. Our empirical evaluation on 34 Java methods from 7 different Java code bases shows that GAssert effectively improves assertion oracles. GAssert outperforms two baselines (random and invariant-based oracle improvement), and is comparable with and in some cases even outperformed human-improved assertions.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5794,
  title = {Evolutionary improvement of assertion oracles},
  author = {Valerio Terragni and Gunel Jahangirova and Paolo Tonella and Mauro Pezzè},
  booktitle = {FSE},
  year = {2020},
  doi = {10.1145/3368089.3409758}
}