Serenity:基于库的Python代码分析,用于代码完成和自动化机器学习
Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning
摘要:
像Python这样的动态类型语言已经变得非常流行。在其他优势中,Python的动态特性及其与本机代码的直接链接使其成为许多研究领域的事实语言,如人工智能。然而,这种灵活性使得静态分析非常困难。虽然为Python创建一个健全的分析仍然是一个悬而未决的问题,但我们在这项工作中提出了Serenity,这是一个用于Python的静态分析的框架,它足以完成某些任务。Serenity框架利用了两种基本机制:(a)依赖于语言翻译核心的动态分派,以及(b)库的极端抽象,以生成代码的抽象。我们在两个应用程序中展示了Serenity分析的效率和实用性:代码完成和自动机器学习。在这两个应用中,我们证明了这种分析具有很强的信号,并且可以被利用来建立最先进的性能,分别与神经模型和动态分析相媲美。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。