FVO — Formal Verification Online
📘 Formal verification guide

SAT vs SMT solvers: the engines inside formal verification

9 min read · Updated

This article is part of our formal verification guide, which covers the foundations, model checking, solvers, theorem proving, equivalence checking and industry use cases.

Nearly every automatic formal tool ends up asking a solver a question: "can this formula be true?" SAT solvers answer it for pure Boolean formulas; SMT solvers answer it for formulas over richer data such as bit-vectors, arrays and integers. Understanding the difference helps you understand why some proofs are fast and others never finish.

SAT: Boolean satisfiability

A SAT problem is a Boolean formula, usually in conjunctive normal form (an AND of clauses, each an OR of literals). The solver either finds values for the variables that make every clause true, or reports that none exist.

a tiny SAT problem
(a OR b) AND (NOT a OR c) AND (NOT b OR NOT c)
-> satisfiable, e.g. a = 1, b = 0, c = 1

SAT was the first problem proven NP-complete (Cook, 1971), so no known algorithm is fast on every instance. Yet industrial instances have structure that modern solvers exploit extremely well.

How a CDCL solver works

  1. Decide: pick an unassigned variable and guess a value.
  2. Propagate: clauses with one unassigned literal force that literal (unit propagation).
  3. Conflict: if a clause becomes false, analyse why, and learn a new clause that prevents the same combination of decisions from ever being tried again.
  4. Backjump: undo several decisions at once, not just the last one, and continue.

Clause learning, efficient data structures and restarts — refined from the late 1990s onwards — took SAT from academic curiosity to the backbone of hardware verification. The lesson SAT solving in a nutshell walks through an example.

SMT: satisfiability modulo theories

Hardware and software are not naturally Boolean: they have 32-bit adders, memories and integer counters. Encoding those as individual bits ("bit-blasting") works but loses structure. An SMT solver combines a SAT engine with theory solvers that reason directly about richer data:

TheoryReasons aboutTypical use
Bit-vectors (QF_BV)Fixed-width machine words: +, *, shifts, comparisons with wrap-aroundHardware, binaries, smart contracts
ArraysMemories: read(write(m, a, v), a) = vMemories, register files, storage maps
Linear integer / real arithmeticSums and inequalities over unbounded numbersSoftware loops, timing, scheduling
Uninterpreted functionsOnly "equal inputs give equal outputs"Abstracting datapaths (see data abstraction)

Problems are exchanged in the standard SMT-LIB format, so the same query can be sent to different solvers:

SMT-LIB example
(set-logic QF_BV)
(declare-const x (_ bv8))
(declare-const y (_ bv8))
(assert (= (bvadd x y) #x00))      ; x + y wraps to zero
(assert (not (= x #x00)))
(check-sat)                        ; sat, e.g. x = #x01, y = #xff
(get-model)

SAT vs SMT at a glance

SATSMT
InputBoolean clauses (CNF)First-order formulas over theories
LevelBitsWords, arrays, numbers
StrengthRaw speed on huge Boolean problemsCompact encodings, structure-aware reasoning
Weak spotLarge arithmetic once bit-blastedSome theory combinations (e.g. non-linear integer arithmetic) are hard or undecidable
ExamplesMiniSat-family solvers, CaDiCaL, KissatZ3, cvc5, Yices, Bitwuzla

Where solvers are used

  • Hardware model checking: BMC and k-induction pose one solver query per depth — see BMC vs k-induction. SymbiYosys's smtbmc engine talks SMT-LIB to solvers such as Yices or Z3.
  • Equivalence checking: each pair of compared logic cones becomes a SAT question: "can the outputs differ?"
  • Software verification and symbolic execution: path conditions become SMT queries.
  • Smart contracts: 256-bit EVM words map naturally to bit-vector theory — see formal verification for smart contracts.

Why your proof is slow: solver-level reasons

  • Multipliers and dividers are notoriously hard for both SAT and bit-vector SMT. Abstract them when the property is about control.
  • Deep unrolling multiplies formula size by the depth. Make properties inductive instead.
  • Wide data that the property does not depend on adds variables for nothing. Reduce widths when the design is data-independent.

Solvers are the foundation of most of the techniques in our complete formal verification guide.

Learn it hands-on

More from the formal verification guide

← Back to formal verification foundations: the complete guide

Discussion

No comments yet.

Was this page helpful?

Tip: select any text on the page before clicking Report and it will be quoted in your report.