A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

SMT Solving and Theory Combination

Research Depth 101 in the knowledge graph I know this Set as goal
4topics build on this
512prerequisites beneath it
See this on the map →
Introduction to Predicate Logic (First-Order Logic)SAT Solving and Conflict-Driven Clause Learning+1 moreContract Verification (Blockchain)Liquid Types+2 more
smt satisfiability-modulo-theories dpll-t nelson-oppen z3 theory-solver decision-procedure

Core Idea

Satisfiability Modulo Theories (SMT) extends SAT solving to formulas involving richer logical structures: integer and real arithmetic, arrays, bitvectors, strings, and uninterpreted functions. An SMT solver combines a CDCL-based SAT engine with specialized theory solvers (decision procedures) for each supported theory. The dominant architecture, DPLL(T), uses the SAT engine to handle the Boolean structure of the formula while delegating theory-specific reasoning to the appropriate solvers. When multiple theories appear in the same formula, the Nelson-Oppen combination method ensures that theory solvers cooperate correctly by exchanging equalities over shared variables. SMT solvers like Z3, CVC5, and MathSAT are the primary back-end engines for program verification, symbolic execution, and constraint solving.

Explainer

Pure SAT solving operates on propositional formulas: variables are Boolean, and the only operations are AND, OR, NOT. But verification problems involve richer data -- integers, arrays, pointers, floating-point numbers. Encoding these directly into Boolean variables (bit-blasting) is possible but produces enormous formulas that overwhelm even the best SAT solvers. Satisfiability Modulo Theories (SMT) solves this by reasoning about formulas that mix Boolean structure with theory atoms -- predicates interpreted in specific mathematical theories. The formula `(x > 0 AND y = x + 1) OR (y < 0 AND a[i] = 3)` combines linear integer arithmetic and array theory within a Boolean structure.

The standard SMT architecture is DPLL(T), proposed by Nieuwenhuis, Oliveras, and Tinelli (2006). The idea is to reuse the powerful CDCL SAT engine for Boolean reasoning while delegating theory-specific questions to specialized theory solvers (also called decision procedures). The SAT engine treats each theory atom as an opaque Boolean variable. It makes decisions, propagates, and learns clauses exactly as in pure CDCL. Periodically (typically after each propagation fixpoint), it sends the current set of true theory literals to the theory solver, which checks whether they are jointly satisfiable in the background theory. If the theory solver detects an inconsistency, it returns a theory conflict clause -- a minimal unsatisfiable subset of the current theory literals. The SAT engine treats this as a learned clause, triggering backjumping and further search. If no conflict is found and all variables are assigned, the formula is satisfiable with a combined Boolean and theory model.

Each supported theory has its own decision procedure. Linear real arithmetic (LRA) uses the simplex algorithm. Linear integer arithmetic (LIA) extends simplex with branch-and-bound or Gomory cuts. Bitvector arithmetic (BV) can be solved by bit-blasting to SAT or through word-level reasoning. Arrays use the read-over-write axioms: `read(write(a, i, v), j) = if i = j then v else read(a, j)`. Uninterpreted functions (EUF) enforce the congruence axiom: `a = b implies f(a) = f(b)`, solved efficiently using union-find with congruence closure. When a formula involves atoms from multiple theories -- such as array accesses with integer indices and arithmetic comparisons -- the Nelson-Oppen combination method enables cooperation. Each theory solver handles its own literals independently, and they exchange equalities over shared variables until they agree or one detects a conflict. The method requires theories to be signature-disjoint (no shared function symbols beyond equality) and stably infinite (every satisfiable formula has an infinite model).

Modern SMT solvers incorporate many optimizations beyond basic DPLL(T). Theory propagation lets the theory solver proactively inform the SAT engine about implied literals, reducing unnecessary decisions. Preprocessing simplifies formulas through rewriting, Gaussian elimination on linear constraints, and symmetry breaking. Incremental solving allows pushing and popping assertions efficiently, which is critical for verification tools that issue many related queries (e.g., symbolic execution checking path conditions incrementally). Quantifier handling through E-matching and model-based quantifier instantiation (MBQI) extends SMT beyond quantifier-free decidable fragments, though without completeness guarantees.

SMT solvers are the universal back end of formal methods. Bounded model checkers (CBMC) encode programs as SMT formulas. Symbolic execution engines (KLEE, angr) query SMT solvers for path feasibility. Deductive verifiers (Boogie, Why3, Dafny) discharge verification conditions to SMT. Refinement type checkers (Liquid Haskell) send subtyping obligations to SMT. Understanding SMT solver architecture -- the DPLL(T) split, theory solver capabilities and limitations, quantifier handling boundaries -- is essential for anyone building or using formal verification tools, because the formulation of the problem for the solver often determines whether verification succeeds or times out.

Practice Questions 4 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesFinite State Machines (FSMs)Deterministic Finite Automata (DFA)Nondeterministic Finite Automata (NFA)Two-Way Finite AutomataNFA to DFA Conversion (Subset Construction)DFA Properties and Minimization AlgorithmsRegular Languages: Definition and CharacterizationContext-Free Grammars (CFGs)Pushdown Automata (PDA)Equivalence of CFGs and Pushdown AutomataClosure Properties of Context-Free LanguagesLimitations of Context-Free LanguagesPumping Lemma for Context-Free LanguagesTuring MachinesVariants of Turing Machines and EquivalenceNondeterministic Time Complexity and NPThe P vs. NP ProblemComplexity Class P: Polynomial TimeComplexity Class NP: Nondeterministic Polynomial TimeNP-Completeness and Cook-Levin TheoremThe Cook-Levin TheoremBoolean Satisfiability, Cook-Levin, and ReductionsSAT Solving and Conflict-Driven Clause LearningSMT Solving and Theory Combination

Longest path: 102 steps · 512 total prerequisite topics

Prerequisites (3)

Leads To (4)