...
首页> 外文期刊>ACM transactions on software engineering and methodology >An Empirical Study on Type Annotations: Accuracy, Speed, and Suggestion Effectiveness
【24h】

An Empirical Study on Type Annotations: Accuracy, Speed, and Suggestion Effectiveness

机译:型注释的实证研究:准确,速度和建议效果

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

Type annotations connect variables to domain-specific types. They enable the power of type checking and can detect faults early. In practice, type annotations have a reputation of being burdensome to developers. We lack, however, an empirical understanding of how and why they are burdensome. Hence, we seek to measure the baseline accuracy and speed for developers making type annotations to previously unseen code. We also study the impact of one or more type suggestions. We conduct an empirical study of 97 developers using 20 randomly selected code artifacts from the robotics domain containing physical unit types. We find that subjects select the correct physical type with just 51% accuracy, and a single correct annotation takes about 2 minutes on average. Showing subjects a single suggestion has a strong and significant impact on accuracy both when correct and incorrect, while showing three suggestions retains the significant benefits without the negative effects. We also find that suggestions do not come with a time penalty. We require subjects to explain their annotation choices, and we qualitatively analyze their explanations. We find that identifier names and reasoning about code operations are the primary clues for selecting a type. We also examine two state-of-the-art automated type annotation systems and find opportunities for their improvement.
机译:键入注释将变量连接到特定于域的类型。它们启用类型检查的功能,可以提前检测故障。在实践中,型注释具有繁琐开发人员的声誉。然而,我们缺乏对如何以及为什么他们是繁重的实证理解。因此,我们寻求测量开发人员为以前看不见的代码制作类型注释的基线准确性和速度。我们还研究了一个或多个类型的建议的影响。我们使用来自包含物理单元类型的机器人域的机器人域的20个随机选择的代码工件进行97个开发人员的实证研究。我们发现受试者选择具有51%的精度的正确物理类型,并且单个正确的注释平均约2分钟。显示主题单个建议在正确和不正确时对准确性具有强烈而显着的影响,同时显示三个建议保留了没有负面影响的显着效益。我们还发现建议不带来时期罚款。我们要求主题解释他们的注释选择,我们定性地分析了他们的解释。我们发现关于代码操作的标识符名称和推理是用于选择类型的主要线索。我们还研究了两个最先进的自动化型注释系统,并为其改进找机会。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号