Predictive Program Slicing via Execution Knowledge-Guided Dynamic Dependence Learning
摘要
Program slicing, the process of extracting program statements that influence values at a designated location (known as the slicing criterion), is helpful in both manual and automated debugging. However, such slicing techniques prove ineffective in scenarios where executing specific inputs is prohibitively expensive, or even impossible, as with partial code. In this paper, we introduce ND- Slicer , a predictive slicing methodology that caters to specific executions based on a particular input, overcoming the need for actual execution. We enable such a process by leveraging execution-aware pre-training to learn the dynamic program dependencies, including both dynamic data and control dependencies between variables in the slicing criterion and the remaining program statements. Such knowledge forms the cornerstone for constructing a predictive backward slice. Our empirical evaluation revealed a high accuracy in predicting program slices, achieving an exact-match accuracy of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn81.3</mml:mn> mml:mo%</mml:mo> </mml:math> and a ROUGE-LCS F1-score of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn95.4</mml:mn> mml:mo%</mml:mo> </mml:math> on Python programs. As an extrinsic evaluation, we illustrate ND- Slicer 's usefulness in crash detection, with it locating faults with an accuracy of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn63.9</mml:mn> mml:mo%</mml:mo> </mml:math> . Furthermore, we include an in-depth qualitative evaluation, assessing ND- Slicer ’s understanding of branched structures such as if-else blocks and loops, as well as the control flow in inter-procedural calls.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- The Path Not Taken: Duality in Reasoning about Program Execution 引用了 Code Execution with Pre-trained Language Models
- LExecutor: Learning-Guided Execution 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
- TRACED: Execution-aware Pre-training for Source Code 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
- TRACED: Execution-aware Pre-training for Source Code 引用了 LExecutor: Learning-Guided Execution
- Code Execution with Pre-trained Language Models 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
引用它的顶会 Paper2
它引用的 Paper5
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- TRACED: Execution-aware Pre-training for Source CodeYangruibo Ding, Benjamin Steenhoek, Kexin Pei, Gail E. Kaiser 等ICSE 2024 · 29 次引用
- Code Execution with Pre-trained Language ModelsChenxiao Liu, Shuai Lu, Weizhu Chen, Daxin Jiang 等ACL Findings 2023 · 27 次引用
- LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 次引用
- (Partial) Program Dependence LearningAashish Yadavally, Tien N. Nguyen, Wenbo Wang, Shaohua WangICSE 2023 · 6 次引用
相关 Paper
- A Learning-Based Approach to Static Program SlicingAashish Yadavally, Yi Li, Shaohua Wang, Tien N. NguyenOOPSLA 2024 · 15 次引用
- Blended Analysis for Predictive ExecutionYi Li, Hridya Dhulipala, Aashish Yadavally, Xiaokai Rong 等FSE 2025 · 1 次引用
- Bolt-on, Compact, and Rapid Program Slicing for Notebooks [Scalable Data Science]Shreya Shankar, Stephen Macke, Sarah E. Chasins, Andrew Head 等VLDB 2022 · 17 次引用
- SLICEFORMER: Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained DecodingPengfei He, Shaowei Wang, Tse-Hsun Chen, Muhammad AsaduzzamanACL 2026
- Improving Data Leakage Detection in Machine Learning Notebooks through Static Slicing and Structured LLM PromptsTaha Draoui, Mohamed Wiem Mkaouer, Christian D. NewmanFSE 2026 · 1 次引用
