动态类型化语言代码质量保证的路径敏感类型分析与后向分析
Path-sensitive Type Analysis with Backward Analysis for Quality Assurance of Dynamic Typed Language Code
摘要:
对动态类型语言进行精确而快速的静态类型分析是非常困难的。这主要是因为缺少静态类型信息使得很难近似变量的所有可能值。实际上,现有的静态类型分析方法是不精确的或缓慢的。本文提出了一种提高Python代码静态类型分析精度的新方法,该方法通过向后分析来获得路径敏感性。通过这样做,我们的方法旨在获得更精确的静态类型信息,这有助于全面提高静态分析。为了证明我们的方法的有效性,我们进行了初步的实验,比较我们的方法实现和现有的分析工具的精度和时间效率。实验结果表明,与现有的静态类型分析工具相比,该方法可以提供更精确的类型分析,误报率更低。同时也表明我们提出的方法虽然增加了分析时间,但仍然在实际使用的范围内。
英文摘要:
Precise and fast static type analysis for dynamically typed language is very difficult. This is mainly because the lack of static type information makes it difficult to approximate all possible values of a variable. Actually, the existing static type analysis methods are imprecise or slow. In this paper, we propose a novel method to improve the precision of static type analysis for Python code, where a backward analysis is used to obtain the path-sensitivity. By doing so, our method aims to obtain more precise static type information, which contributes to the overall improvement of static analysis. To show the effectiveness of our method, we conducted a preliminary experiment to compare our method implementation and the existing analysis tool with respect to precision and time efficiency. The result shows our method provides more precise type analysis with fewer false positives than the existing static type analysis tool. Also it shows our proposed method increases the analysis time, but it is still within the range of practical use.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。