paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A practical call graph construction method for Python

一种实用的 Python 调用图构建方法
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 4/10 · 论文属于 Python 静态调用图构建,是静态分析在 Python 程序上的基础技术,与 Agentic/ML 程序分析有潜在基础设施关联,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也不直接属于 PL→AI 或 AI→PL 的交叉问题。引用 1 inbox
Jiacheng Zhong
crossref: 2026-09-12

AI 速览

一句话:提出基于流不敏感、上下文不敏感指针分析的 Python 静态调用图方法 PyPt,可处理属性动态解析与高阶函数等动态特性,健全性与完备性均优于 PyCG。

Python 已成为最流行的编程语言之一,调用图是软件工程中许多应用的基础数据结构。然而现有 Python 调用图构建方法在精度和召回率上普遍不够高,限制了其实际使用。本文提出 PyPt,一种面向 Python 的静态调用图构建方法,其核心是基于流不敏感、上下文不敏感的指针分析,并能够处理属性动态解析、高阶函数等动态语言特性。评估方面,作者在包含 99 个手工构造程序和 6 个真实开源项目的基准上,将 PyPt 与当前最先进的调用图工具 PyCG 进行对比。实验结果表明,PyPt 在健全性(soundness)和完备性(completeness)两方面均优于 PyCG。

问题
现有 Python 静态调用图构建方法的精度与召回率普遍偏低,难以满足实际软件工程应用的需求。
方法
提出 PyPt,基于流不敏感、上下文不敏感的指针分析构建 Python 静态调用图,并专门处理属性动态解析、高阶函数等动态特性。
评估
在包含 99 个手工构造程序和 6 个真实开源项目的基准上,与当前最先进工具 PyCG 对比,PyPt 在健全性和完备性上均更优。
原文摘要(Abstract)

Python has become one of the most popular programming languages today. Call graph is one of the essential data structures for many applications in software engineering. However, the precision and recall rate of the existing Python call graph construction methods are generally not high enough, which affects their use in practice. This paper proposes PyPt, a static call graph construction method for Python based on flow-insensitive context-insensitve pointer analysis, which can deal with some dynamic features, such as the dynamic resolution of attributes, higher-order functions, etc. This paper compares PyPt with the state-of-the-art call graph tool PyCG on a benchmark containing 99 manually constructed programs and six real-world open-source projects. The results show that PyPt is better than PyCG in both soundness and completeness.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7061,
  title = {A practical call graph construction method for Python},
  author = {Jiacheng Zhong},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3559077}
}