Prove It Before You Build It: The Engineering Case for AI-Assisted Formal Verification

Proving a design correct before you build it is about to become one of the clearest returns on investment in engineering. It is also, I believe, the safest place for an engineering organization to start using AI.

This post is written for working engineers: the people who write the RTL, the control code, the protocol, the firmware, or the safety case. It explains what formal verification is, why AI changes its economics now, where its limits are, and how to run a small pilot that produces numbers your manager can act on.

The argument rests on one structural fact. Most AI deployments fail quietly, because a fluent wrong answer looks exactly like a right one. Formal verification is the rare setting where that failure mode is closed by construction: the AI may propose anything, but a mechanical checker decides what is accepted.

The baseline: verification is already the bottleneck

The cost of finding defects late is not a new observation, but the current numbers are worth stating precisely.

Chips. The 2024 Wilson Research Group functional verification study, run with Siemens EDA, reported that only about 14% of IC/ASIC projects achieved first-silicon success, down from roughly a quarter in earlier surveys. Logic and functional flaws remain the leading cause of re-spins. The same study series has long shown verification consuming more than half of chip project time, and verification engineers outnumbering design engineers on many teams. At advanced process nodes, a mask set and the schedule slip behind a single re-spin can cost tens of millions of dollars.

Requirements. NASA’s 2004 study “Error Cost Escalation Through the Project Life Cycle” (Stecklein et al.) estimated that a requirements error found during operations costs 29 to more than 1,500 times as much to fix as one found during the requirements phase. The spread is wide because the multiplier depends on how deeply the error has been built into hardware, software, and test.

Software in the field. On July 19, 2024, a faulty content update to CrowdStrike’s Falcon sensor crashed roughly 8.5 million Windows machines. The insurer Parametrix estimated direct losses to the U.S. Fortune 500, excluding Microsoft, at about $5.4 billion. CrowdStrike’s root-cause analysis described a mismatch between the number of input fields a template defined and the number the sensor’s interpreter expected, leading to an out-of-bounds memory read in kernel mode.

That last example matters for this argument. An out-of-bounds read caused by a count mismatch is precisely the class of defect that bounds checking, model checking, and SMT-based verification are designed to rule out, for every possible input rather than the inputs a test suite happened to try.

The common thread is that engineering organizations already spend most of their schedule establishing confidence, and still ship defects whose cost is measured in orders of magnitude. The question is not whether verification is worth paying for. It is whether we are buying it at the right point in the life cycle and with the right tools.

What formal verification actually is

Testing samples the input space; formal verification reasons about all of it. A test shows that a design behaves correctly for the cases you ran. A formal proof shows that a stated property holds for every input and every reachable state, or produces a concrete counterexample showing how it fails.

Dijkstra put the limitation of testing plainly in 1970: testing can show the presence of bugs, but never their absence. For a 64-bit adder the input space is 2128 pairs. No simulation farm covers that. A solver can decide the property symbolically in seconds.

Three families of technique do most of the industrial work:

TechniqueWhat it doesAutomationTypical use
SMT solvingDecides whether a set of logical and arithmetic constraints can be satisfied, and returns a witness if soFully automatic within supported theoriesBounds and overflow checks, policy analysis, symbolic execution, the engine inside other tools
Model checkingExplores every reachable state of a finite system against safety and liveness propertiesAutomatic, limited by state-space sizeHardware blocks, protocols, concurrent and distributed algorithms
Interactive theorem provingChecks a human- or machine-written proof step by step against a small trusted kernelManual or AI-assisted, with automated tacticsUnbounded properties, algorithms, mathematics, high-assurance kernels and compilers

Two terms matter when you read vendor claims. Bounded model checking proves a property only up to N steps, which finds bugs quickly but proves nothing beyond the bound. Unbounded methods, such as k-induction, IC3/PDR, or a theorem-prover proof, establish the property for all time and all sizes. When someone says a design was “formally verified,” ask which one they mean.

The output that engineers value most is often not the proof but the counterexample. A model checker that finds a violation hands you the exact sequence of inputs and states that reaches it, frequently a corner case no test plan would have contained.

Why AI changes the economics now

Formal methods have worked for decades. They stayed niche because writing specifications, assertions, invariants, and proofs required scarce experts and a great deal of their time. That labor cost, not the solvers, was the bottleneck.

Large language models attack exactly that cost. They are good at turning a natural-language requirement into a candidate SystemVerilog assertion, a TLA+ invariant, a Lean theorem statement, or a proof script, and at iterating when a tool rejects the attempt. Google DeepMind’s AlphaProof and AlphaGeometry 2 together reached silver-medal standard at the 2024 International Mathematical Olympiad, with AlphaProof generating proofs that Lean checked. The same propose-and-check pattern now appears in hardware assertion generation and in AI-assisted proof engineering for software.

The key property is an asymmetry between generation and verification:

  • Generation is uncertain. A model’s proof attempt may be wrong, and it may be wrong fluently.
  • Checking is not. A proof checker or model checker either accepts the artifact or rejects it, and a rejection usually comes with a reason or a counterexample.
  • Failure is cheap and visible. A bad attempt costs some compute and a retry. It never silently enters the product.

This is why I call formal verification the safest place to start an AI program. In most AI deployments, such as summarization, drafting, or search, the cost of a wrong answer depends on whether a human happens to notice it. Here the checker notices every time. The AI can be aggressive, because it cannot be trusted and does not need to be.

It also changes the shape of the labor. Instead of a verification expert writing every property by hand, the expert reviews and approves properties the AI drafted from requirements. Review is faster than authorship, and it puts senior judgment where it matters most: deciding what must be true.

The honest limit: a proof is only as good as its specification

A checker certifies that the design satisfies the specification. It cannot certify that the specification says what you meant. This is the most important caveat in the field, and it is sharper when an AI drafts the specification.

The failure looks like this. A requirement says the controller must never command more than 40 A. The AI writes an assertion over the commanded current, but against a signal that is clamped downstream, or under an assumption that quietly excludes the fault mode you cared about. The proof succeeds. The property is true. It just is not the property you needed.

Three practices keep this risk under control:

  • Engineers own the properties. The AI drafts; a domain engineer approves each property and each assumption, in the same way a lead reviews a design change. The approval is the engineering decision.
  • Check the assumptions with cover properties. Over-constrained assumptions make proofs vacuously true. Asking the tool to demonstrate that key states are still reachable (cover in SystemVerilog and SymbiYosys) exposes an environment that rules out the interesting behavior.
  • Mutate the design. Deliberately inject a bug the property should catch. If the proof still passes, the property is too weak. This is cheap and should be routine in any pilot.

This limit connects directly to the NASA figure above. Requirements errors are the most expensive kind, and no checker finds them automatically. What formal methods do is force requirements into a precise form early, where ambiguity becomes visible. Writing a property you can prove is itself a requirements review.

The toolchain, with worked examples

Much of the core tooling is free and open source, and mature enough to use in a pilot. The examples below are deliberately small, so the pattern is visible: state a property, let the tool search every case, and read the answer.

ToolCategoryBest fitHome
Z3SMT solver (Microsoft Research)Bounds, arithmetic, policy and configuration checks; engine inside other toolsZ3 Guide
TLA+Specification language + TLC model checkerProtocols, concurrency, distributed and fault-tolerant designsTLA+ Foundation
LeanInteractive theorem proverUnbounded proofs, algorithms, control and safety arguments, AI-generated proofsLean
SymbiYosysFormal hardware verification front-end (YosysHQ)Verilog RTL blocks, FPGA logic, interface controllersSymbiYosys

Z3: ruling out an out-of-bounds read

The sketch below models the CrowdStrike class of defect: an interpreter allocates 20 fields, but a loop reads as many fields as the input claims to have. Z3 is asked to find any index that is read and out of bounds.

from z3 import Ints, Solver, And

i, count = Ints('i count')
N = 20  # fields the interpreter allocates

s = Solver()
s.add(And(0 <= i, i < count))  # the loop reads fields 0..count-1
s.add(i >= N)  # violation: index past the allocation
print(s.check())  # sat: a violating input exists
print(s.model())  # e.g. count = 21, i = 20

s.add(count <= N)  # add the input validation
print(s.check())  # unsat: no out-of-bounds read is possible

sat is a counterexample; unsat after adding the guard is a proof over all integer inputs, not a sample of them.

TLA+: a design property before any code exists

TLA+ describes a system as a state machine and checks properties across every interleaving. Here, a bounded queue must never exceed its capacity, whatever the order of operations.

---- MODULE BoundedQueue ----
EXTENDS Naturals, Sequences
CONSTANT Cap
VARIABLE q

Init == q = <<>>
Enq(x) == Len(q) < Cap /\ q' = Append(q, x)
Deq == q # <<>> /\ q' = Tail(q)
Next == (\E x \in 1..3 : Enq(x)) \/ Deq

NoOverflow == Len(q) <= Cap  \* invariant checked by TLC
====

Delete the Len(q) < Cap guard and TLC returns the shortest trace that overflows the queue. In a real protocol, those traces routinely run to dozens of steps: AWS reported a DynamoDB bug that needed a 35-step trace to reproduce, found by TLA+ after passing extensive testing and review.

Lean: a proof that holds for every input

Lean checks proofs against a small trusted kernel. The example returns to the 40 A limit: a clamp function provably never exceeds its upper bound.

import Mathlib

def clamp (lo hi x : Int) : Int := max lo (min hi x)

