Saved in:
Bibliographic Details
Main Authors: Zuo, Xinyue, Zhang, Yifan, Wang, Hongshu, Cai, Yufan, Hou, Zhe, Sun, Jing, Dong, Jin Song
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.23675
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915519779569664
author Zuo, Xinyue
Zhang, Yifan
Wang, Hongshu
Cai, Yufan
Hou, Zhe
Sun, Jing
Dong, Jin Song
author_facet Zuo, Xinyue
Zhang, Yifan
Wang, Hongshu
Cai, Yufan
Hou, Zhe
Sun, Jing
Dong, Jin Song
contents 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 Analysis 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_23675
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PAT-Agent: Autoformalization for Model Checking
Zuo, Xinyue
Zhang, Yifan
Wang, Hongshu
Cai, Yufan
Hou, Zhe
Sun, Jing
Dong, Jin Song
Software Engineering
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 Analysis 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.
title PAT-Agent: Autoformalization for Model Checking
topic Software Engineering
url https://arxiv.org/abs/2509.23675