Lune

ICLR2023顶会

Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptions

David Bieber, Rishab Goel, Daniel Zheng, Hugo Larochelle, Daniel Tarlow

摘要

The execution behavior of a program often depends on external resources, such as program inputs or file contents, and so cannot be run in isolation. Nevertheless, software developers benefit from fast iteration loops where automated tools identify errors as early as possible, even before programs can be compiled and run. This presents an interesting machine learning challenge: can we predict runtime errors in a "static" setting, where program execution is not possible? Here, we introduce a real-world dataset and task for predicting runtime errors, which we show is difficult for generic models like Transformers. We approach this task by developing an interpreter-inspired architecture with an inductive bias towards mimicking program executions, which models exception handling and "learns to execute" descriptions of the contents of external resources. Surprisingly, we show that the model can also predict the location of the error, despite being trained only on labels indicating the presence/absence and kind of error. In total, we present a practical and difficult-yet-approachable challenge problem related to learning program execution and we demonstrate promising new capabilities of interpreter-inspired machine learning models for code.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • PLUR: A Unifying, Graph-Based View of Program Learning, Understanding, and Repair 引用了 Global Relational Models of Source Code
  • NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Can Large Language Models Reason about Program Invariants?
  • NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
  • LExecutor: Learning-Guided Execution 引用了 Global Relational Models of Source Code
  • LExecutor: Learning-Guided Execution 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
  • TRACED: Execution-aware Pre-training for Source Code 引用了 LExecutor: Learning-Guided Execution
  • TRACED: Execution-aware Pre-training for Source Code 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
  • Can Large Language Models Reason about Program Invariants? 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
  • Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks 引用了 Global Relational Models of Source Code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper10

  1. Can Large Language Models Reason about Program Invariants?Kexin Pei, David Bieber, Kensen Shi, Charles Sutton 等ICML 2023 · 128 次引用
  2. NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 等ICML 2024 · 73 次引用
  3. Code Representation Learning at ScaleDejiao Zhang, Wasi Uddin Ahmad, Ming Tan, Hantian Ding 等ICLR 2024 · 32 次引用
  4. TRACED: Execution-aware Pre-training for Source CodeYangruibo Ding, Benjamin Steenhoek, Kexin Pei, Gail E. Kaiser 等ICSE 2024 · 29 次引用
  5. LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 次引用

它引用的 Paper3

  1. Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
  2. Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 次引用
  3. PLUR: A Unifying, Graph-Based View of Program Learning, Understanding, and RepairZimin Chen, Vincent J. Hellendoorn, Pascal Lamblin, Petros Maniatis 等NeurIPS 2021 · 29 次引用

相关 Paper

  1. Planning a Large Language Model for Static Detection of Runtime Errors in Code SnippetsSmit Patel, Aashish Yadavally, Hridya Dhulipala, Tien N. NguyenICSE 2025 · 1 次引用
  2. Blended Analysis for Predictive ExecutionYi Li, Hridya Dhulipala, Aashish Yadavally, Xiaokai Rong 等FSE 2025 · 1 次引用
  3. T-REX: Teaching Large Language Models to Reason with Verbalized Execution SemanticsYan Wang, Ling Ding, Jiechen Sun, Tien N. Nguyen 等OOPSLA 2026
  4. SelfPiCo: Self-Guided Partial Code Execution with LLMsZhipeng Xue, Zhipeng Gao, Shaohua Wang, Xing Hu 等ISSTA 2024 · 8 次引用
  5. IrEne: Interpretable Energy Prediction for TransformersQingqing Cao, Yash Kumar Lal, Harsh Trivedi, Aruna Balasubramanian 等ACL 2021
黄昏的海面,两侧是细线勾勒的悬崖