Predictive Program Slicing via Execution Knowledge-Guided Dynamic Dependence Learning
Aashish Yadavally, Yi Li, Tien N. Nguyen
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 56743dbd-8d3d-4deb-93ac-b7776eb5fd05Cited by top-tier papers2
- Hybrid Language Processor Fuzzing via LLM-Based Constraint SolvingYupeng Yang, Shenglong Yao, Jizhou Chen, Wenke LeeUSENIX Security 2025
- The Path Not Taken: Duality in Reasoning about Program ExecutionEshgin Hasanov, Md. Mahadi Hassan, Santu Karmaker, Aashish YadavallyACL 2026
Builds on4
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
- TRACED: Execution-aware Pre-training for Source CodeYangruibo Ding, Benjamin Steenhoek, Kexin Pei, Gail E. Kaiser et al.ICSE 2024 · 29 citations
- LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 citations
- (Partial) Program Dependence LearningAashish Yadavally, Tien N. Nguyen, Wenbo Wang, Shaohua WangICSE 2023 · 6 citations
Related papers
- A Learning-Based Approach to Static Program SlicingAashish Yadavally, Yi Li, Shaohua Wang, Tien N. NguyenOOPSLA 2024 · 15 citations
- Blended Analysis for Predictive ExecutionYi Li, Hridya Dhulipala, Aashish Yadavally, Xiaokai Rong et al.FSE 2025 · 1 citation
- Bolt-on, Compact, and Rapid Program Slicing for Notebooks [Scalable Data Science]Shreya Shankar, Stephen Macke, Sarah E. Chasins, Andrew Head et al.VLDB 2022 · 17 citations
- 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 citation
