Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Not on the map. Why?
Abstract (arXiv)
Static program slicing is a fundamental software engineering technique for isolating code relevant to specific variables. While recent learning-based approaches using language models (LMs) show promise in automating slice prediction, they suffer from inaccurate dependency modeling and unconstrained generation, where LMs fail to capture precise data flow relations and produce slices containing hallucinated tokens and statements. To address these challenges, we propose Sliceformer, a novel approach that reformulates static program slicing as a sequence-to-sequence task using small language models such as CodeT5+. Sliceformer introduces two key innovations that directly target the identified limitations. First, to improve dependency modeling, we design dataflow-aware pretraining objectives that leverage data flow graphs (DFG) to teach models data dependencies through dataflow-preserving statement permutation and dataflow-aware span corruption. Second, to eliminate hallucination, we develop a constrained decoding mechanism that enforces both lexical and syntactic constraints. We evaluate Sliceformer on Java and Python program slicing benchmarks, demonstrating consistent improvements over state-of-the-art baselines with up to 22% gain in ExactMatch.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 40 references that are in the map. First posted on arXiv 9 Apr 2026.
Builds on
18 of 40 references.
References · 18
- 2023GPT-4 Technical Reportcited by 18,396
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2025Qwen3 Technical Reportcited by 8,820
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2021Document-Level Event Argument Extraction by Conditional Generationcited by 155
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
6 more
- 2016Modeling Coverage for Neural Machine Translationcited by 110
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 93
- 2022Conditional Generation with a Question-Answering Blueprintcited by 44
- 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understandingcited by 33
- 2023On the Evaluation of Neural Code Translation: Taxonomy and Benchmarkcited by 23
- 2024Rectifier: Code Translation with Corrector via LLMscited by 20
Built on by
Not cited yet.