PLAIJan 5, 2023

Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning

arXiv:2301.05108v1h-index: 33
Originality Incremental advance
AI Analysis

This work addresses the problem of static analysis for Python, which is crucial for developers and researchers in AI and other fields, but it is incremental as it builds on existing approaches to handle Python's flexibility.

The paper tackles the challenge of static analysis for Python, a dynamically typed language, by introducing Serenity, a framework that uses dynamic dispatch and library abstraction to generate code abstractions. It demonstrates Serenity's effectiveness in code completion and automated machine learning, achieving state-of-the-art performance comparable to neural models and dynamic analysis.

Dynamically typed languages such as Python have become very popular. Among other strengths, Python's dynamic nature and its straightforward linking to native code have made it the de-facto language for many research areas such as Artificial Intelligence. This flexibility, however, makes static analysis very hard. While creating a sound, or a soundy, analysis for Python remains an open problem, we present in this work Serenity, a framework for static analysis of Python that turns out to be sufficient for some tasks. The Serenity framework exploits two basic mechanisms: (a) reliance on dynamic dispatch at the core of language translation, and (b) extreme abstraction of libraries, to generate an abstraction of the code. We demonstrate the efficiency and usefulness of Serenity's analysis in two applications: code completion and automated machine learning. In these two applications, we demonstrate that such analysis has a strong signal, and can be leveraged to establish state-of-the-art performance, comparable to neural models and dynamic analysis respectively.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes