首页> 外文期刊>Science of Computer Programming >Mining inline cache data to order inferred types in dynamic languages
【24h】

Mining inline cache data to order inferred types in dynamic languages

机译:挖掘内联缓存数据以动态语言对推断类型进行排序

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

摘要

The lack of static type information in dynamically-typed languages often poses obstacles for developers. Type inference algorithms can help, but inferring precise type information requires complex algorithms that are often slow.A simple approach that considers only the locally used interface of variables can identify potential classes for variables, but popular interfaces can generate a large number of false positives. We propose an approach calledinline-cache type inference(ICTI) to augment the precision of fast and simple type inference algorithms. ICTI uses type information available in the inline caches during multiple software runs, to provide a ranked list of possible classes that most likely represent a variable's type. We evaluate ICTI through a proof-of-concept that we implement in Pharo Smalltalk. The analysis of the top-n+2inferred types (wherenis the number of recorded run-time types for a variable) for 5486 variables from four different software systems shows that ICTI produces promising results for about 75% of the variables. For more than 90% of variables, the correct run-time type is present among first six inferred types. Our ordering shows a twofold improvement when compared with the unordered basic approach,i.e., for a significant number of variables for which the basic approach offered ambiguous results, ICTI was able to promote the correct type to the top of the list.
机译:动态类型语言中缺少静态类型信息通常会给开发人员带来障碍。类型推断算法可以提供帮助,但是推断精确的类型信息需要复杂的算法,这些算法通常很慢。一种简单的方法仅考虑本地使用的变量接口可以识别变量的潜在类别,但流行的接口可能会生成大量误报。我们提出一种称为内联缓存类型推断(ICTI)的方法,以提高快速简单类型推断算法的精度。 ICTI使用多个软件运行期间内联高速缓存中可用的类型信息,以提供最有可能表示变量类型的可能类的排名列表。我们通过在Pharo Smalltalk中实施的概念验证来评估ICTI。对来自四个不同软件系统的5486个变量的前n + 2个推断类型(其中记录了变量的运行时类型的数目)的分析表明,ICTI对约75%的变量产生了可喜的结果。对于超过90%的变量,在前六个推断类型中存在正确的运行时类型。与无序基本方法相比,我们的排序显示了两倍的改进,即对于基本方法提供歧义结果的大量变量,ICTI能够将正确的类型提升到列表的顶部。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号