Formal verification tools

Hand-drawn terracotta outlines of a square mesh, a ring, a tilted bar, a comb and a pointed oval, scattered at different heights over flowing cream, sand, umber and moss contour lines.

Formal verification tools check programs, or models of systems, against a stated property by mathematical reasoning rather than by running tests. What a “no problem found” result means depends on the kind of tool: a proof, a proof up to a limit, or a sound approximation that may raise false alarms. Disputes concern whether results from different tools can be compared, how far the solvers underneath can be trusted, and what a deployment shows compared with a pilot. Tools that check proofs written by hand, such as Lean and Rocq, are covered in Proof assistants; what verification establishes in general is in Formal verification. Specification languages meant to be easier to write than TLA+, such as FizzBee and Quint, are covered in FizzBee and similar specification tools.

Tool families and what their results mean

The families answer different questions, so a result means something different in each. An auto-active verifier checks source code against annotations with an automatic solver, a model checker explores the states of a model, bounded checking limits the paths it considers, and abstract interpretation reasons about an approximation of program behaviour (Beyer et al., 2022; Biere et al., 1999; Cousot & Cousot, 1977).

Many of these tools hand their proof conditions to an SMT solver, a program that decides whether a logical formula can be satisfied (Barbosa et al., 2022). Solver reliability is taken up below.

FamilyWhat it examinesWhat a result establishesExamples
Auto-active verifiersSource code with contracts and hintsThe code meets its contract for all inputs, if the solver finds the proofDafny, Verus, F*, SPARK, Frama-C WP, KeY
Explicit-state model checkersA finite model of a systemThe property holds in every reachable state of that modelTLC, SPIN
Symbolic and relational model checkersA model, encoded for SAT or SMTThe property holds up to a bound, or for an infinite-state modelApalache, Alloy, nuXmv
Bounded model checkersCode with loops unrolled to a depthNo assertion fails within that depthCBMC, Kani, ESBMC
Abstract interpretersCode, via an approximationA class of errors is absent, with possible false alarmsAstrée

The families overlap. CPAchecker combines bounded model checking, k-induction and several abstraction methods in one framework (Beyer et al., 2018), and TLA+ offers state exploration, solver-based checking and proof checking for the same specification (Yu et al., 1999; Apalache, n.d.; Cousineau et al., 2012).

Auto-active verifiers

The user writes contracts and hints in the source code, and the solver does the proof. Tools such as Dafny, Frama-C, KeY and VeriFast accept a program with inline contracts or assertions, and the user steers the proof by adding further annotations (Beyer et al., 2022).

The tools differ mainly in their language and in which provers they call. Dafny relies on Boogie and Z3, SPARK Pro on the solvers cvc5, Z3 and Alt-Ergo, and Frama-C’s WP plug-in on automated provers and proof assistants (the dafny-lang community, n.d.; AdaCore, n.d.; Frama-C, n.d.).

Some code verified with these tools has been reported in use, but the sources differ in how firmly they show it. Python 3.12’s hashlib module falls back to verified HACL* code for some hash algorithms that the linked OpenSSL lacks (Python Software Foundation, n.d.). Mozilla announced that it expected to ship HACL* in Firefox 57 (Beurdouche, 2017) (see Verifying encryption code), and the F* project documents generated message validators in Hyper-V’s networking stack (Microsoft Research & the F* community, n.d.). For iFACTS, a UK air traffic control system in SPARK Ada, the source records the start of the project, not its outcome (AdaCore, 2007).

Verifiers for Rust

Rust verifiers build on the language’s ownership rules, and differ in how they represent mutation and which prover does the work. Verus uses linear types and borrow checking to express ownership in proofs (Microsoft Research, n.d.), while Creusot describes mutation with prophecies, which refer to the value a borrowed location will hold later (Denis et al., 2022). Verus checks its conditions with Z3, Creusot translates Rust for Why3, Prusti for Viper, and Aeneas into pure functions for a theorem prover (Verus, n.d.; Creusot project, n.d.; Astrauskas et al., 2022; Ho & Protzenko, 2022).

