SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 12 of its 62 references that are in the map. First posted on arXiv 24 Feb 2026.
Builds on
12 of 62 references.
References · 12
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2020Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformerscited by 30
- 2023Can Large Language Models Write Good Property-Based Tests?cited by 30
- 2022Using Transfer Learning for Code-Related Taskscited by 18
- 2020Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks (Extended Version)cited by 17
- 2015Learning Invariants using Decision Treescited by 3
Built on by
Citing papers per year: 2026: 2.
2 papers.