SelfPiCo: Self-Guided Partial Code Execution with LLMs
Zhipeng Xue, Zhipeng Gao, Shaohua Wang, Xing Hu, Xin Xia, Shanping Li

TL;DR
SelfPiCo is a novel framework that dynamically guides partial code execution using large language models, improving accuracy and error detection in complex code snippets through iterative learning and reasoning.
Contribution
It introduces SelfPiCo, a self-guided, interactive partial code executor leveraging LLMs with continuous learning, outperforming prior methods in code execution and error detection.
Findings
Achieves 72.7% and 83.3% execution coverage on open-source and Stack Overflow code snippets.
Outperforms state-of-the-art Lexecutor by 37.9% and 33.5% in execution success.
Detects 18 and 33 runtime type errors in real-world code projects.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
