PoTo: A Hybrid Andersen's Points-to Analysis for Python

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Rak-amnouykit, Ingkarat, Milanova, Ana, Baudart, Guillaume, Hirzel, Martin, Dolby, Julian
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866911721992486912
author Rak-amnouykit, Ingkarat
Milanova, Ana
Baudart, Guillaume
Hirzel, Martin
Dolby, Julian
author_facet Rak-amnouykit, Ingkarat
Milanova, Ana
Baudart, Guillaume
Hirzel, Martin
Dolby, Julian
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2409_03918
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle PoTo: A Hybrid Andersen's Points-to Analysis for Python
Rak-amnouykit, Ingkarat
Milanova, Ana
Baudart, Guillaume
Hirzel, Martin
Dolby, Julian
Programming Languages
Software Engineering
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.
title PoTo: A Hybrid Andersen's Points-to Analysis for Python
topic Programming Languages
Software Engineering
url https://arxiv.org/abs/2409.03918