Lune

ASE2025Top-tier venue

PAT-Agent: Autoformalization for Model Checking

Xinyue Zuo, Yifan Zhang, Hongshu Wang, Yufan Cai, Zhe Hou, Jing Sun, Jin Song Dong

Abstract

Recent advances in large language models (LLMs) offer promising potential for automating formal methods. However, applying them to formal verification remains challenging due to the complexity of specification languages, the risk of hallucinated output, and the semantic gap between natural language and formal logic. We introduce PAT-Agent, an end-to-end framework for natural language autoformalization and formal model repair that combines the generative capabilities of LLMs with the rigor of formal verification to automate the construction of verifiable formal models. In PAT-Agent, a Planning LLM first extracts key modeling elements and generates a detailed plan using semantic prompts, which then guides a Code Generation LLM to synthesize syntactically correct and semantically faithful formal models. The resulting code is verified using the Process Anal y sis Toolkit (PAT) model checker against user-specified properties, and when discrepancies occur, a Repair Loop is triggered to iteratively correct the model using counterexamples. To improve flexibility, we built a web-based interface that enables users, particularly non-FM-experts, to describe, customize, and verify system behaviors through user-LLM interactions. Experimental results on 40 systems show that PAT-Agent consistently outperforms baselines, achieving high verification success with superior efficiency. The ablation studies confirm the importance of both planning and repair components, and the user study demonstrates that our interface is accessible and supports effective formal modeling, even for users with limited formal methods experience.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification cites Lemur: Integrating Large Language Models in Automated Program Verification
  • Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification cites Baldur: Whole-Proof Generation and Repair with Large Language Models
  • SysMoBench: Evaluating AI on Formally Specifying Complex Real-World Systems cites Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification
  • Lemur: Integrating Large Language Models in Automated Program Verification cites Baldur: Whole-Proof Generation and Repair with Large Language Models
  • Event-B Agent: Towards LLM Agent for Formal Model Synthesis and Repair cites Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification
  • Event-B Agent: Towards LLM Agent for Formal Model Synthesis and Repair cites Lemur: Integrating Large Language Models in Automated Program Verification
  • Event-B Agent: Towards LLM Agent for Formal Model Synthesis and Repair cites Baldur: Whole-Proof Generation and Repair with Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. SysMoBench: Evaluating AI on Formally Specifying Complex Real-World SystemsQian Cheng, Ruize Tang, Emilie Ma, Finn Hackett et al.ICLR 2026 · 1 citation
  2. Validating Formal Specifications with LLM-Generated Test CasesAlcino Cunha, Nuno MacedoFM 2026 · 1 citation
  3. Agentic Verification of Software SystemsHaoxin Tu, Huan Zhao, Yahui Song, Mehtab Zafar et al.FSE 2026 · 1 citation
  4. Event-B Agent: Towards LLM Agent for Formal Model Synthesis and RepairHongshu Wang, Xinyue Zuo, Yuhan Sun, Qin Li et al.FSE 2026

Builds on8

  1. ProofWriter: Generating Implications, Proofs, and Abductive Statements over Natural LanguageOyvind Tafjord, Bhavana Dalvi, Peter ClarkACL Findings 2021 · 122 citations
  2. Baldur: Whole-Proof Generation and Repair with Large Language ModelsEmily First, Markus N. Rabe, Talia Ringer, Yuriy BrunFSE 2023 · 89 citations
  3. Lemur: Integrating Large Language Models in Automated Program VerificationHaoze Wu, Clark W. Barrett, Nina NarodytskaICLR 2024 · 67 citations
  4. Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationCheng Wen, Jialun Cao, Jie Su, Zhiwu Xu et al.CAV 2024 · 60 citations
  5. Compilable Neural Code Generation with Compiler FeedbackXin Wang, Yasheng Wang, Yao Wan, Fei Mi et al.ACL Findings 2022 · 46 citations

Related papers

  1. ExVerus: Verus Proof Repair via Counterexample ReasoningJun Yang, Yuechun Sun, Yi Wu, Rodrigo Caridad et al.ICML 2026 · 3 citations
  2. A Tale of 1001 LoC: Potential Runtime Error-Guided Specification Synthesis for Verifying Large-Scale ProgramsZhongyi Wang, Tengjie Lin, Mingshuai Chen, Haokun Li et al.OOPSLA 2026 · 1 citation
  3. PATCHAGENT: A Practical Program Repair Agent Mimicking Human ExpertiseZheng Yu, Ziyi Guo, Yuhang Wu, Jiahao Yu et al.USENIX Security 2025
  4. SpecMAS: A Multi-Agent System for Self-Verifying System Generation via Formal Model CheckingRishabh Agrawal, Kaushik T. Ranade, Aja Khanal, Kalyan S. Basu et al.NeurIPS 2025 · 1 citation
  5. AutoML-Agent: A Multi-Agent LLM Framework for Full-Pipeline AutoMLPatara Trirat, Wonyong Jeong, Sung Ju HwangICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines