paperbot · PL 论文追踪

全部论文 待读 收藏

P2 State Field Coverage: A Metric for Oracle Quality

状态字段覆盖率:一种衡量测试预言(oracle)质量的度量
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 论文属于静态程序分析与软件测试领域,提出静态计算的状态字段覆盖率来评估测试预言质量,与用户关注的 PL 与 LLM/Agent 交叉、浮点程序分析、贝叶斯程序分析等核心方向无直接关联,仅在静态分析这一大标签上边缘相关。引用 2 inbox
Facundo Molina, Nazareno Aguirre, Alessandra Gorla
crossref: 2026-09-12

AI 速览

一句话:提出状态字段覆盖率,静态度量测试预言对对象状态字段的检查比例,用以评估预言质量。

论文关注测试中预言(oracle)质量的评估问题:测试发现缺陷的能力不仅取决于输入与覆盖程度,也取决于判定程序行为是否符合预期的预言质量。现有度量要么难以为预言改进提供全面依据,要么仅针对特定类型的预言而缺乏通用性。作者提出「状态字段覆盖率」这一新度量,其直觉是:预言在测试执行中访问的对象状态字段(由类的字段静态定义)比例越高,越有可能检测出故障。论文实现了一个静态计算该度量的机制,因而开销低,并能通过指出未被检查的状态字段直接指导预言改进。作者在 273 个表示不变式与 249,027 条测试断言上进行了实验评估,结果表明该度量与预言检测故障的能力(以变异得分衡量)强相关,适合用于评估预言质量。

问题
如何通用且有效地评估测试预言(oracle)的质量,以指导预言改进并提升测试发现缺陷的能力。
方法
提出状态字段覆盖率,即预言在测试执行中可能访问的、由类字段静态定义的对象状态比例,并实现静态计算该度量的机制。
评估
在 273 个表示不变式与 249,027 条测试断言上开展实验,结果显示该度量与以变异得分衡量的故障检测能力强相关。
原文摘要(Abstract)

The effectiveness of testing in uncovering software defects depends not only on the characteristics of the test inputs and how thoroughly they exercise the software, but also on the quality of the oracles used to determine whether the software behaves as expected. Therefore, assessing the quality of oracles is crucial to improve the overall effectiveness of the testing process. Existing metrics have been used for this purpose, but they either fail to provide a comprehensive basis for guiding oracle improvement, or they are tailored to specific types of oracles, thus limiting their generality.In this paper, we introduce state field coverage, a novel metric for assessing oracle quality. This metric measures the proportion of an object’s state, as statically defined by its class fields, that an oracle may access during test execution. The main intuition of our metric is that oracles with a higher state field coverage are more likely to detect faults in the software under analysis, as they inspect a larger portion of the object states to determine whether tests pass or not.We implement a mechanism to statically compute the state field coverage metric. Being statically computed, the metric is efficient and provides direct guidance for improving test oracles by identifying state fields that remain unexamined. We evaluate state field coverage through experiments involving 273 representation invariants and 249,027 test assertions. The results show that state field coverage is a well-suited metric for assessing oracle quality, as it strongly correlates with the oracles’ fault-detection ability, measured by mutation score.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9264,
  title = {State Field Coverage: A Metric for Oracle Quality},
  author = {Facundo Molina and Nazareno Aguirre and Alessandra Gorla},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00222}
}