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

Wenting Zhao, Ibrahim Abdelaziz, Julian Dolby, Kavitha Srinivas, Mossad Helali +1 more
1/5/2023
cs.PLcs.AI

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhao2023serenity,
  title  = {Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning},
  author = {Wenting Zhao and Ibrahim Abdelaziz and Julian Dolby and Kavitha Srinivas and Mossad Helali and Essam Mansour},
  year   = {2023},
  eprint = {2301.05108},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.05108v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.05108.svg)](https://codeofpaper.com/paper/2301.05108)

Discussion