Internals of SMT with Z3

TU Wien Guest Lectures, October 2025, Laura Kovacs limited production

Nikolaj Bjørner
Microsoft Research

Lectures

  1. Introduction to SMT/Z3
  2. Fundamental Search Algorithms - CDCL, CDCL(T), PDR, Saturation
  3. Core Theories: EUF, Characters, Finite Sets
  4. Core Theories: Arrays, Datatypes
  5. Core Theories: Arithmetic
  6. Programming Z3
  7. Theory Combination
  8. Quantifiers for theories
  9. Optimization Modulo Theories
  10. Topics. co-engines, local search, nlsat, mcsat, saturation

Live development of a new solver in z3

  • The theory of finite sets, with cardinality constraints
  • Well-known decision procedures, BAPA (Boolean Algebras and Presburger Arithmetic)
  • Partially by using arrays, but not for finite sets
  • It will provide a tour of several aspects of supporting a theory:
    • Define signature
    • Rewriting simplification
    • Global pre-processing simplification
    • Axiom schemas
    • Theory Solver
    • Non-disjoint theory combinations, conservative extensions from decidable base theories
    • Quantifier satisfiability and elimination
    • Surfacing API

Lecture 1

  • What is Satisfiability Modulo Theories, SMT?
  • What are SMT solvers good for?
  • Fundamental SMT algorithms and heuristics.
  • Coding SMT solvers.

Lecture 3-4 - Theory Solvers

  • Congruence Closure
  • Arrays
  • Datatypes

Lecture 4-5 - Arithmetic Theory Solving

  • Linear Real, Integer Arithmetic
  • Non-linear Real, Integer Arithmetic
  • Special Arithmetic Theories

Lecture 6 - Programming with Z3

  • Solver state management
  • API functionality
  • Encoding into Z3

Lecture 7 - Combining Decision Procedures

  • Theory combination history
  • Model-based theory combination
  • Refined notions of theory combinations

Lecture 8 - Quantifiers

  • E-matching
  • Model-based Quantifier Instantiation
  • QSAT
  • Constrained Horn Clauses using SPACER

Lecture 9 - Optimization Modulo Theories

  • Optimization domains: integers, bit-vectors and Pseudo-Booleans
  • MaxSAT with cores, correction sets, and branch and bound
  • Pseudo-Boolean constraints
  • Lex and Box objectives
  • Optimization using User Propagators

Lecture 10 - Topics

  • Co-engines: local search, nlsat, mcsat, saturation
  • Incremental pre-processing