PoTo: A Hybrid Andersen's Points-to Analysis for Python
Ingkarat Rak-amnouykit, Ana Milanova, Guillaume Baudart, Martin, Hirzel, Julian Dolby

TL;DR
PoTo introduces a hybrid points-to analysis for Python that combines static analysis with concrete evaluation, improving type inference accuracy on large programs with external libraries.
Contribution
This paper presents PoTo, a novel hybrid Andersen-style points-to analysis tailored for Python, and PoTo+, a static type inference built on this analysis, addressing Python's dynamic features.
Findings
PoTo+ outperforms Pytype and DLInfer in type inference accuracy.
PoTo effectively handles Python's dynamic features and external libraries.
The hybrid approach scales to large Python programs.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications
