Static Inference Meets Deep learning: A Hybrid Type Inference Approach for Python
Abstract
Type inference for dynamic programming languages such as Python is an important yet challenging task. Static type inference techniques can precisely infer variables with enough static constraints but are unable to handle variables with dynamic features. Deep learning (DL) based approaches are feature-agnostic, but they cannot guarantee the correctness of the predicted types. Their performance significantly depends on the quality of the training data (i.e., DL models perform poorly on some common types that rarely appear in the training dataset). It is interesting to note that the static and DL-based approaches offer complementary benefits. Unfortunately, to our knowledge, precise type inference based on both static inference and neural predictions has not been exploited and remains an open challenge. In particular, it is hard to integrate DL models into the framework of rule-based static approaches.
BibTeX
@inproceedings{Peng-al:ICSE22,
author = {Yun Peng and
Cuiyun Gao and
Zongjie Li and
Bowei Gao and
David Lo and
Qirun Zhang and
Michael R. Lyu},
title = {Static Inference Meets Deep learning: A Hybrid Type Inference Approach for Python},
booktitle = {ICSE},
pages = {2019--2030},
publisher = {{ACM}},
year = {2022},
}