LPR: Large Language Models-Aided Program Reduction
Mengxiao Zhang, Yongqiang Tian, Zhenyang Xu, Yiwen Dong, Shin Hwei Tan, Chengnian Sun
Abstract
Program reduction is a widely used technique to facilitate debugging compilers by automatically minimizing programs that trigger compiler bugs. Existing program reduction techniques are either generic to a wide range of languages (such as Perses and Vulcan) or specifically optimized for one certain language by exploiting language-specific knowledge (e.g., C-Reduce). However, synergistically combining both generality across languages and optimality to a specific language in program reduction is yet to be explored. This paper proposes LPR, the first LLMs-aided technique leveraging LLMs to perform language-specific program reduction for multiple languages. The key insight is to utilize both the language generality of program reducers such as Perses and the languagespecific semantics learned by LLMs. Concretely, language-generic program reducers can efficiently reduce programs into a small size that is suitable for LLMs to process; LLMs can effectively transform programs via the learned semantics to create new reduction opportunities for the language-generic program reducers to further reduce the programs. Our thorough evaluation on 50 benchmarks across three programming languages (i.e., C, Rust and JavaScript) has demonstrated LPR's practicality and superiority over Vulcan, the state-of-the-art language-generic program reducer. For effectiveness, LPR surpasses Vulcan by producing 24.93%, 4.47%, and 11.71% smaller programs on benchmarks in C, Rust and JavaScript, separately. Moreover, LPR and Vulcan have the potential to complement each other. For the C language for which C-Reduce is optimized, by applying Vulcan to the output produced by LPR, we can attain program sizes that are on par with those achieved by C-Reduce. For efficiency perceived by users, LPR is more efficient when reducing large and complex programs, taking 10.77%, 34.88%, 36.96% less time than Vulcan to finish all the benchmarks in C, Rust and JavaScript, separately. CCS CONCEPTS • Software and its engineering → Software testing and debugging.
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.
Cited by top-tier papers10
- Towards Understanding the Bugs in Solidity CompilerHaoyang Ma, Wuqi Zhang, Qingchao Shen, Yongqiang Tian et al.ISSTA 2024 · 9 citations
- WDD: Weighted Delta DebuggingXintong Zhou, Zhenyang Xu, Mengxiao Zhang, Yongqiang Tian et al.ICSE 2025 · 5 citations
- Toward a Better Understanding of Probabilistic Delta DebuggingMengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Xinru Cheng et al.ICSE 2025 · 4 citations
- Towards Diverse Program Transformations for Program SimplificationHaibo Wang, Zezhong Xing, Chengnian Sun, Zheng Wang et al.FSE 2025 · 1 citation
- Boosting Program Reduction with the Missing Piece of Syntax-Guided TransformationsZhenyang Xu, Yongqiang Tian, Mengxiao Zhang, Chengnian SunOOPSLA 2025 · 1 citation
Builds on23
- Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code GenerationJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming ZhangNeurIPS 2023 · 2,317 citations
- Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales et al.ICML 2023 · 970 citations
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language ModelsYinlin Deng, Chunqiu Steven Xia, Haoran Peng, Chenyuan Yang et al.ISSTA 2023 · 253 citations
- HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language ModelsJunyi Li, Xiaoxue Cheng, Xin Zhao, Jian-Yun Nie et al.EMNLP 2023 · 224 citations
Related papers
- Pushing the Limit of 1-Minimality of Language-Agnostic Program ReductionZhenyang Xu, Yongqiang Tian, Mengxiao Zhang, Gaosen Zhao et al.OOPSLA 2023 · 21 citations
- PPR: Pairwise Program ReductionMengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Yu Jiang et al.FSE 2023 · 13 citations
- Latra: A Template-Based Language-Agnostic Transformation Framework for Effective Program ReductionZhenyang Xu, Yiran Wang, Yongqiang Tian, Mengxiao Zhang et al.ASE 2025 · 1 citation
- Type Batched Program ReductionGolnaz Gharachorlu, Nick SumnerISSTA 2023 · 1 citation
- DuoReduce: Bug Isolation for Multi-layer Extensible CompilationJiyuan Wang, Yuxin Qiu, Ben Limpanukorn, Hong Jin Kang et al.FSE 2025
