DyPyBench:一个可执行 Python 软件基准测试集
DyPyBench: A Benchmark of Executable Python Software
AI总结:
本文提出 DyPyBench,一个包含 50 个可执行开源 Python 项目、681k 行代码和 30k 测试用例的动态分析基准,并展示其在调用图比较、LExecutor 训练和 API 规范挖掘中的应用。
摘要:
Python 已成为最流行的编程语言之一,被广泛应用于机器学习、数据分析和 Web 应用等领域。Python 的动态特性及其广泛使用,使其成为动态程序分析的理想对象。然而,与其他流行语言不同,目前尚缺乏一个由可执行 Python 项目构成的综合基准测试套件,这阻碍了动态分析的发展。本工作通过提出 DyPyBench 来填补这一空白;它是首个大规模、多样化、可直接运行(即具备完全配置并准备好的测试套件)且可直接分析(通过与 DynaPyt 动态分析框架集成)的 Python 项目基准。该基准包含来自不同应用领域的 50 个流行开源项目,共计 681k 行 Python 代码和 30k 个测试用例。DyPyBench 支持测试与动态分析中的多种应用,本工作探索了其中三项:(i)收集动态调用图,并将其与静态计算的调用图进行实证比较,从而揭示并量化现有 Python 调用图构建技术的局限性。(ii)使用 DyPyBench 为 LExecutor 构建训练数据集,LExecutor 是一种神经模型,用于学习预测在运行时原本会缺失的值。(iii)使用动态收集的执行轨迹挖掘 API 使用规范,从而为未来 Python 规范挖掘工作建立基线。我们期望 DyPyBench 能为其他动态分析以及研究 Python 代码的运行时行为提供基础。
英文摘要:
Python has emerged as one of the most popular programming languages, extensively utilized in domains such as machine learning, data analysis, and web applications. Python's dynamic nature and extensive usage make it an attractive candidate for dynamic program analysis. However, unlike for other popular languages, there currently is no comprehensive benchmark suite of executable Python projects, which hinders the development of dynamic analyses. This work addresses this gap by presenting DyPyBench, the first benchmark of Python projects that is large scale, diverse, ready to run (i.e., with fully configured and prepared test suites), and ready to analyze (by integrating with the DynaPyt dynamic analysis framework). The benchmark encompasses 50 popular opensource projects from various application domains, with a total of 681k lines of Python code, and 30k test cases. DyPyBench enables various applications in testing and dynamic analysis, of which we explore three in this work: (i) Gathering dynamic call graphs and empirically comparing them to statically computed call graphs, which exposes and quantifies limitations of existing call graph construction techniques for Python. (ii) Using DyPyBench to build a training data set for LExecutor, a neural model that learns to predict values that otherwise would be missing at runtime. (iii) Using dynamically gathered execution traces to mine API usage specifications, which establishes a baseline for future work on specification mining for Python. We envision DyPyBench to provide a basis for other dynamic analyses and for studying the runtime behavior of Python code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。