LExecutor: Learning-Guided Execution
Not on the map. Why?
Abstract (arXiv)
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. However, executing an arbitrary piece of code is often difficult in practice, e.g., because of missing variable definitions, missing 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 variables 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%.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 43 of its 106 references that are in the map. First posted on arXiv 5 Feb 2023.
Builds on
43 of 106 references.
References · 43
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2017Learning to Represent Programs with Graphscited by 219
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
31 more
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2014Learning to Executecited by 105
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2021Break-It-Fix-It: Unsupervised Learning for Program Repaircited by 71
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
- 2019Neural Program Repair by Jointly Learning to Localize and Repaircited by 39
- 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
- 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
- 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
- 2020Typilus: Neural Type Hintscited by 29
- 2019Learning to Fix Build Errors with Graph2Diff Neural Networkscited by 26
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
- 2020Automated Unit Test Generation for Pythoncited by 18
- 2020SCELMo: Source Code Embeddings from Language Modelscited by 16
- 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
- 2020Neural Software Analysiscited by 11
- 2021VarCLR: Variable Semantic Representation Pre-training via Contrastive Learningcited by 11
- 2022Code Search based on Context-aware Code Translationcited by 11
- 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
- 2020Sequence Model Design for Code Completion in the Modern IDEcited by 8
- 2021Nalin: Learning from Runtime Behavior to Find Name-Value Inconsistencies in Jupyter Notebookscited by 6
- 2021Restoring Execution Environments of Jupyter Notebookscited by 5
- 2018Wasabi: A Framework for Dynamically Analyzing WebAssemblycited by 2
- 2019Executability of Python Snippets in Stack Overflowcited by 1
Built on by
Citing papers per year: 2023: 1; 2024: 3; 2025: 2; 2026: 1.
7 papers.
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursioncited by 14
- 2023Exploiting Code Symmetries for Learning Program Semanticscited by 9
- 2024Towards Agentic Runtime Healingcited by 7
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generationcited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation6 Aug 2026
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
- 2025Treefix: Enabling Execution with a Tree of Prefixes21 Jan 2025
- 2024Towards Agentic Runtime Healing2 Aug 2024
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?25 Mar 2024
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursion23 Jan 2024
- 2023Exploiting Code Symmetries for Learning Program Semantics7 Aug 2023