Static verification tools can assure industrial scale software, but require significant human labor to write specifications. This is particularly true of static verifiers based on separation logic (SL verifiers), which excel at verifying heapmanipulating programs, but require many complex auxiliary specifications to reason about heap structure. Recent work applies large language models (LLMs) to generate code, tests, and proofs, including specifications for verifiers, but mostly targeting non-SL verifiers. To address this gap, this paper thoroughly evaluates how well LLMs perform when prompted to generate specifications for verifying 303 C functions with the SL verifier VeriFast. We explored eight prompting approaches, ten LLMs, and three input types in two stages. Quantitative and qualitative analyses are used to assess the LLM-generated code and specifications for functional behavior, verifiability and errors. The results show that LLMs preserve functional behavior in source code and specifications (both over 91%), but achieve modest verification success (31.4%). Using Gemini 2.5 Pro and providing formal contracts lead to higher success rates in our setting. Moreover, most errors (94%) come from LLMs' mistakes in the domainspecific knowledge of SL verifiers such as VeriFast. These findings provide guidance for optimizing LLM-generated specifications for SL verifiers.
Effectiveness of LLM-based Software Diversity for Reliability Improvement -- an Empirical Study
University of Coimbra, CISUC/LASI(科英布拉大学,CISUC/LASI);Centre for Software Reliability(软件可靠性中心);Department of Informatics Engineering(信息工程系);Department of Computer Science(计算机科学系);City St George’s, University of London(伦敦城市圣乔治大学)
An Empirical Study on the Impact of Normalized Use-Case Specifications on Traceability
College of Computer Science and Technology, National University of Defense Technology(国防科技大学计算机学院);State Key Laboratory of Complex & Critical Software Environment(复杂与关键软件环境国家重点实验室)
Beyond Basic Specifications? A Systematic Study of Logical Constructs in LLM-based Specification Generation
School of Computer Science and Technology, Xidian University(西安电子科技大学计算机科学与技术学院);National Key Laboratory of Science and Technology on Information System Security, AMS(信息系统安全国家重点实验室,AMS);Unit 32092 of PLA(中国人民解放军第32092部队);School of Cyber Engineering, Xidian University(西安电子科技大学网络空间安全学院);Systems Engineering Institute, AMS(系统工程研究院,AMS)
From Online User Feedback to Requirements: Evaluating Large Language Models for Classification and Specification Tasks
Lero, the Research Ireland Centre for Software, University of Limerick(利默里克大学软件研究爱尔兰研究中心 Lero);University College Dublin (UCD)(都柏林大学学院);University of Padova(帕多瓦大学)
Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no test oracle and no human code review
Large Language Models for Requirements Engineering: A Cross-Task Empirical Evaluation
University of Limerick(利默里克大学);Trinity College Dublin (TCD)(都柏林三一学院);Consiglio Nazionale delle Ricerche (CNR)(意大利国家研究委员会);University of Padova(帕多瓦大学);The Open University(开放大学)
Scaling Test-Driven Code Generation from Functions to Classes: An Empirical Study
Chengdu Institute of Computer Applications, Chinese Academy of Sciences(中国科学院成都计算机应用研究所);University of Chinese Academy of Sciences(中国科学院大学);Institute of Multidisciplinary Research for Advanced Materials (IMRAM), Tohoku University(东北大学先进材料跨学科研究所);Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);Artificial Intelligence Research Institute, Shenzhen University of Advanced Technology(深圳高等研究院人工智能研究所)
LRASGen: LLM-based RESTful API Specification Generation
Macau University of Science and Technology(澳门科技大学);Macau University of Science and Technology Zhuhai MUST Science and Technology Research Institute(澳门科技大学珠海慕思科学技术研究院);Beihang University(北京航空航天大学);University of Nottingham Ningbo China(宁波诺丁汉大学);China University of Mining and Technology(中国矿业大学)