An Empirical Study of Dynamic Types for Python Projects.

SATE(2018)

引用 25|浏览44
暂无评分
摘要
Python is a well-known dynamically-typed programming language. Due to its dynamic type, Python is flexible to solve complex situations. However, the use of dynamic type may cause many problems on correctness, security and performance. In this paper, we make an empirical study on the dynamic type of Python. First, we collect a dataset with 81 categories from the project list of Awesome Python. Then all Python files in this dataset are analyzed by Pysonar2. Type information is collected and saved for each identifier. Next, we proposed to recognize the dynamic type by comparing the analysis results from Pysonar2. After that, two research questions are put up to investigate the popularity of Python dynamic type in actual programming and the patterns of dynamic type for Python variables. The results show that 6.9% of identifiers in this dataset involve dynamic type and 79.7% of identifiers do not involve dynamic type. Besides, the patterns of dynamic type mainly appear among Transfer assignment methods. Finally, our results give implications such as optimization of naming space to improve the design of Python type system.
更多
查看译文
关键词
Dynamic type, Python program, Dynamic patterns
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要