Can Large Language Models Reason about Program Invariants?
Kexin Pei, David Bieber, Kensen Shi, Charles Sutton, Pengcheng Yin
摘要
Identifying invariants is an important program analysis task with applications towards program understanding, bug finding, vulnerability analysis, and formal verification. Existing tools for identifying program invariants rely on dynamic analysis, requiring traces collected from multiple executions in order to produce reliable invariants. We study the application of large language models to invariant prediction, finding that models trained on source code and fine-tuned for invariant generation can perform invariant prediction as static rather than dynamic analysis. Using a scratchpad approach where invariants are predicted sequentially through a program gives the best performance, finding invariants statically of quality comparable to those obtained by a dynamic analysis tool with access to five program traces.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper38
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language ModelsXinyue Shen, Zeyuan Chen, Michael Backes, Yun Shen 等CCS 2024 · 被引用 132 次
- NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 等ICML 2024 · 被引用 73 次
- CodePlan: Repository-Level Coding using LLMs and PlanningRamakrishna Bairi, Atharv Sonwane, Aditya Kanade, Vageesh D. C. 等FSE 2024 · 被引用 67 次
- Lemur: Integrating Large Language Models in Automated Program VerificationHaoze Wu, Clark W. Barrett, Nina NarodytskaICLR 2024 · 被引用 67 次
- Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationCheng Wen, Jialun Cao, Jie Su, Zhiwu Xu 等CAV 2024 · 被引用 60 次
它引用的顶会 Paper5
- CLN2INV: Learning Loop Invariants with Continuous Logic NetworksGabriel Ryan, Justin Wong, Jianan Yao, Ronghui Gu 等ICLR 2020 · 被引用 72 次
- Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 被引用 51 次
- Learning to Represent Programs with Property SignaturesAugustus Odena, Charles SuttonICLR 2020 · 被引用 34 次
- Representing Partial Programs with Blended Abstract SemanticsMaxwell I. Nye, Yewen Pu, Matthew Bowers, Jacob Andreas 等ICLR 2021 · 被引用 23 次
- Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource DescriptionsDavid Bieber, Rishab Goel, Daniel Zheng, Hugo Larochelle 等ICLR 2023 · 被引用 2 次
相关 Paper
- LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceGuangyuan Wu, Weining Cao, Yuan Yao, Hengfeng Wei 等ASE 2024 · 被引用 9 次
- Not All Invariants Are Equal: Curating Training Data to Accelerate Program Verification with SLMsIdo Pinto, Yizhak Elboher, Haoze Wu, Nina Narodytska 等ICML 2026 · 被引用 1 次
- Towards More Accurate Static Analysis for Taint-Style Bug Detection in Linux KernelHaonan Li, Hang Zhang, Kexin Pei, Zhiyun QianASE 2025 · 被引用 5 次
- NESA: Relational Neuro-Symbolic Static Program AnalysisChengpeng Wang, Yifei Gao, Wuqi Zhang, Xuwei Liu 等FSE 2026 · 被引用 1 次
- Planning a Large Language Model for Static Detection of Runtime Errors in Code SnippetsSmit Patel, Aashish Yadavally, Hridya Dhulipala, Tien N. NguyenICSE 2025 · 被引用 1 次
