SpecMind:一种受认知启发的、用于后置条件推断的交互式多轮对话框架 / SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference
1️⃣ 一句话总结
这篇论文提出了一个名为SpecMind的新框架,它让大型语言模型像人类一样通过多轮交互和探索性尝试来逐步推理和改进程序的后置条件,从而比传统单次生成方法更准确、更完整地自动生成程序规范。
Specifications are vital for ensuring program correctness, yet writing them manually remains challenging and time-intensive. Recent large language model (LLM)-based methods have shown successes in generating specifications such as postconditions, but existing single-pass prompting often yields inaccurate results. In this paper, we present SpecMind, a novel framework for postcondition generation that treats LLMs as interactive and exploratory reasoners rather than one-shot generators. SpecMind employs feedback-driven multi-turn prompting approaches, enabling the model to iteratively refine candidate postconditions by incorporating implicit and explicit correctness feedback, while autonomously deciding when to stop. This process fosters deeper code comprehension and improves alignment with true program behavior via exploratory attempts. Our empirical evaluation shows that SpecMind significantly outperforms state-of-the-art approaches in both accuracy and completeness of generated postconditions.
SpecMind:一种受认知启发的、用于后置条件推断的交互式多轮对话框架 / SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference
这篇论文提出了一个名为SpecMind的新框架,它让大型语言模型像人类一样通过多轮交互和探索性尝试来逐步推理和改进程序的后置条件,从而比传统单次生成方法更准确、更完整地自动生成程序规范。
源自 arXiv: 2602.20610