首页> 外文会议>International Colloquium on Theoretical Aspects of Computing >Preemptive Type Checking in Dynamically Typed Languages
【24h】

Preemptive Type Checking in Dynamically Typed Languages

机译:抢先类型检查动态类型的语言

获取原文
获取外文期刊封面目录资料

摘要

We describe a type system that identifies potential type errors in dynamically typed languages like Python. The system uses a flow-sensitive static analysis on bytecodes to compute, for every variable and program point, over-approximations of the variable's present and future use types. If the future use types are not subsumed by the present types, the further program execution may raise a type error, and a narrowing assertion is inserted; if future use and present types are disjoint, it will raise a type error, and a type error assertion is inserted. We prove that the assertions are inserted in optimal locations and thus preempt type errors earlier than dynamic, soft, and gradual typing. We describe the details of our type inference and assertion insertion, and demonstrate the results of an implementation of the system with a number of examples.
机译:我们描述了一种类型系统,它以Python等动态类型的语言标识潜在类型错误。该系统对字节码进行流动静态静态分析来计算每个变量和程序点,对变量的当前和未来使用类型的过度近似。如果未来的使用类型不包括当前类型,则进一步的程序执行可能会引发类型错误,并且插入缩小断言;如果未来使用和当前类型是不相交的,它将提高类型错误,并且插入类型错误断言。我们证明断言在最佳位置插入,从而早期的抢先型误差,比动态,柔软和逐渐打字。我们描述了我们类型推断和断言插入的细节,并展示了具有多个示例的系统实现的结果。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号