← Latest papers
🤖 AI

Cobblestone: A Divide-and-Conquer Approach for Automating Formal Verification

Cobblestone is a cost-effective, divide-and-conquer framework that leverages large language models to iteratively decompose and verify formal proofs in Coq, successfully automating the verification of complex theorems while guaranteeing soundness despite relying on potentially unsound AI components.

Original authors: Saketh Ram Kasibatla, Arpan Agarwal, Yuriy Brun, Sorin Lerner, Talia Ringer, Emily First

Published 2026-04-08
📖 4 min read☕ Coffee break read

Original authors: Saketh Ram Kasibatla, Arpan Agarwal, Yuriy Brun, Sorin Lerner, Talia Ringer, Emily First

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 solve a massive, incredibly complex jigsaw puzzle. This isn't just any puzzle; it's a proof that a piece of software (like the code running a bank or a plane) is 100% bug-free. In the world of computer science, this is called Formal Verification.

Traditionally, solving this puzzle requires a human genius (a "proof engineer") to spend months or years fitting pieces together, one by one. It's slow, expensive, and exhausting.

Recently, we've tried using AI (specifically Large Language Models, or LLMs) to do this. Think of the AI as a super-fast, super-smart guesser. You ask it, "Here's the puzzle, please solve it!" and it tries to spit out the whole solution in one go.

The Problem:
The AI is good, but not perfect. Sometimes it hallucinates (makes things up), gets stuck, or puts a piece in the wrong spot. If the AI gets one piece wrong in a 1,000-piece puzzle, the whole solution is invalid. Previous tools would just say, "Oops, failed," and try again from scratch, wasting a lot of time and money.

The Solution: Cobblestone
The paper introduces a new tool called Cobblestone. Instead of asking the AI to solve the whole puzzle at once, Cobblestone uses a "Divide and Conquer" strategy.

Here is how Cobblestone works, using a creative analogy:

1. The "Whole Cake" Attempt

First, Cobblestone asks the AI: "Can you bake this whole cake?"
The AI tries to write the entire recipe (the proof) in one go.

  • Scenario A: The AI gets it right! 🎉 Cobblestone says, "Great, done!"
  • Scenario B: The AI makes a mistake. Maybe the frosting is wrong, or the cake collapsed in the middle.

2. The "Fail-Safe" Inspection (The Magic Trick)

In the old days, if the cake collapsed, you'd throw the whole thing away and start over.
Cobblestone is different. It has a special "Fail-Safe Mode." It looks at the AI's messy cake and says:

  • "Okay, the bottom layer is perfect. Keep that."
  • "The middle layer is a bit messy, but the left side is fine."
  • "The top layer is a total disaster. We need to fix only the top."

It doesn't throw away the good parts. It isolates exactly where the AI went wrong.

3. The Recursive "Fix-It" Loop

Now, Cobblestone takes the broken parts (the "sub-goals") and asks the AI to fix just those small pieces.

  • "Hey AI, forget the whole cake. Just tell me how to fix this one crumbly corner."
  • The AI tries again. If it succeeds, Cobblestone snaps that piece back into the main cake.
  • If it fails again, Cobblestone breaks that tiny corner down into even smaller pieces and asks again.

It keeps doing this, breaking big problems into tiny, manageable chunks, until every single piece is correct.

4. The "Hammer" (The Shortcut)

Sometimes, a piece of the puzzle is so simple that the AI doesn't even need to guess. Cobblestone has a tool called CoqHammer. Think of this as a magic hammer that can instantly smash simple problems into solved pieces. Cobblestone uses this hammer whenever it can, saving the AI's brainpower for the really hard parts.

Why is this a big deal?

  • It's Cheaper: The paper says running Cobblestone costs about $1.25 per theorem and takes about 15 minutes. That's like buying a coffee to verify a piece of critical software.
  • It's Smarter: It proves more theorems than the best non-AI tools and even beats other AI tools that try to solve the whole thing at once.
  • It's Flexible: If a human expert wants to help, they can say, "Hey, use this specific trick for this part," or "Here is a hint." Cobblestone listens and uses that hint to solve the problem faster.

The Bottom Line

Imagine you are trying to climb a huge, foggy mountain.

  • Old AI tools try to jump to the summit in one giant leap. If they miss, they fall and have to start from the bottom again.
  • Cobblestone is like a climber with a rope and a map. They take a step, check if they are on solid ground, and if they slip, they only slide back a few feet to find a better foothold. They keep the progress they made and only re-climb the part they slipped on.

By breaking the impossible task into small, solvable steps and keeping the good parts, Cobblestone makes it possible to automatically verify complex software with high accuracy and low cost, bringing us closer to bug-free software for everyone.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →