首页> 外文会议>ECOOP 2010 - Object-oriented technology programming >Recency Types for Analyzing Scripting Languages
【24h】

Recency Types for Analyzing Scripting Languages

机译:用于分析脚本语言的新近度类型

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

With the current surge of scripting technologies, large programs are being built with dynamically typed languages. As these programs grow in size, semantics-based tools gain importance for detecting programming errors as well as for program understanding. As a basis for such tools, we propose a descriptive type system for an imperative call-by-value lambda calculus with objects. The calculus models essential features of JavaScript, a widely used dynamically-typed language: first-class functions, objects as property maps, and prototypes. Our type system infers precise singleton object types for recently allocated objects. These object types are handled flow-sensitively and change during the objects' initialization phase. The notion of recency provides an automatic criterion to subsume these precise object types to summary object types, which are handled flow-insensitively. The criterion applies on a per-object basis. Thus, the type system identifies a generalized initialization phase for each object during which the change of its value is precisely reflected in the change of its type. Unlike with linear types, summary types may refer to singleton types and vice versa. We prove the soundness of the type system and present a constraint-based inference algorithm. An implementation is available on the web.
机译:随着当前脚本技术的兴起,正在使用动态类型的语言来构建大型程序。随着这些程序规模的增长,基于语义的工具对于检测编程错误以及理解程序变得越来越重要。作为此类工具的基础,我们为带有对象的命令式按值lambda演算提出了一种描述性类型系统。演算模拟了JavaScript(一种广泛使用的动态类型语言)的基本功能:一流的功能,作为属性映射的对象和原型。我们的类型系统为最近分配的对象推断出精确的单例对象类型。这些对象类型对流敏感,并且在对象的初始化阶段会更改。新近度的概念提供了一种自动标准,可以将这些精确的对象类型包含在摘要对象类型中,这些对象类型对流程不敏感。该标准适用于每个对象。因此,类型系统为每个对象标识一个通用的初始化阶段,在此阶段,其值的更改会准确地反映在其类型的更改中。与线性类型不同,摘要类型可以引用单例类型,反之亦然。我们证明了类型系统的可靠性,并提出了一种基于约束的推理算法。可以在Web上实现。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号