Kani takes a different route: it runs Rust proof harnesses through the CBMC bounded checker, and adds function contracts, loop contracts and quantifiers for proofs beyond a bound (Delmas et al., 2026).

One study on unsafe code links Creusot with Gillian-Rust through an encoding of unsafe-code specifications that Creusot can use but cannot verify itself (Ayoun et al., 2024). For the language itself, see Rust.

TLA+ and its tools

TLA+ is one specification language with several tools, and a result means something different depending on which tool ran. It describes concurrent and reactive systems in temporal logic, first-order logic and set theory (Yu et al., 1999); PlusCal lets users write the algorithm in a programming style and translates it into TLA+ (Lamport, 2024).

The tools differ in how much the user must write and in what a result covers. TLC explores the states of a finite model, and Apalache instead uses an SMT solver to explore bounded executions (Yu et al., 1999; Apalache, n.d.). TLC is largely automatic but checks only a finite instance, while a proof checked by TLAPS can cover arbitrary instances and takes significant user effort to write (Konnov et al., 2022; TLA+ Proof System, n.d.).

Symbolic checking may help as state spaces grow. In the original Apalache evaluation, it performed well on inductive-invariant examples where TLC slowed down (Konnov et al., 2019), and a later encoding gave an order-of-magnitude improvement on a number of benchmarks (Otoni et al., 2023).

Engineers report using TLA+ on their own systems. At AWS, one engineer spent two weeks learning TLA+ and writing a first specification, after which TLC found a known design defect in seconds (Newcombe et al., 2015). For Azure Cosmos DB, a model helped identify two issues in the public documentation, though checking the model against execution traces was impractical given the implementation’s size and complexity (Hackett et al., 2022). The method as applied to distributed systems is covered in Formal verification.

Alloy, SPIN, nuXmv, UPPAAL and P

Each of these model checkers suits a different kind of system. UPPAAL models real-time systems with clocks, P models asynchronous state machines that exchange events, and Alloy checks relational models within a size bound the user sets, using a SAT solver (UPPAAL, n.d.; Desai et al., 2013; AlloyTools, n.d.). SPIN checks models exhaustively or by simulation, and nuXmv handles both finite-state and infinite-state systems (Spin, n.d.; Fondazione Bruno Kessler, n.d.).

The firsthand cases concern real or prototype systems, and one names the limit: the size of the state space. SPIN was used to look for race conditions in NASA’s Curiosity flight software (Holzmann, 2014). UPPAAL proved 47 requirements about a prototype automotive gear controller (Lindahl et al., 2001), and P was used to implement and verify the core of the Windows 8 USB driver stack (Desai et al., 2013). A railway study checked the interlocking of a small Belgian station with NuSMV and reports state-space explosion as the limit for larger stations (Limbree et al., 2016).

Zave compared tools on one protocol. She used Alloy to study whether the Chord ring-maintenance protocol is correct under its published failure assumptions (Zave, 2012). Comparing the tools on Chord, she found Alloy’s graph properties a good fit, while SPIN had an early advantage before a strong enough invariant was known. Automated SPIN checking of the progress property was infeasible because of its computational cost (Zave, 2015).

P has since gained ways to relate models to code: a verification prototype (Mora et al., 2023) and PObserve, which checks a running system’s logs and traces against P monitors (P project, n.d.).

Bounded model checking and abstract interpretation

Bounded checking proves a property only up to a limit, while abstract interpretation covers all executions at the price of false alarms. CBMC unrolls loops in C programs to a chosen depth, so it shows only that assertions cannot fail within that depth (Kroening & Tautschnig, 2014). Documented uses include memory-safety proofs for Amazon FreeRTOS components, checked on every pull request (AWS, n.d.), and Kani on Firecracker and s2n-quic (Kumar, 2023).

An abstract interpreter’s proof comes from the tool and the user’s tuning together. Astrée establishes the absence of runtime errors in C (Delmas & Souyris, 2007), and its team reports a complete automatic proof for the Airbus A340 primary flight-control software in November 2003 (Astree, n.d.). Airbus engineers add that a first run on such code usually leaves false alarms, which the user investigates while tuning the tool (Delmas & Souyris, 2007).

