paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Assessing the type annotation burden

评估类型标注负担
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 2/10 · 论文研究类型标注负担及自动建议对开发者准确率的影响,属于类型系统与开发者工具方向;但未涉及静态分析在ML/Agent程序中的应用、LLM/Agent改进静态分析、浮点或贝叶斯程序分析,与用户核心研究方向仅弱相关。引用 21 inbox
John-Paul Ore, Sebastian Elbaum, Carrick Detweiler, Lambros Karkazis
crossref: 2026-09-12

AI 速览

一句话:通过 71 名程序员实验量化类型标注负担,并评估自动建议对标注准确率的影响。

类型标注将程序变量与领域特定类型关联,配合类型系统可支持早期故障检测,但开发者承担的成本尚不清楚。本文考察三个问题:开发者标注类型的准确率、单次标注耗时,以及自动建议对准确率的影响。研究招募 71 名程序员,对 20 个随机代码工件中需标注物理单位类型的变量进行标注。结果显示,正确标注率仅 51%,单次正确标注平均耗时 136 秒;变量名与对数学运算的推理是主要线索。正确建议将准确率提升至 73%,错误建议则降至 28%。作者还分析当前自动类型标注系统的能力与不足,并总结对工具开发者的启示。

问题
开发者进行类型标注的准确率、耗时以及自动建议对标注效果的影响尚缺乏实证理解。
方法
招募 71 名程序员,对 20 个含物理单位类型变量的随机代码工件进行标注实验,并结合定性分析归纳类型选择线索。
评估
测量标注准确率与单次标注耗时,比较正确和错误自动建议对准确率的影响,并分析现有自动类型标注系统的能力边界。
原文摘要(Abstract)

Type annotations provide a link between program variables and domain-specific types. When combined with a type system, these annotations can enable early fault detection. For type annotations to be cost-effective in practice, they need to be both accurate and affordable for developers. We lack, however, an understanding of how burdensome type annotation is for developers. Hence, this work explores three fundamental questions: 1) how accurately do developers make type annotations; 2) how long does a single annotation take; and, 3) if a system could automatically suggest a type annotation, how beneficial to accuracy are correct suggestions and how detrimental are incorrect suggestions? We present results of a study of 71 programmers using 20 random code artifacts that contain variables with physical unit types that must be annotated. Subjects choose a correct type annotation only 51% of the time and take an average of 136 seconds to make a single correct annotation. Our qualitative analysis reveals that variable names and reasoning over mathematical operations are the leading clues for type selection. We find that suggesting the correct type boosts accuracy to 73%, while making a poor suggestion decreases accuracy to 28%. We also explore what state-of-the-art automated type annotation systems can and cannot do to help developers with type annotations, and identify implications for tool developers.

链接与引用

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

BibTeX
@inproceedings{paperbot4749,
  title = {Assessing the type annotation burden},
  author = {John-Paul Ore and Sebastian Elbaum and Carrick Detweiler and Lambros Karkazis},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3238173}
}