SelfPiCo: Self-Guided Partial Code Execution with LLMs
Not on the map. Why?
Abstract (arXiv)
Code executability plays a vital role in software debugging and testing (e.g., detecting runtime exceptions or assertion violations). However, code execution, especially partial or arbitrary code execution, is a non-trivial task due to missing definitions and complex third-party dependencies. To make partial code (such as code snippets posted on the web or code fragments deep inside complex software projects) executable, the existing study has proposed a machine learning model to predict the undefined element types and inject the pre-defined dummy values into execution. However, the performance of their tool is limited due to its simply designed dummy values and the inability to continue learning. In this paper, we design and implement a novel framework, named SelfPiCo (Self Guided Partial Code Executor), to dynamically guide partial code execution by incorporating the open-source LLM (i.e., Code Llama) within an interactive loop. Particularly, SelfPiCo leverages few-shot in-context learning and chain-of-thought reasoning to elicit human knowledge and logical reasoning based on fine-tuning the Code Llama model. SelfPiCo continuously learns from code execution results and refines its predictions step after step. Our evaluations demonstrate that SelfPiCo can execute 72.7% and 83.3% of all lines in the open-source code and Stack Overflow snippets, outperforming the most recent state-of-the-art Lexecutor by 37.9% and 33.5%, respectively. Moreover, SelfPiCo successfully detected 18 and 33 runtime type error issues by executing the partial code from eight GitHub software projects and 43 Stack Overflow posts, demonstrating the practical usage and potential application of our framework in practice.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 24 Jul 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 4; 2026: 2.
7 papers.
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
- 2025Gistify! Codebase-Level Understanding via Runtime Executioncited by 4
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMscited by 2
- 2026MANGO: Automated Multi-Agent Test Oracle Generation for Vision-Language-Action Modelscited by 1
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generationcited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation6 Aug 2026
- 2026MANGO: Automated Multi-Agent Test Oracle Generation for Vision-Language-Action Models23 Jun 2026
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMs1 Nov 2025
- 2025Gistify! Codebase-Level Understanding via Runtime Execution30 Oct 2025
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs26 Feb 2025
- 2025Treefix: Enabling Execution with a Tree of Prefixes21 Jan 2025
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement1 Nov 2024
Similar, not cited
Close in wording, no citation either way
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generation
- 2024NExT: Teaching Large Language Models to Reason about Code Execution
- 2026DuET: Dual Execution for Test Output Prediction with Generated Code and Pseudocode
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
- 2023Teaching Large Language Models to Self-Debug
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specifications
- 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation
- 2024SemCoder: Training Code Language Models with Comprehensive Semantics Reasoning