SMT solvers inside the tools

The solvers and verifiers have had soundness bugs, which limits what a “verified” result can show. One testing campaign reported 27 critical soundness bugs in the CVC4 solver (Winterer et al., 2020). Dafny’s compiler and verifier have both had soundness bugs, and one team has built a verified verification-condition generator and compiler for a subset of Dafny (Nezamabadi et al., 2026).

Solvers can also be unstable: a valid program may fail to verify after a small change or a solver upgrade. Across 17,043 queries from six projects, the newest solver version was unstable on 2.6% of them, and on 5.0% in one project (Zhou et al., 2023). Every Dafny-based project was less stable on newer Z3 versions (Zhou et al., 2023). A preprocessor improved stability by 29% on Z3 and 41% on cvc5 in the queries tested (Zhou et al., 2024b).

Comparisons and competitions

Rankings of verification tools depend on the task, the scoring rules and the proof scope, and rest on competitions and one port, so they do not settle which tool is better. In SV-COMP 2025’s reachability category, ESBMC-kind solved more tasks than CPAchecker (6,830 against 6,653), yet CPAchecker scored higher, because a wrong “correct” verdict costs 32 points and a right one earns two (Beyer & Strejcek, 2025). At VerifyThis 2019, the organizers note that the specification a team chooses can change how hard a proof is, and that the human work of encoding programs and invariants is part of what the competition measures (Dross et al., 2021).

One direct comparison has caveats. The Verus authors report that their port of the IronKV system took 4,509 proof lines and 41 seconds on one core, against 8,070 lines and 445 seconds in Dafny (Lattuada et al., 2024). But the port skipped the protocol-level proof and the authors implemented some improvements that Verus enabled (Lattuada et al., 2024), and it measures checking speed and proof size, not developer hours.

Using the tools Weak evidence: few or small studies support this

Debugging failed proofs and keeping them stable are part of the work. An interview study of 14 experienced engineers who had used auto-active verifiers such as Dafny identifies debugging failed attempts and hardening proofs against changes in SMT solver heuristics as parts of verified development (Mugnier et al., 2025). Some of that debugging can be automated: one tool turns 16 of Dafny’s 29 suggested manual rewrites into automatic actions for Verus (Cho et al., 2024).

Proofs also add code. In ten Dafny cases, specification and verification code was about 1.14 times the size of the implementation and tests (Faria & Abreu, 2023).

Language models can write some proof annotations, with results that depend on the task given. On DafnyBench, 782 programs, the best model tested succeeded about 68% of the time (Loughridge et al., 2025). AutoVerus produced verified annotations for 137 of 150 Verus tasks (91.3%), but it was given the Rust code and its specification (Yang et al., 2025b).

Combining proofs and tests

Some projects prove properties of a model and then test that the code matches it. Cedar’s team proved key correctness and security properties of an executable model in Lean, then used differential random testing to check the Rust production code against it (Disselkoen et al., 2024). Proof work found four bugs in the policy validator, and testing found another 21 (Disselkoen et al., 2024). The Lean side is described in Proof assistants.

Anvil instead checks the controller code itself. It is a Rust framework for checking controller implementations, and its authors describe verified ZooKeeper, RabbitMQ and FluentBit controllers as readily deployable on Kubernetes (Sun et al., 2024a).

Further reading

Known gaps

What this article cannot tell you yet.

  1. The developer hours needed to maintain proofs in Dafny or Verus have not been measured; the interview study reports practices, not time.
  2. Deployment status of several cases (iFACTS, the Anvil controllers, HACL* in Firefox) rests on announcements and project documents, not on reports of long-run operation.
  3. Comparisons between tools come from competitions and from one author’s port of one system; no controlled study compares tools on the same task with the same team.
  4. The AI benchmarks covered here are for Dafny and Verus only, and they do not report how often generated proofs are accepted by developers.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 61 references