PoTo: 一种混合的 Python 安德森指针分析
PoTo: A Hybrid Andersen's Points-to Analysis for Python
AI总结:
提出 PoTo,一种针对 Python 的混合指针分析,通过结合静态分析与解释器中的具体求值来处理动态特性和外部库,并基于此构建类型推断 PoTo+,在现有 Python 包上优于 Pytype 和 DLInfer。
摘要:
随着 Python 越来越多地被用于大型复杂程序,Python 静态分析(如类型推断)的重要性日益增长。然而,由于 Python 的动态语言特性和丰富的外部库,其静态分析仍然是一项具有挑战性的任务。为了填补这一空白,本文提出了 PoTo,一种针对 Python 的 Andersen 风格上下文不敏感和流不敏感的指针分析。PoTo 通过一种新颖的混合评估方法,将传统的静态指针分析与 Python 解释器中对外部库调用的具体求值相结合,解决了 Python 特有的挑战,并适用于大型程序。接下来,本文提出了 PoTo+,一种基于指针分析的 Python 静态类型推断。我们评估了 PoTo+,并将其与两种最先进的 Python 类型推断技术进行了比较:(1) 基于静态规则的 Pytype 和 (2) 基于深度学习的 DLInfer。结果表明,PoTo+ 在现有 Python 包上优于 Pytype 和 DLInfer。
英文摘要:
As Python is increasingly being adopted for large and complex programs, the importance of static analysis for Python (such as type inference) grows. Unfortunately, static analysis for Python remains a challenging task due to its dynamic language features and its abundant external libraries. To help fill this gap, this paper presents PoTo, an Andersen-style context-insensitive and flow-insensitive points-to analysis for Python. PoTo addresses Python-specific challenges and works for large programs via a novel hybrid evaluation, integrating traditional static points-to analysis with concrete evaluation in the Python interpreter for external library calls. Next, this paper presents PoTo+, a static type inference for Python built on the points-to analysis. We evaluate PoTo+ and compare it to two state-of-the-art Python type inference techniques: (1) the static rule-based Pytype and (2) the deep-learning based DLInfer. Our results show that PoTo+ outperforms both Pytype and DLInfer on existing Python packages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。