Beyond Basic Specifications? A Systematic Study of Logical Constructs in LLM-based Specification Generation
Zehan Chen, Long Zhang, Zhiwei Zhang, JingJing Zhang, Ruoyu Zhou, Yulong Shen, JianFeng Ma, Lin Yang

TL;DR
This study systematically investigates how large language models can generate high-level logical constructs for program specifications, demonstrating their capability and benefits in enhancing verification abstraction and robustness.
Contribution
It is the first systematic empirical investigation into LLMs' ability to generate complex logical constructs for specifications, expanding their application scope.
Findings
LLMs can generate valid logical constructs.
Using logical and basic constructs together improves verification robustness.
Two refinement paradigms offer distinct advantages.
Abstract
Formal specifications play a pivotal role in accurately characterizing program behaviors and ensuring software correctness. In recent years, leveraging large language models (LLMs) for the automatic generation of program specifications has emerged as a promising avenue for enhancing verification efficiency. However, existing research has been predominantly confined to generating specifications based on basic syntactic constructs, falling short of meeting the demands for high-level abstraction in complex program verification. Consequently, we propose incorporating logical constructs into existing LLM-based specification generation framework. Nevertheless, there remains a lack of systematic investigation into whether LLMs can effectively generate such complex constructs. To this end, we conduct an empirical study aimed at exploring the impact of various types of syntactic constructs on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFormal Methods in Verification · Software Testing and Debugging Techniques · Model-Driven Software Engineering Techniques
