跳到主要导航 跳到搜索 跳到主要内容

Automated Postcondition Generation System: A Linguistic-Logical Hybrid Retrieval and Refinement Approach with Fine-Tuned LLMs

  • Institute of Software Engineering
  • East China Normal University
  • National Trusted Embedded Software Engineering Technology Research Center
  • Ltd

科研成果: 书/报告/会议事项章节 › 会议稿件 › 同行评审

摘要

Mapping natural language (NL) docstrings to formal program specifications is essential for software reliability, yet general-purpose LLMs often suffer from logical hallucinations. This paper proposes a methodological framework for automated postcondition generation centering on domain-specific fine-tuning of open-source LLMs. By fine-tuning Qwen2.5-7B-Instruct on a high-quality dataset of 17,007 Python docstring-postcondition pairs, our approach enables models to capture intricate linguistic-logical mappings. We enhance accuracy through a hybrid similarity retrieval mechanism, combining semantic and structural context, and a dual-path feedback loop integrating static symbolic analysis (Z3) with dynamic execution. Experimental results on EvalPlus show that our fine-tuned model achieves a 38.01% Bug-Complete (BC) rate, which further improves to 45.16% under the full framework, surpassing GPT-4. The methodology’s generalizability is validated on Java (HumanEval-X) and real-world bugs (Defects4J). Our work demonstrates that methodologically reinforced open-source models provide a technically viable, privacy-preserving paradigm for automated formal specification generation.

源语言英语
主期刊名Advanced Intelligent Computing Technology and Applications - 22nd International Conference on Intelligent Computing, ICIC 2026, Proceedings
编辑De-Shuang Huang, Chuanlei Zhang, Wei Chen, Yijie Pan, Prashan Premaratne
出版商Springer Science and Business Media Deutschland GmbH
页489-501
页数13
ISBN(印刷版)9789819234349
DOI
出版状态已出版 - 2027
活动22nd International Conference on Intelligent Computing, ICIC 2026 - Toronto, 加拿大
期限: 22 7月 2026 → 26 7月 2026

丛书

姓名Lecture Notes in Computer Science
卷16665 LNAI
ISSN(印刷版)0302-9743
ISSN(电子版)1611-3349

会议

会议22nd International Conference on Intelligent Computing, ICIC 2026
国家/地区加拿大
市Toronto
时期22/07/26 → 26/07/26

学术指纹

探究 'Automated Postcondition Generation System: A Linguistic-Logical Hybrid Retrieval and Refinement Approach with Fine-Tuned LLMs' 的科研主题。它们共同构成独一无二的学术指纹。

引用此