theorem clamp_le_hi (lo hi x : Int) (h : lo ≤ hi) :
    clamp lo hi x ≤ hi := by
  unfold clamp
  exact max_le h (min_le_left hi x)

The hypothesis h : lo ≤ hi is an assumption a reviewer must approve. Remove it and the theorem is false, which Lean will refuse to accept. That is the spec discipline from the previous section, enforced by the tool.

SymbiYosys: proving an RTL block

For hardware, the same limit is written as an assertion inside the Verilog and proved for every reachable state.

module limiter (input clk, input [7:0] req, output reg [7:0] cmd);
  localparam [7:0] LIMIT = 8'd40;
  initial cmd = 8'd0;
  always @(posedge clk)
    cmd <= (req > LIMIT) ? LIMIT : req;

`ifdef FORMAL
  always @(*) assert (cmd <= LIMIT); // must hold in every reachable state
`endif
endmodule
[options]
mode prove

[engines]
smtbmc z3

[script]
read -formal limiter.v
prep -top limiter

[files]
limiter.v

mode prove asks for an unbounded proof; smtbmc z3 shows Z3 serving as the engine underneath. A failure produces a VCD waveform of the violating sequence.

Where commercial tools fit

Production chip teams mostly use commercial formal tools: Cadence Jasper, Synopsys VC Formal, and Siemens Questa Formal. They offer full SystemVerilog Assertions support, larger capacity, and formal “apps” for connectivity, X-propagation, and security. If your organization already licenses one, use it in the pilot. If not, the open-source stack is enough to measure whether formal finds defects your current flow misses, which is the question the pilot must answer. For software, CBMC and Kani (bounded model checking for C and Rust) and Dafny (verified programming) are also worth knowing.

An ROI model engineers can defend

The return comes from two sources: defects that would have escaped to a later, costlier phase, and verification labor that AI-drafted properties remove. A model you can defend in a design review keeps those separate and makes every assumption visible.

Value = Σ (k = 1 to D) pk × (Clate,k − Cearly,k) + ΔH × r

ROI = (Value − Cpilot) / Cpilot

Here D is the number of real defects the pilot finds that the existing flow had not; pk is the probability that defect k would otherwise have escaped to a later phase; Clate and Cearly are its cost to fix late and now; ΔH is engineering hours saved; and r is the loaded hourly rate.

An illustrative calculation. The numbers below are assumptions to show the arithmetic, not benchmarks. Replace every one with your own.

InputAssumptionBasis
Pilot length13 weeks (520 hours)90-day pilot
Staffing1.0 verification engineer, 0.25 domain engineer, 0.2 formal-methods supportAbout 750 hours total
Loaded rate$150 per hourTypical U.S. engineering range
Tooling and AI model cost$5,000Open-source tools; pilot-scale API usage
Pilot costAbout $120,000750 hours × $150 + $5,000
New defects found4Measured in the pilot
Escape probability0.25 eachEngineering judgment per defect
Late cost vs. early cost$500,000 vs. $5,000100× multiplier, low end of NASA’s range
Avoided costAbout $495,0004 × 0.25 × $495,000

Under those assumptions, ROI is roughly 3×, before counting any labor savings. More useful is the break-even point: the pilot pays for itself if it prevents one escaped defect whose late fix would cost about $120,000. For a board re-spin, a field recall, or a failed certification cycle, that bar is low.

The weakest number in the model is pk, and engineers should say so. The way to make it credible is to classify every defect the pilot finds against one question, asked by the people who own the current flow: would simulation, test, or review have caught this before release? Record the answer and the reasoning. A manager will trust a modest, documented estimate far more than a large unsupported one.

How the returns grow, 2027 to 2032

90-day pilotCut laborFind bugs earlyProof as revenue
Start now2027 to 20282028 to 20302030 to 2032
One component, three properties, measured ROIAI drafts properties; engineers approve. Faster time-to-marketProperties checked on every build. Design-phase costsBuyers expect machine-checked proof. Wins contracts

After the pilot, I expect returns to grow in three phases, each building on the last. The dates are my projection of where the industry is heading, not a forecast with error bars.

2027 to 2028: Cut verification labor. AI drafts assertions, test benches, and formal properties from requirements, and engineers approve them. Because verification already takes more than half of chip project schedules, even modest savings go straight to time-to-market.

2028 to 2030: Catch defects when they are cheapest. Formal properties run on every build, the way unit tests do today. A regression is caught minutes after the change that caused it, at design-phase cost instead of field-failure cost.

2030 to 2032: Turn proof into revenue. Aviation and automotive standards already credit formal proof. As AI lowers its cost, buyers in aerospace, medical, automotive, and critical infrastructure will expect machine-checked evidence. Proof can shorten certification, win contracts, and lower insurance premiums. Companies without it will compete on price.

Designing the 90-day pilot

