TLA+ has supported industrial verification at companies such as Amazon and Microsoft, yet writing correct TLA+ specifications from natural language still requires time and expertise, which limits adoption. LLMs show promise, but no prior study measures whether they produce semantically correct TLA+ specifications from natural language. This paper presents the first systematic evaluation of LLM-based TLA+ specification synthesis from natural language. Our study evaluates 30 LLMs across eight families on a curated dataset of 205 TLA+ specifications: 25 open-weight models across four prompting strategies (2,600 runs) and 5 proprietary models under few-shot prompting (130 runs), all validated by the SANY parser and TLC model checker. LLMs achieve up to 26.6% syntactic correctness but only 8.6% semantic correctness, with successes exclusive to progressive prompting. Results show that model size does not predict quality, e.g., DeepSeek r1:8b outperforms its 70B variant across all strategies, which suggests the importance of reasoning alignment for formal languages. Code-specialized models consistently underperform due to negative transfer from mainstream language training. We identify five recurring hallucination categories, all traceable to specific training data biases. These results suggest that current LLMs do not generate reliable TLA+ specifications without expert oversight. We release the evaluation framework, code, and dataset to support reproducibility and future research.
ModelWisdom: An Integrated Toolkit for TLA+ Model Visualization, Digest and Repair
State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China(新型软件技术国家重点实验室,南京大学,中国);Department of Computer Science and Engineering, The Hong Kong University of Science and Technology(香港科学与技术大学计算机科学与工程系)
Specula: Scaling formal specifications for autonomous model checking of system code
Nanjing University(南京大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Microsoft Research Asia(微软亚洲研究院);University of British Columbia(不列颠哥伦比亚大学)
SysMoBench: Evaluating AI on Formally Modeling Complex Real-World Systems
Nanjing University(南京大学);Microsoft Research Asia(微软亚洲研究院);University of British Columbia(不列颠哥伦比亚大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
From Informal to Formal -- Incorporating and Evaluating LLMs on Natural Language Requirements to Verifiable Formal Proofs
The Hong Kong University of Science and Technology(香港科学与技术大学);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);Guangzhou Institute of Technology, Xidian University(西安电子科技大学广州研究院);Chongqing University(重庆大学);ICTT and ISN Laboratory, Xidian University(西安电子科技大学ICTT和ISN实验室)
Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Induction
The Pennsylvania State University(宾夕法尼亚州立大学);University of the Chinese Academy of Sciences(中国科学院大学);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所)