paperbot · PL 论文追踪

全部论文 待读 收藏

P2 LExecutor: Learning-Guided Execution

LExecutor:学习引导的代码执行
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 3/10 · 该论文属于机器学习与程序语言/程序分析的交叉,但其核心是用神经网络预测缺失值以支持不完整代码的执行,偏向动态执行而非用户重点关注的静态分析、Agentic 程序、浮点程序分析或贝叶斯程序分析。它也未使用 LLM/Agent 改进静态分析或形式化验证,因此与当前研究画像匹配度有限。引用 22 inbox
Beatriz Souza, Michael Pradel
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 LExecutor,用神经网络预测缺失值并注入执行,使不完整代码片段也能运行。

执行任意代码对错误检测和动态分析至关重要,但常因变量未定义、缺少用户输入或第三方依赖而失败。LExecutor 提出一种学习引导的欠约束执行方法:让神经模型预测会导致程序卡住的缺失值,并将其注入执行,例如为未定义变量和缺失函数调用注入可能的值。作者在流行开源 Python 项目和 Stack Overflow 代码片段上评估,模型预测真实值的准确率为 79.5%–98.2%,能较好模拟真实执行;最终成功执行代码的覆盖率达 51.6%,远高于直接执行时的 4.1%。

问题
执行任意代码常因变量未定义、缺少用户输入或第三方依赖而失败,但错误检测与动态分析又依赖执行。
方法
LExecutor 用神经模型预测可能导致执行卡住的缺失值(如未定义变量、缺失函数的返回值),并注入执行,以欠约束方式运行代码片段。
评估
在流行开源 Python 项目和 Stack Overflow 片段上评估;模型预测真实值准确率达 79.5%–98.2%,代码覆盖率达 51.6%,显著高于直接执行的 4.1%。
原文摘要(Abstract)

Executing code is essential for various program analysis tasks, e.g., to detect bugs that manifest through exceptions or to obtain execution traces for further dynamic analysis. How- ever, executing an arbitrary piece of code is often difficult in practice, e.g., because of missing variable definitions, miss- ing user inputs, and missing third-party dependencies. This paper presents LExecutor, a learning-guided approach for executing arbitrary code snippets in an underconstrained way. The key idea is to let a neural model predict missing values that otherwise would cause the program to get stuck, and to inject these values into the execution. For example, LExecutor injects likely values for otherwise undefined vari- ables and likely return values of calls to otherwise missing functions. We evaluate the approach on Python code from popular open-source projects and on code snippets extracted from Stack Overflow. The neural model predicts realistic values with an accuracy between 79.5% and 98.2%, allowing LExecutor to closely mimic real executions. As a result, the approach successfully executes significantly more code than any available technique, such as simply executing the code as-is. For example, executing the open-source code snippets as-is covers only 4.1% of all lines, because the code crashes early on, whereas LExecutor achieves a coverage of 51.6%.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2302-02343,
  title = {LExecutor: Learning-Guided Execution},
  author = {Beatriz Souza and Michael Pradel},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616254}
}