kirancodes.me
To Proof Maintenance & Beyond!

A practical call graph construction method for Python

Jiacheng Zhong

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.

BibTeX
@inproceedings{Zhong:FSE22,
  author    = {Jiacheng Zhong},
  title     = {A practical call graph construction method for Python},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {1805--1807},
  publisher = {{ACM}},
  year      = {2022},
}

Related papers