paperbot · PL 论文追踪

全部论文 待读 收藏

P2 On the Relationship between Code Verifiability and Understandability

论代码可验证性与可理解性之间的关系
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文研究程序可验证性与人类可理解性之间的经验相关性,属于程序验证/开发者工具方向,但未涉及 LLM/Agent、静态分析在机器学习或 Agentic 程序中的应用,也未触及浮点程序分析或贝叶斯程序分析,因此与用户核心研究方向仅边缘相关。引用 3 inbox
Kobi Feldman, Martin Kellogg, Oscar Chaparro
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:通过实证统计发现代码可验证性与人类可理解性仅呈弱正相关(r=0.23)。

软件验证的支持者认为更简单的代码更易验证,即验证工具误报更少、所需人工干预更少,但该假设缺乏实证。作者将四个先进验证工具在211个Java代码片段上产生的警告数量,与六项先前研究中人类受试者给出的20种代码可理解性度量进行比较,并进行统计(元)分析。结果显示,总体可理解性与可验证性之间存在小但显著的相关性(r=0.23),支持易验证代码通常也更易理解的观点。该工作对验证工具用户与设计者以及自动度量代码可理解性的未来尝试具有启示:验证工具可能对可理解性有附带收益,而度量可理解性可能需要考虑语义而非仅语法属性。

问题
验证支持者假设更简单的代码更易验证,但可验证性与人类可理解性之间的关系缺乏实证检验。
方法
对四个先进验证工具在211个Java片段上的警告数量与六项先前研究中20种人类可理解性指标进行统计(元)分析。
评估
发现总体可理解性与可验证性呈弱正相关(r=0.23),表明易验证代码往往也更易理解,并对验证工具设计和可理解性度量有启示。
原文摘要(Abstract)

Proponents of software verification have argued that simpler code is easier to verify: that is, that verification tools issue fewer false positives and require less human intervention when analyzing simpler code. We empirically validate this assumption by comparing the number of warnings produced by four state-of-the-art verification tools on 211 snippets of Java code with 20 metrics of code comprehensibility from human subjects in six prior studies. Our experiments, based on a statistical (meta-)analysis, show that, in aggregate, there is a small correlation (r = 0.23) between understandability and verifiability. The results support the claim that easy-to-verify code is often easier to understand than code that requires more effort to verify. Our work has implications for the users and designers of verification tools and for future attempts to automatically measure code comprehensibility: verification tools may have ancillary benefits to understandability, and measuring understandability may require reasoning about semantic, not just syntactic, code properties.

链接与引用

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

BibTeX
@inproceedings{FeldmanKC23,
  title = {On the Relationship between Code Verifiability and Understandability},
  author = {Kobi Feldman and Martin Kellogg and Oscar Chaparro},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616242}
}