Towards Language Model Guided TLA+ Proof Automation
This paper introduces a prompt-based approach that leverages large language models to guide the hierarchical decomposition of TLA+ proof obligations into simpler sub-claims for symbolic verification, thereby overcoming structural challenges and outperforming baseline methods on a new benchmark of 119 theorems.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to build a massive, intricate castle out of LEGOs. You have a very strict set of blueprints (the TLA+ language) that ensures the castle won't fall down. However, building this castle by hand is incredibly difficult. You need to be a master architect to figure out exactly which brick goes where, and if you make a tiny mistake, the whole structure is invalid.
This is the world of Formal Verification. It's like having a super-strict inspector who checks every single brick to make sure your system (like a bank app or a self-driving car) is perfectly safe. But right now, getting that inspector to sign off on your work requires a human expert to spend hours or days writing the proof.
Enter Large Language Models (LLMs)—the AI "brain" that has read almost everything on the internet. You might think, "Let's just ask the AI to build the castle for us!"
The Problem: The AI Gets Confused by the Blueprints
The researchers in this paper tried asking the AI to write the proof all at once, like asking a student to write a 50-page essay in one sitting. It didn't work well. Here's why:
- The Wrong Style: Most AI models are trained on "Tactic-based" proof systems (like Lean or Coq). Think of these like a video game. You give the AI a command ("Jump," "Attack," "Open Door"), and the game state changes step-by-step until you win.
- The TLA+ Difference: TLA+ is not a video game; it's more like writing a legal contract or a family tree. You don't give step-by-step commands. Instead, you say, "To prove the main point (the Goal), I need to prove these three smaller points (Sub-claims). And to prove those, I need to prove these even smaller points." It's a hierarchical tree of logic.
When the AI tried to write a TLA+ proof, it got confused. It tried to play the "video game" style in a "legal contract" world. It used the wrong words, mixed up symbols, and created sentences that the strict inspector (the TLAPS software) couldn't even read. It was like trying to pay for groceries with Monopoly money.
The Solution: The "Architect and the Mason" Strategy
The authors, Yuhao Zhou and Stavros Tripakis, came up with a clever new way to use the AI. They realized the AI is great at big-picture thinking but bad at tiny, precise details.
So, they created a system called LMGPA (Language Model Guided Proof Automation) that acts like a construction team with two distinct roles:
1. The AI Architect (The Brain)
Instead of asking the AI to build the whole castle, they ask it to draw the blueprint.
- The Task: "Here is a big, scary problem. Break it down into three smaller, easier problems that, if solved, will prove the big one."
- The Trick: The researchers forced the AI to speak a very specific, simplified language. They told it: "Don't write the whole proof. Just give me the names of the sub-problems and the rules for them. Stick to this strict format."
- The Result: This stops the AI from making syntax errors. It's like telling a chef, "Don't cook the whole meal; just tell me the ingredients list."
2. The Symbolic Mason (The Robot)
Once the AI draws the blueprint (the sub-claims), the system hands the actual construction to a Symbolic Prover (a piece of software called TLAPS).
- The Task: The robot checks if the AI's blueprint makes sense. "Does proving A and B actually lead to C?"
- The Verification: If the blueprint is good, the robot tries to solve the small sub-problems automatically. If a sub-problem is too hard, the robot asks the AI Architect to break that one down further.
The "Recursive" Loop
This process happens recursively (like a set of Russian nesting dolls):
- AI breaks a big problem into medium problems.
- Robot checks if the medium problems are valid.
- If a medium problem is still too hard, the AI breaks it into small problems.
- The Robot tries to solve the small problems instantly.
- If the robot succeeds, the whole chain is locked in place, and the proof is complete!
The Results: A Winning Team
The researchers tested this on 119 different mathematical puzzles and distributed system protocols (like rules for how computers talk to each other).
- The Old Way (AI alone): The AI tried to write the whole proof and failed most of the time because of syntax errors and confusion.
- The New Way (AI + Robot): By splitting the work, their system solved significantly more problems than the AI alone or the robot alone.
The Analogy in a Nutshell
Imagine you are trying to solve a giant, 1,000-piece jigsaw puzzle.
- The AI is a genius who can look at the picture on the box and say, "Okay, the sky goes here, the ocean goes there, and the boat goes in the middle." It's great at the strategy.
- The Symbolic Prover is a robot with perfect eyesight that can instantly snap two puzzle pieces together if they fit perfectly. It's great at the execution.
If you ask the AI to pick up the pieces and snap them together, it will fumble and drop them (syntax errors). If you ask the robot to figure out the picture, it will stare at the box and do nothing (it lacks creativity).
This paper's breakthrough was realizing that if you let the AI plan the strategy (break the puzzle into sections) and let the robot do the snapping (verify the pieces), you can build the whole castle much faster and with fewer mistakes.
Why This Matters
This isn't just about math puzzles. It's about making our digital world safer. By making it easier to prove that complex systems (like banking software or medical devices) are bug-free, we can trust them more. This new method lowers the barrier, allowing more engineers to use these powerful safety checks without needing to be PhD-level mathematicians.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.