Static Type Analysis for Python

Tiancong Dong, Lin Chen, Zhaogui Xu, Bin Yu
{"title":"Static Type Analysis for Python","authors":"Tiancong Dong, Lin Chen, Zhaogui Xu, Bin Yu","doi":"10.1109/WISA.2014.20","DOIUrl":null,"url":null,"abstract":"Python is a kind of dynamic-typed language which provides flexibility but leaves the programmer without the benefits of static typing. This paper describes Type, a tool that works for static type annotation and inference for python. It could simulate the built-in modules, transform the Python source code to IR(Intermediate representation) which we design and annotate, infer and reduce the IR into the type system. Type could provide the explicit type information, detect the type errors at compile time and improve the efficiency of development and the accuracy of point-to analysis. By the evaluation of applying Type to a suite of benchmarks, we find that Type can annotate and infer the types with a good precision and coverage in accept time.","PeriodicalId":366169,"journal":{"name":"2014 11th Web Information System and Application Conference","volume":"44 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 11th Web Information System and Application Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/WISA.2014.20","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Python is a kind of dynamic-typed language which provides flexibility but leaves the programmer without the benefits of static typing. This paper describes Type, a tool that works for static type annotation and inference for python. It could simulate the built-in modules, transform the Python source code to IR(Intermediate representation) which we design and annotate, infer and reduce the IR into the type system. Type could provide the explicit type information, detect the type errors at compile time and improve the efficiency of development and the accuracy of point-to analysis. By the evaluation of applying Type to a suite of benchmarks, we find that Type can annotate and infer the types with a good precision and coverage in accept time.
Python静态类型分析
Python是一种动态类型语言,它提供了灵活性,但使程序员没有静态类型的好处。本文描述了Type,一个用于python静态类型注释和推断的工具。它可以模拟内置模块,将Python源代码转换为我们设计和注释的IR(Intermediate representation,中间表示),并将其推断和简化为类型系统。类型可以提供显式的类型信息,在编译时检测类型错误,提高开发效率和点对点分析的准确性。通过将Type应用于一组基准测试的评估,我们发现Type可以在可接受的时间内以良好的精度和覆盖率标注和推断类型。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信