PyART: Python API Recommendation in Real-Time
Xincheng He, Lei Xu, Xiangyu Zhang, Rui Hao, Yang Feng, Baowen Xu

TL;DR
PyART is a real-time API recommendation tool for Python that uses lightweight analysis and machine learning to outperform existing solutions, especially when type info is missing or project-specific.
Contribution
PyART introduces a novel, fast, and effective API recommendation approach for Python that combines data-flow analysis with machine learning, addressing limitations of static analysis-based tools.
Findings
PyART achieves over 50% top-1 accuracy in recommended APIs.
PyART outperforms APIREC and Intellicode by up to 39% in accuracy.
Recommendation time is less than one second, suitable for real-time use.
Abstract
API recommendation in real-time is challenging for dynamic languages like Python. Many existing API recommendation techniques are highly effective, but they mainly support static languages. A few Python IDEs provide API recommendation functionalities based on type inference and training on a large corpus of Python libraries and third-party libraries. As such, they may fail to recommend or make poor recommendations when type information is missing or target APIs are project-specific. In this paper, we propose a novel approach, PyART, to recommend APIs for Python programs in real-time. It features a light-weight analysis to derives so-called optimistic data-flow, which is neither sound nor complete, but simulates the local data-flow information humans can derive. It extracts three kinds of features: data-flow, token similarity, and token co-occurrence, in the context of the program point…
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
TopicsSoftware Engineering Research · Mobile Crowdsensing and Crowdsourcing · Advanced Malware Detection Techniques
