Skip to content
Free planNo credit card requiredStart writing

preprint · arXiv (Cornell University) · 2023

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

Wenting Zhao, Ibrahim Abdelaziz, Julian Dolby, Kavitha Srinivas, Mossad Helali, Essam Mansour

Cited by 0Open access

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.

Cite this paper

APA 7

Zhao, W., Abdelaziz, I., Dolby, J., Srinivas, K., Helali, M., & Mansour, E. (2023). Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2301.05108

MLA 9

Zhao, Wenting, et al. “Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning.” arXiv (Cornell University), 2023, https://doi.org/10.48550/arxiv.2301.05108.

Chicago

Zhao, Wenting, Ibrahim Abdelaziz, Julian Dolby, Kavitha Srinivas, Mossad Helali, and Essam Mansour. 2023. “Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning.” arXiv (Cornell University). https://doi.org/10.48550/arxiv.2301.05108.

Harvard

Zhao, W. et al. (2023) ‘Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning’, arXiv (Cornell University). Available at: https://doi.org/10.48550/arxiv.2301.05108.

BibTeX
@misc{zhao2023serenity,
  title = {{Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning}},
  author = {Zhao, Wenting and Abdelaziz, Ibrahim and Dolby, Julian and Srinivas, Kavitha and Helali, Mossad and Mansour, Essam},
  journal = {arXiv (Cornell University)},
  year = {2023},
  doi = {10.48550/arxiv.2301.05108}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.