Start small: one costly component, three critical properties, and 90 days that end in measured numbers. The scope is narrow on purpose. A pilot that tries to verify a whole system will spend its 90 days on infrastructure and report nothing.

Choosing the component. Pick a block where late defects are expensive and the behavior can be stated precisely. Good candidates include an arbiter, FIFO, or bus interface in RTL; a state machine in safety-relevant firmware; a retry, leader-election, or replication protocol; an authorization or configuration policy; or a control limit such as the 40 A example. Prefer a block with a known bug history, because rediscovering past escapes is the fastest way to calibrate the method.

Choosing the three properties. Write them first in plain English, then formally. One should be a safety property (something bad never happens), one an integrity property (data is never lost, duplicated, or corrupted), and one a liveness or progress property (the system eventually responds).

  • Weeks 1 to 3: Set up and baseline. Select the component and properties with the domain owner. Stand up the tools. Record the current flow’s metrics for that block: test count, coverage, open bugs, and escaped-defect history.
  • Weeks 4 to 9: Draft, prove, and review. Use AI to draft properties and assumptions from the requirements; engineers approve or rewrite each one. Run the tools on every change. Log every counterexample, every rejected AI draft, and every hour spent.
  • Weeks 10 to 12: Validate the method. Inject known historical bugs and mutations to confirm the properties catch them. Run cover checks to confirm the assumptions are not vacuous. Classify each new defect by escape probability, as described above.
  • Week 13: Report. Present defects found, defects the current flow would likely have missed, hours spent and saved, and the ROI estimate with its assumptions. End with a clear recommendation: scale, adjust, or stop.

What to measure.

MetricWhy it matters
New defects found that the existing flow missedThe core evidence of value
Escape-probability classification per defectTurns defects into avoided cost
Properties drafted by AI vs. accepted unchanged vs. rewrittenShows the real labor saving and the review burden
Engineer hours per proven propertyBaseline for scaling estimates
Proof runtime and incremental re-check timeDetermines whether checks can run on every build
Seeded bugs caught / seeded bugs injectedEvidence that the properties are strong, not vacuous

A pilot that finds nothing is still a result, provided the seeded-bug rate is high. It tells you the component was already well tested, and that the next pilot should target a riskier one.

How to make the case to your manager

Managers approve bounded risk with a measurable outcome. Your request should read like an engineering change proposal, not an enthusiasm for a new tool.

Lead with a cost they already feel. Name a real escape: the re-spin, the field fix, the certification finding, the incident review. Then ask what one fewer would have been worth. That number is your break-even target.

Show that the downside is capped. The pilot is 90 days, one component, and a small team. It changes nothing in production. AI output never ships without a checker accepting it and an engineer approving the property it proves. If it finds nothing, you stop with a documented baseline.

Answer the objections before they are raised.

ObjectionResponse
“Formal methods need PhDs.”AI now drafts most properties and proofs. Engineers review them, which is the skill they already have. Part-time formal-methods support covers the rest.
“AI makes things up.”That is why this is the right first use of AI. A checker rejects every wrong proof mechanically.
“It won’t scale to our system.”It does not need to. The pilot targets one high-cost block, and the results tell us where scaling pays.
“We already have good test coverage.”Coverage measures what was exercised, not what is impossible. The pilot measures defects that coverage missed.
“What does it cost?”Mostly engineer time for one quarter. Core tools are open source, and model costs are small at this scale.

Connect it to where the industry is going. Formal methods are already credited in certification. DO-333, the formal methods supplement to DO-178C, allows formal analysis to satisfy avionics software objectives, and ISO 26262 highly recommends formal verification at the highest automotive integrity level. AWS has publicly described automated reasoning as part of how it secures its cloud. Building the capability now is cheaper than catching up when a customer or regulator asks for it.

Ask for something specific. One component, one quarter, named people at stated percentages, and a review date. A specific ask is easy to approve. A general one is easy to postpone.

Where to start

If you are an engineer who has lived through a late, expensive defect, you already understand the argument. The tools are mature, the AI has removed much of the labor barrier, and the checker removes the trust barrier. What remains is a small, well-scoped pilot and the numbers it produces.

RITRE Corporation helps engineering teams take that first step: identifying where verification failures cost the most, designing the pilot, and building the roadmap from there. If you would like to talk it through, send me a message on LinkedIn or reach out through josephfargnoli.com.

One question to take to your next design review: what would one avoided field failure be worth to your company this year?

How this post was written

The ideas, arguments, and roadmap in this post are mine, drawn from my work in engineering and AI. I used Claude, Anthropic’s AI assistant, to help me research, organize, draft, and edit the text and code examples. I reviewed and revised the result, and I am responsible for its content. It seemed only right to say so in a post that argues for using AI with a checker in the loop.

More about Joseph Fargnoli’s background in artificial intelligence and systems engineering is available on his professional profile.

References