跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2111.01577 (cs)
[提交于 2023年4月17日]

标题:Do Names Echo Semantics? A Large-Scale Study of Identifiers Used in C++'s Named Casts

作者:Constantin Cezar Petrescu, Sam Smith, Rafail Giavrimis, Santanu Kumar Dash
查看论文《Do Names Echo Semantics? A Large-Scale Study of Identifiers Used in C++'s Named Casts》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Developers relax restrictions on a type to reuse methods with other types. While type casts are prevalent, in weakly typed languages such as C++, they are also extremely permissive. Assignments where a source expression is cast into a new type and assigned to a target variable of the new type, can lead to software bugs if performed without care. In this paper, we propose an information-theoretic approach to identify poor implementations of explicit cast operations. Our approach measures accord between the source expression and the target variable using conditional entropy. We collect casts from 34 components of the Chromium project, which collectively account for 27MLOC and random-uniformly sample this dataset to create a manually labelled dataset of 271 casts. Information-theoretic vetting of these 271 casts achieves a peak precision of 81% and a recall of 90%. We additionally present the findings of an in-depth investigation of notable explicit casts, two of which were fixed in recent releases of the Chromium project.
评论: The manuscript has 27 pages and it contains 4 Figures, 18 Listings and 4 Tables. The preprint has been accepted at Journal of Systems and Software from Elsevier
主题: 软件工程 (cs.SE); 信息论 (cs.IT); 程序设计语言 (cs.PL); 信息论 (math.IT)
引用方式: arXiv:2111.01577 [cs.SE]
  (或者 arXiv:2111.01577v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2111.01577
相关 DOI: https://doi.org/10.1016/j.jss.2023.111693

提交历史

来自:Constantin Cezar Petrescu
[v1] 2023年4月17日 星期一 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-04
切换浏览方式为:
cs
cs.IT
cs.PL
math.IT

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站