paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An In-Depth Study of Runtime Verification Overheads during Software Testing

软件测试中运行时验证开销的深入研究
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 该论文属于运行时验证与测试开销的实证研究,关注插桩、监控成本和工程加速机会,与用户核心方向(静态分析/形式化验证与 LLM、Agentic 程序、浮点或贝叶斯程序分析)没有直接交集。仅在形式化验证的工程落地与开销分析层面有较弱关联。引用 10 inbox
Kevin Guan, Owolabi Legunsen
crossref: 2026-09-12

AI 速览

一句话:大规模实证研究测试中运行时验证的开销分布、组成与浪费来源,并揭示离线插桩与跨版本摊销两类加速机会。

运行时验证(RV)在程序执行时对照形式规约进行监控,能增强测试的找 bug 能力,但其运行时开销被视为广泛采用的障碍;此前缺乏对测试场景下 RV 开销的普遍程度、找 bug 价值与组成的深入研究。本文监控 1,544 个开源项目的开发者单元测试,使用 160 条 JDK API 正确使用规约,发现:(1) 40.9% 的项目开销低于 12.48 秒,其余最高达 5,002.9 倍(28.7 小时);(2) RV 生成的监控器 99.87% 是浪费的,只能发现另外 0.13% 也能发现的 bug;(3) 与传统认知相反,多数项目开销由插桩而非监控主导;(4) 36.74% 的监控时间花在测试代码或库上。实验还表明,离线插桩(可行时)能大幅降低开销,而跨多个程序版本摊销高插桩成本比近期演化感知 RV 技术最高快 4.53 倍。

问题
RV 在软件测试中虽能增强找 bug 能力,但其运行时开销被视为广泛采用的障碍,而此前尚无工作深入研究测试场景下 RV 开销的普遍程度、对找 bug 的实际价值及其构成。
方法
对 1,544 个开源项目中开发者编写的单元测试进行监控,对照 160 条 JDK API 正确使用规约,统计并分析 RV 开销的分布、监控器的浪费比例以及插桩与监控的开销构成;随后开展离线插桩与跨程序版本摊销两项实验。
评估
通过大规模实证测量给出四项发现(开销分布、99.87% 监控器浪费、插桩主导、监控时间去向),并以实验验证加速机会:离线插桩可大幅降低单版本项目开销,跨版本摊销插桩成本比演化感知 RV 技术最高快 4.53 倍。
原文摘要(Abstract)

Runtime verification (RV) monitors program executions against formal specifications (specs). Researchers showed that RV during software testing amplifies the bug-finding ability of tests, and found hundreds of new bugs by using RV to monitor passing tests in open-source projects. But, RV’s runtime overhead is widely seen as a hindrance to its broad adoption, especially during continuous integration. Yet, there is no in-depth study of the prevalence, usefulness for bug finding, and components of these overheads during testing, so that researchers can better understand how to speed up RV. We study RV overhead during testing, monitoring developer-written unit tests in 1,544 open-source projects against 160 specs of correct JDK API usage. We make four main findings. (1) RV overhead is below 12.48 seconds, which others considered acceptable, in 40.9% of projects, but up to 5,002.9x (or, 28.7 hours) in the other projects. (2) 99.87% of monitors that RV generates to dynamically check program traces are wasted; they can only find bugs that the other 0.13% find. (3) Contrary to conventional wisdom, RV overhead in most projects is dominated by instrumentation, not monitoring. (4) 36.74% of monitoring time is spent in test code or libraries. As evidence that our study provides a new basis that future work can exploit, we perform two more experiments. First, we show that offline instrumentation (when possible) greatly reduces RV runtime overhead for single versions of many projects. Second, we show that simply amortizing high instrumentation costs across multiple program versions can outperform, by up to 4.53x, a recent evolution-aware RV technique that uses complex program analysis.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8478,
  title = {An In-Depth Study of Runtime Verification Overheads during Software Testing},
  author = {Kevin Guan and Owolabi Legunsen},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680400}
}