Lecture 9 · Applications: Model Checking

Introduction to Automated Reasoning · Lecture 09。个人学习讲义与配套实验,按主题整理并持续修订。

课程源码 ZIP ↓

个人整理的学习笔记,非官方讲义;课程来源与整理说明见课程介绍。配套示例未逐一运行验证。

本篇目录

Maps to: Stanford CS 257 Introduction to Automated Reasoning (Winter 2026), Lecture 9 · Tue 02/03/2026 · Applications: model checking (Caroline Trippel). Homework 3 covers it. Reading: none listed on the course page. Basis: The Stanford slides are on Canvas, and the public Iowa decks have no model-checking lecture. These notes are therefore written from the original papers:

  • bounded model checking: Biere, Cimatti, Clarke and Zhu (1999);
  • k-induction: Sheeran, Singh and Stålmarck (2000), Eén and Sörensson (2003);
  • interpolation: McMillan (2003);
  • IC3 / PDR: Bradley (2011), Eén, Mishchenko and Brayton (2011);
  • the textbook view: Clarke, Grumberg and Peled, Model Checking; Biere’s chapter in the Handbook of Satisfiability.

These notes add:

  • a small model checker, mc.py, built on Lecture 5’s CDCL solver: explicit-state search, BMC, k-induction, IC3 and interpolation;
  • ten case studies (counters, a shift register, Peterson’s protocol and a broken one, a priority arbiter with a deep bug);
  • an independent check of every answer: counterexamples by simulation, invariants by three SAT queries;
  • experiments that show where each engine wins and where it fails.

The experiments and their code were designed for these notes and do not reflect what was said in class. Code: code/lecture09/ (5 scripts + 1 module; Python standard library only; 5 to 30 seconds each) Reading time: 3–4 hours including running the code


0. How to read this lecture

0.1 Learning goals

After this lecture you should be able to:

  1. Model a hardware design or a protocol as a transition system (initial states, transition relation) and state a safety property.
  2. Explain explicit-state search, its shortest counterexamples, and the state explosion.
  3. Write down the bounded model checking formula BMCk\mathrm{BMC}_k, explain why its counterexamples are shortest, and say why BMC alone proves nothing.
  4. Distinguish an invariant from an inductive invariant; read a counterexample to induction.
  5. Explain k-induction, why it needs the simple-path constraint to be complete, and why kk can be exponential.
  6. Describe IC3/PDR: frames, proof obligations, relative induction, generalization, propagation, and its termination test.
  7. Compute a Craig interpolant from a resolution proof, and explain interpolation-based model checking.
  8. Check a model checker’s answers independently: traces by simulation, invariants by three SAT queries.

0.2 Prerequisites and scope

AssumedIntroduced hereDeveloped later
propositional logic, Tseitin (Lectures 1–2)transition systems, safety, invariants—
CDCL, resolution proofs, DRUP (Lecture 5)BMC, k-induction, IC3, interpolation—
induction as a proof principleinductive invariants, CTIs, strengtheninginvariants of programs (Lecture 14)
——word-level model checking with SMT (Lectures 10–16)

Scope: safety properties (“nothing bad ever happens”) of finite-state systems with Boolean state. Liveness (“something good eventually happens”), temporal logics (LTL, CTL) and BDD-based symbolic model checking appear only in §7 and §11 as pointers.

0.3 Map

§1  systems that run forever: transition systems, runs, safety                 ← code 01
§2  explicit-state search and the state explosion                             ← code 01
§3  bounded model checking: unrolling into SAT                                 ← code 02
§4  induction, k-induction, the simple-path constraint, strengthening          ← code 01, 03
§5  IC3 / PDR                                                                  ← code 04
§6  Craig interpolation and interpolation-based model checking                 ← code 05
§7  model checking in practice                                                 ← code 05
§8 summary   §9 common pitfalls   §10 exercises   §11 further reading   §12 next lecture

0.4 Notation

SymbolMeaning
ss, s′s'the current state and the next state (vectors of Boolean latches)
I(s)I(s)the initial states
T(s,i,s′)T(s, i, s')the transition relation (ii: the inputs of the step); often written T(s,s′)T(s, s')
P(s)P(s)the safety property; a state with ¬P\neg P is bad
sks_k, xx__kkthe copy of the state (of latch xx) at time kk
Reach\mathrm{Reach}the set of states reachable from II
F0,F1,…F_0, F_1, \dotsIC3’s frames (sets of clauses)
AA, BB, IABI_{AB}the two halves of an unsatisfiable formula, and a Craig interpolant

0.5 The code of this lecture

One module, mc.py, built on Lecture 5’s cdcl.py and Lecture 1’s formulas. It contains:

  • building blocks: formula constructors that fold constants, and bit-vectors as lists of formulas;
  • TransitionSystem: latches, inputs, initial values, next-state functions and a property, compiled into one Python function for fast simulation;
  • explicit_reach: breadth-first search, with all_states and can_reach_bad for brute-force analysis of small systems;
  • Encoder: Tseitin’s transformation (Lecture 2) done incrementally into one clause set, plus a SAT call through CDCL;
  • the engines bmc, recurrence_diameter, k_induction, ic3 and itp (with craig_interpolant);
  • the checkers check_trace and check_invariant;
  • the case studies counter, even_counter, shift_parity, peterson, naive_mutex and arbiter.

Every engine counts its work in SAT calls, depths or conflicts, never in seconds. Results are therefore the same on every machine.


1. Systems that run forever

1.1 Intuition

Every question so far was about one formula. A chip, a cache-coherence protocol or a traffic-light controller is different: it runs. It is in some state, reads its inputs, moves to a next state, and does so forever. We want to know whether it can ever get into a state it must never be in:

  • two processes in the critical section;
  • two clients granted the bus at once;
  • a counter overflowing.

Model checking answers this kind of question automatically. Clarke and Emerson, and Queille and Sifakis, introduced it in the early 1980s, and Clarke, Emerson and Sifakis received the 2007 Turing Award for it. This lecture is about the SAT-based form that dominates hardware verification today.

1.2 Transition systems

A hardware design has latches (state bits, also called registers or flip-flops) and inputs. At every clock tick each latch takes a new value, computed by a Boolean next-state function of the current latches and inputs. In mc.py:

TransitionSystem(name, latches, inputs, init, next_state, prop)
#   init       : dict latch -> initial value (latches left out start with any value)
#   next_state : dict latch -> Formula over latches and inputs
#   prop       : Formula over latches -- the safety property P

Logically, the system is two formulas:

I(s)=⋀x∈init(x=initx)T(s,i,s′)=⋀x(x′⇔nextx(s,i))I(s) = \bigwedge_{x \in \mathrm{init}} (x = \mathrm{init}_x) \qquad T(s, i, s') = \bigwedge_{x} \big(x' \Leftrightarrow \mathrm{next}_x(s, i)\big)

A run is a sequence s0,s1,s2,…s_0, s_1, s_2, \dots with I(s0)I(s_0) and T(sk,ik,sk+1)T(s_k, i_k, s_{k+1}) for every kk. A state is reachable if some run passes through it.

A safety property PP is a formula over the state. PP is an invariant of the system if every reachable state satisfies it, Reach⊆P\mathrm{Reach} \subseteq P. A state violating PP is bad. Model checking asks whether some bad state is reachable.

Why safety properties are special. If a safety property fails, a finite witness shows it: a run from an initial state to a bad state. Liveness properties (“every request is eventually granted”) fail only on infinite runs, which need lasso-shaped witnesses. Safety is the core case, and liveness can be reduced to it (Biere, Artho and Schuppan 2002), so this lecture treats safety only.

The 3-bit counter (script 01, Part 1) counts 0,1,…,5,0,…0, 1, \dots, 5, 0, \dots, and its property is c≠7c \neq 7. mc.py builds its next-state functions with an incrementer and a multiplexer, folding constants:

c0' = ¬(c0 ∧ ¬c1 ∧ c2) ∧ ¬c0
c1' = ¬(c0 ∧ ¬c1 ∧ c2) ∧ ¬(c1 ⇔ c0)
c2' = ¬(c0 ∧ ¬c1 ∧ c2) ∧ ¬(c2 ⇔ c1 ∧ c0)
property P: ¬(c0 ∧ c1 ∧ c2)

c0∧¬c1∧c2c_0 \wedge \neg c_1 \wedge c_2 means "c=5c = 5", where the counter wraps to 0. Its whole state graph:

statesuccessorreachableP
c=0 … c=4c+1yesok
c=5c=0yesok
c=6c=7nook
c=7c=0noBAD

The edge 6→76 \to 7 exists in TT like any other edge. It is simply outside the reachable part. Telling reachable apart from merely existing is the whole difficulty of this lecture.

1.3 Where nondeterminism comes from

The counter is deterministic. Real systems are not, and inputs model every source of choice:

  • the environment: the requests r0,r1,r2r_0, r_1, r_2 of an arbiter’s clients may arrive in any pattern;
  • the scheduler: in a concurrent protocol, the input ss picks which process takes the next step. Every interleaving is then a run.

Peterson’s protocol, for example, is two processes, each with a 2-bit program counter (idle, trying, waiting, critical), plus two flags and a turn bit: 7 latches in all. Process ii, with other process jj:

idle:     flag_i := 1                            -> trying
trying:   turn := j                              -> waiting
waiting:  if ¬flag_j ∨ turn = i                  -> critical      (else keep waiting)
critical: flag_i := 0                            -> idle
property: not (pc_0 = critical ∧ pc_1 = critical)

The broken “check-then-set” protocol waits for ¬flagj\neg\mathrm{flag}_j before raising its own flag.


2. Explicit-state search and the state explosion

The obvious algorithm: start from the initial states, repeatedly compute the successors of the newest states (for every input combination), and stop at the first bad state or when no new state appears. explicit_reach does this with a hash set of visited states.

Breadth-first order gives two things for free:

  • the counterexample is a shortest one;
  • the number of BFS layers minus one is the system’s diameter: the largest distance from the initial states to a reachable state.

Script 01, Part 2:

protocollatchesstatesreachablediameterresultcounterexample
Peterson7128206SAFE–
check-then-set66416–UNSAFE6 steps

The broken protocol’s counterexample is the classic interleaving bug:

step  state                             scheduler
   0  P0:idle     P1:idle     flags=00  s=0
   1  P0:trying   P1:idle     flags=00  s=0      P0 sees flag1 = 0
   2  P0:waiting  P1:idle     flags=00  s=1
   3  P0:waiting  P1:trying   flags=00  s=1      P1 sees flag0 = 0 too
   4  P0:waiting  P1:waiting  flags=00  s=0
   5  P0:critical P1:waiting  flags=10  s=1
   6  P0:critical P1:critical flags=11           BAD

check_trace replays it by simulation and confirms that it is a real run. Every counterexample in this lecture is checked that way.

2.2 The state explosion

Explicit search does work proportional to the number of reachable states, which is exponential in the number of latches. Script 01, Part 3 uses a shift register of nn bits with an input dd and a bit qq that tracks the parity of the register (q′=q⊕d⊕rn−1q' = q \oplus d \oplus r_{n-1}, property q=r0⊕⋯⊕rn−1q = r_0 \oplus \dots \oplus r_{n-1}). Every register content is reachable:

nreachable statesexplicit search
124,0960.01 s
1665,5360.17 s
18262,1440.72 s

Each two more bits multiply the work by four, and ten more bits by a thousand. A processor has hundreds of thousands of latches.

History. Explicit-state tools such as SPIN and Murφ fight the explosion with partial-order reduction, symmetry reduction and hashing tricks, and they remain the tools of choice for protocols. In 1990 Burch, Clarke, McMillan, Dill and Hwang made model checking symbolic: they represented sets of states as formulas (binary decision diagrams, BDDs) and reached ”102010^{20} states and beyond”. BDDs themselves blow up on many designs. Since Biere et al. (1999), SAT solvers have been the engine of choice, and they are the subject of the rest of this lecture.

The same parity property, checked by one SAT query (§4: is P(s)∧T(s,s′)∧¬P(s′)P(s) \wedge T(s, s') \wedge \neg P(s') unsatisfiable?):

nreachable statesvariablesclausesconflictstime
162162^{16}1193404400.04 s
642642^{64}4551,3002,5790.34 s
25622562^{256}1,7995,14022,4394.10 s

The query grows by about 20 clauses per bit, whatever the number of states. That is the promise of SAT-based model checking. The catch, explored in §4, is that this property happens to be inductive.

Run it: python3 01_transition_systems.py (about 10 s). It prints the counter’s state graph, the protocols’ search results and trace, the state explosion table with figures/01_state_explosion.png, and Part 4’s brute-force analysis of invariants (§4.1).

state explosion


3. Bounded model checking

3.1 The idea

Biere, Cimatti, Clarke and Zhu (1999) asked the SAT solver a bounded question: is a bad state reachable in exactly kk steps? A run of length kk is k+1k+1 copies of the state variables, s0,…,sks_0, \dots, s_k, linked by kk copies of TT:

BMCk  =  I(s0)  ∧  ⋀j=0k−1T(sj,ij,sj+1)  ∧  ¬P(sk)\mathrm{BMC}_k \;=\; I(s_0) \;\wedge\; \bigwedge_{j=0}^{k-1} T(s_j, i_j, s_{j+1}) \;\wedge\; \neg P(s_k)

The models of BMCk\mathrm{BMC}_k are exactly the runs of length kk that end in a bad state. Ask for k=0,1,2,…k = 0, 1, 2, \dots:

  • the first satisfiable BMCk\mathrm{BMC}_k contains a counterexample, and it is a shortest one, because every shorter depth was unsatisfiable;
  • the formula grows linearly in kk: one more copy of TT per step.

In mc.py the copy of latch xx at time kk is the variable x__k. Script 02 prints BMC2\mathrm{BMC}_2 for the counter with property c≠5c \neq 5:

I(s_0):      ¬c0__0 ∧ ¬c1__0 ∧ ¬c2__0
T(s_0, s_1): c0__1 ⇔ ¬(c0__0 ∧ ¬c1__0 ∧ c2__0) ∧ ¬c0__0
             c1__1 ⇔ ...
T(s_1, s_2): c0__2 ⇔ ¬(c0__1 ∧ ¬c1__1 ∧ c2__1) ∧ ¬c0__1
             ...
¬P(s_2):     c0__2 ∧ ¬c1__2 ∧ c2__2
kvariablesclausesBMC_k
0510UNSAT
11951UNSAT
23392UNSAT
461174UNSAT
575215SAT: c=0→1→2→3→4→5c = 0 \to 1 \to 2 \to 3 \to 4 \to 5

The clause set grows by 41 clauses per step.

3.2 Why it is done this way

  • Why Tseitin and not a direct CNF? TT is a circuit, and copies of it share nothing. Distributing it into CNF would blow up exponentially (Lecture 2). Tseitin’s names keep each copy linear.
  • Why an incremental encoder? Each depth adds one copy of TT to the previous formula. Encoder keeps one growing clause set and asserts ¬P(sk)\neg P(s_k) only in the query for depth kk. The Tseitin definitions of earlier ¬P(sj)\neg P(s_j) stay in the set, which is harmless: a definition never restricts the original variables (Lecture 2, §4). Real tools go further and keep one incremental SAT solver that remembers its learned clauses across depths (Eén and Sörensson 2003). Our CDCL solver has no such interface, so each depth is a fresh solver run.
  • Why exactly depth kk, not “within kk”? Both are used. “Exactly kk” with increasing kk finds shortest counterexamples, and it is what bmc does.

3.3 Deep bugs

The arbiter of script 02 serves three clients with fixed priorities, client 0 highest. A starvation timer of bb bits counts the cycles in which client 2 requests without being served. When the timer is full, an urgent grant goes to client 2 and must suppress all others. The buggy version forgets to suppress client 0, and the property “at most one grant” fails only after the timer fills up, at depth 2b2^b:

timer bitsBMC depthexplicit depthvariablesclausesconflicts (all depths)time
244126317130.00 s
416166681,783590.03 s
664643,4069,3692491.12 s
71281287,56721,0185045.31 s

The trace for b=2b = 2 explains the bug:

step  state               requests
   0  grants=000 timer=0  r0=0 r1=1 r2=1
   1  grants=010 timer=1  r0=0 r1=1 r2=1      client 1 wins, client 2 waits
   2  grants=010 timer=2  r0=0 r1=1 r2=1
   3  grants=010 timer=3  r0=1 r1=1 r2=1      timer full: urgent grant to 2 ...
   4  grants=101 timer=0                      ... and the normal grant to 0: BAD

BMC’s counterexamples are concrete, short and easy to read, which makes BMC the industrial bug-hunting workhorse. Its weakness is depth: the counter of script 02 that must count to 200 needs 200 copies of the design (21,430 clauses).

3.4 What BMC cannot do

On a correct design every BMCk\mathrm{BMC}_k is unsatisfiable, and BMC says only “no bug up to depth kk”. On Peterson’s protocol (script 02, Part 3):

kclausesconflictsBMC_k
46855UNSAT
122,021382UNSAT
203,357961UNSAT

The formulas grow linearly, but each one is harder to refute: more interleavings of the two processes.

Completeness thresholds. If BMC passes the diameter DD, every reachable state has been covered (each is reachable within DD steps), and the property is proved. Peterson’s diameter is only 6, but computing a diameter required the explicit search we wanted to avoid. The recurrence diameter is the longest loop-free path from an initial state. It is also a valid threshold, since every reachable state is reachable along a loop-free path, and it is computable by SAT: I(s0)∧T(s0..sk)∧⋀i<jsi≠sjI(s_0) \wedge T(s_0..s_k) \wedge \bigwedge_{i<j} s_i \neq s_j is satisfiable exactly up to it.

systemreachablediameterrecurrence diameter
counter mod 6, c≠7c \neq 7655
even counter, 4 bits877
Peterson20617
arbiter (correct)18717

The arbiter’s 18 reachable states all lie on one loop-free path. In real designs loop-free paths are astronomically long, so BMC finds bugs and other methods prove their absence.

Run it: python3 02_bounded_model_checking.py (about 30 s): the unrolling, the arbiter family, other bugs, Peterson and the thresholds, with figures/02_bmc_cost.png.

BMC cost on Peterson


4. Induction and k-induction

4.1 Invariants and inductive invariants

To prove PP for runs of any length, use induction on the length of the run:

  • base: I⇒PI \Rightarrow P, so every initial state is good;
  • step: P(s)∧T(s,s′)⇒P(s′)P(s) \wedge T(s, s') \Rightarrow P(s'), so every good state has only good successors.

Each is one SAT query: I∧¬PI \wedge \neg P and P∧T∧¬P′P \wedge T \wedge \neg P' must be unsatisfiable. If both are, PP is an inductive invariant, and the proof is done regardless of the number of states. That is what proved the 256-bit parity register in §2.2.

Usually the step fails. Its model is a counterexample to induction (CTI): a good state with a bad successor. Script 01, Part 4 analyses small systems by brute force over all their states:

systemstates∣P∣\lvert P\rvert∣Reach∣\lvert\mathrm{Reach}\rvert∣Safe∣\lvert\mathrm{Safe}\rvertP inductive?
counter mod 6, c≠7c \neq 78766no
even counter, 4 bits161588no
saturating counter with enable161566no
arbiter (correct)64321832yes
Peterson1281202046no

Here Safe\mathrm{Safe} is the set of states from which no bad state can be reached. The three sets are nested:

Reach  ⊆  Safe  ⊆  P\mathrm{Reach} \;\subseteq\; \mathrm{Safe} \;\subseteq\; P

  • PP is an invariant iff Reach⊆P\mathrm{Reach} \subseteq P.
  • Reach\mathrm{Reach} and Safe\mathrm{Safe} are both inductive (closed under transitions), and so is any union of Reach\mathrm{Reach} with a closed subset of Safe\mathrm{Safe}.
  • PP itself is inductive only when no unreachable good state steps into a bad one. That happens only for the arbiter, whose grants are recomputed from scratch every cycle.

The CTIs found by brute force are all unreachable:

counter mod 6        c=6 -> c=7
even counter         x=15 -> x=1
saturating counter   c=14 [en=1] -> c=15
Peterson             P0:waiting P1:critical flags=00 turn=0 [s=0] -> both critical

The Peterson CTI has both flags down although neither process is idle, which no run can produce. Induction looks one step back from the bad state and cannot know that.

Proving PP means finding an inductive invariant between Reach\mathrm{Reach} and PP, without enumerating states. The rest of the lecture gives three ways.

4.2 k-induction

Sheeran, Singh and Stålmarck (2000): if one step of history is not enough, assume kk.

basek:  I(s0)∧T(s0..sk−1)∧¬P(sk−1)stepk:  ⋀j<kP(sj)∧T(s0..sk)∧¬P(sk)\text{base}_k:\; I(s_0) \wedge T(s_0..s_{k-1}) \wedge \neg P(s_{k-1}) \qquad \text{step}_k:\; \bigwedge_{j<k} P(s_j) \wedge T(s_0..s_k) \wedge \neg P(s_k)

If base1,…,basek\text{base}_1, \dots, \text{base}_k and stepk\text{step}_k are all unsatisfiable, PP holds:

  • by the base cases, every run of length below kk is good;
  • every longer run ends with kk good states in a row (by induction), which the step case says are followed by a good state.

basek\text{base}_k is just BMCk−1\mathrm{BMC}_{k-1}, so k-induction also finds shortest counterexamples.

How large must kk be? One more than the longest loop-free chain of good states leading into a bad state. Every state on such a chain is unreachable, otherwise the bad state would be reachable. Script 03:

systemkstep-case clausesconflictstime
counter mod 6216030.00 s
even counter, 4 bits81,27490.01 s
saturating counter with enable102,7304560.16 s
shift register, 8 bits11801420.01 s
arbiter114840.00 s
Peterson1710,0576,1394.13 s

kk can be exponential. On the even counter (x:=x+2x := x + 2 from 0, property x≠1x \neq 1), the odd values form a cycle of 2n−12^{n-1} good states, minus x=1x=1, that feeds into the bad state:

nstateskstep clausestime
41681,2740.02 s
6643223,4080.81 s
712864103,2838.33 s

The reason for safety is a single clause, ¬x0\neg x_0 (”xx is even”). k-induction reasons about paths and never invents a new invariant.

k-induction on the even counter

4.3 The simple-path constraint

Without extra constraints, stepk\text{step}_k can be satisfiable for every kk. Take a counter with an enable input. With en=0en = 0 it stutters, so an unreachable good state can repeat itself for as long as kk demands and then step towards the bad state. Script 03’s model at k=6k = 6:

c=5 -> c=5 -> c=5 -> c=5 -> c=5 -> c=6 -> c=7       (en = 0 0 0 0 1 1)

Such a path repeats a state, so it carries no information that a shorter path did not. The simple-path constraint adds si≠sjs_i \neq s_j for all i<ji < j to the step case:

systemwith simple pathwithout (k ≤ 30)
counter, 3 bits, saturating at 2SAFE at k = 5UNKNOWN
counter, 4 bits, saturating at 5SAFE at k = 10UNKNOWN
counter, 5 bits, saturating at 9SAFE at k = 22UNKNOWN

With it, k-induction is complete for finite systems: loop-free paths are bounded by the number of states, so the step case eventually becomes unsatisfiable. The price is O(k2)O(k^2) disequality constraints, and kk may be as large as the number of states.

4.4 Strengthening

If PP is not inductive, find a QQ such that P∧QP \wedge Q is. Then 1-induction proves P∧QP \wedge Q, and with it PP. Script 03, Part 4:

systemQk for Pk for P ∧ Q
even counter¬x0\neg x_0 (”xx is even”)81
saturating counter¬c3∧¬(c2∧c1)\neg c_3 \wedge \neg(c_2 \wedge c_1) ("c≤5c \le 5")101
Petersonflags match program counters; critical while the other waits ⇒ turn favours the critical one171

Peterson’s QQ was written by hand from the protocol’s logic. It has four conjuncts:

  • flagi⇔¬idlei\mathrm{flag}_i \Leftrightarrow \neg\mathrm{idle}_i for i=0,1i = 0, 1;
  • (crit0∧wait1)⇒turn=0(\mathrm{crit}_0 \wedge \mathrm{wait}_1) \Rightarrow \mathrm{turn} = 0, and the symmetric conjunct.

This is how humans verify systems: by stating invariants. Finding QQ automatically is what IC3 does.

Run it: python3 03_k_induction.py (about 30 s), with figures/03_k_induction.png.


5. IC3 / property-directed reachability

5.1 Intuition

Bradley’s IC3 (2011), reimplemented by Eén, Mishchenko and Brayton as PDR, builds the strengthening QQ from CTIs, one clause at a time, without ever unrolling TT more than once. Its central idea is relative induction. A CTI ss cannot simply be excluded, because maybe it is reachable. But if ss is unreachable from some over-approximation FF of the states reachable in fewer steps, the clause ¬s\neg s can be added to the next over-approximation.

5.2 Frames

IC3 keeps a sequence of frames F0=I,F1,…,FkF_0 = I, F_1, \dots, F_k, each a set of clauses over the state variables, with four invariants:

  1. F0=IF_0 = I;
  2. Fi⇒Fi+1F_i \Rightarrow F_{i+1}: each frame is weaker than the previous one (as clause sets, Fi+1⊆FiF_{i+1} \subseteq F_i);
  3. Fi∧T⇒Fi+1′F_i \wedge T \Rightarrow F_{i+1}': Fi+1F_{i+1} contains every successor of FiF_i, so FiF_i over-approximates the states reachable in at most ii steps;
  4. Fi⇒PF_i \Rightarrow P for i<ki < k.

It then repeats three operations.

Blocking. While some state ss in FkF_k is bad (a SAT query Fk∧¬PF_k \wedge \neg P), show it unreachable in kk steps. Ask whether it has a predecessor in Fk−1F_{k-1}:

Fk−1∧¬s∧T∧s′satisfiable?F_{k-1} \wedge \neg s \wedge T \wedge s' \quad\text{satisfiable?}

  • Yes: the predecessor tt becomes a proof obligation at level k−1k-1 and must be blocked first, recursively. If an obligation reaches an initial state, the chain of obligations is a counterexample.
  • No: ss is unreachable from Fk−1F_{k-1} in one step. The clause ¬s\neg s holds in all successors of Fk−1F_{k-1}, so it may be added to F1,…,FkF_1, \dots, F_k. The ¬s\neg s in the query makes this relative induction: we may assume we are not already in ss.

Generalization. Before adding ¬s\neg s, drop literals from the cube ss as long as the query stays unsatisfiable and the cube stays disjoint from II. A cube over 1 latch out of nn excludes 2n−12^{n-1} states at once. This is what turns IC3 from a state enumerator into an invariant finder.

Propagation. After blocking, open Fk+1F_{k+1} and push every clause cc of FiF_i with Fi∧T⇒c′F_i \wedge T \Rightarrow c' into Fi+1F_{i+1}. If some FiF_i ends up equal to Fi+1F_{i+1}, then Fi∧T⇒Fi′F_i \wedge T \Rightarrow F_i', and FiF_i is an inductive invariant that implies PP. IC3 stops with a proof.

Every query involves one copy of TT. The queries are small and numerous, the opposite of BMC’s few large ones.

5.3 Two traced runs

Script 04, Part 1, on the even counter:

--- frame F_1: block every bad state in F_1
bad state in F_1:  x0 ∧ ¬x1 ∧ ¬x2 ∧ ¬x3
  blocked at level 1: learn ¬x0 in F_1  (generalized from 4 to 1 literals)
  propagate ¬x0 from F_1 to F_2
F_1 = F_2: an inductive invariant -- done
Result: SAFE after 8 SAT calls. Invariant (with P): ¬x0   certificate: ok

The bad state x=1x = 1 has no predecessor in I={x=0}I = \{x = 0\}. Generalization asks whether the cube can shrink: x0x_0 alone still has no predecessor outside itself, since adding 2 never changes x0x_0. IC3 learns ¬x0\neg x_0, the one-clause invariant that k-induction needed k=8k = 8 to get around.

On the saturating counter, IC3 learns ¬c3\neg c_3, then ¬c2∨¬c3\neg c_2 \vee \neg c_3, then ¬c1∨¬c2\neg c_1 \vee \neg c_2, in 25 SAT calls. Together these say c≤5c \le 5: the strengthening written by hand in §4.4, found automatically.

5.4 Results, certificates, and Peterson’s invariant

Script 04, Part 2, on every case study:

systemIC3framesinvariant / traceSAT calls
counter mod 6, c≠7c \neq 7SAFE31 clause15
counter mod 6, c≠5c \neq 5UNSAFE3trace of 5 steps37
even counter, 4 bitsSAFE21 clause8
shift register, 6 bitsSAFE764 clauses1,424
PetersonSAFE712 clauses566
check-then-setUNSAFE5trace of 6 steps129
arbiterSAFE23 clauses29
arbiter, buggyUNSAFE5trace of 8 steps200

Certificates. Every SAFE answer comes with an invariant Inv\mathit{Inv}, and check_invariant verifies it with three independent SAT queries. All three must be unsatisfiable:

I∧¬InvInv∧T∧¬Inv′Inv∧¬PI \wedge \neg \mathit{Inv} \qquad \mathit{Inv} \wedge T \wedge \neg \mathit{Inv}' \qquad \mathit{Inv} \wedge \neg P

Initiation, consecution and safety together are the induction proof. Every UNSAFE answer comes with a trace that simulation confirms. As with DRUP proofs (Lecture 5), a bug in the engine cannot produce a wrong certified answer.

Peterson’s 12 clauses begin with f0∨¬a0f_0 \vee \neg a_0, f0∨¬b0f_0 \vee \neg b_0, f1∨¬a1f_1 \vee \neg a_1, f1∨¬b1f_1 \vee \neg b_1: a process that is not idle has its flag up. This is one direction of the hand-written QQ. The other clauses relate turn to the program counters in IC3’s own words, and one of them is PP itself.

IC3’s counterexamples here are as short as BMC’s (5, 6 and 8 steps), but that is not guaranteed. An obligation re-enqueued at a higher level can lengthen the trace.

5.5 Where IC3 struggles

Script 04, Part 3:

familynIC3 invariantIC3 SAT callsk-induction
even counter4¬x0\neg x_08k = 8
even counter64¬x0\neg x_068k = 2632^{63}
shift register + parity416 clauses283k = 1
shift register + parity7128 clauses3,103k = 1

IC3 can only learn clauses. The parity of nn bits has no CNF smaller than 2n2^n clauses, because every clause of a parity CNF must mention all variables. So the invariant IC3 needs is exponential, while 1-induction proves the same property at once.

The even counter is the opposite case: one clause for IC3, k=2n−1k = 2^{n-1} for k-induction. No method dominates. Each is fast when the reason for safety is short in its language.

IC3 scaling

5.6 What matters inside IC3

Script 04, Part 4 switches components off:

systemfull IC3no pushingno generalization
even counter, 8 bits12 calls, 1 clause12 calls, 1 clause515 calls, 128 clauses
arbiter29 calls, 3 clauses29 calls, 3 clauses98 calls, 32 clauses
Peterson566 calls, 12 clauses571 calls, 12 clauses316 calls, 82 clauses

Without generalization IC3 excludes the 128 odd values of the 8-bit even counter one by one. On Peterson, generalization costs more SAT calls than it saves, since each literal it tries to drop is a query. It still shrinks the invariant from 82 clauses to 12.

Pushing changes little on systems this small. Real implementations add much more:

  • one incremental solver per frame;
  • ternary simulation to generalize predecessors;
  • smarter generalization (“MIC”, “CTG”);
  • careful clause propagation.

Run it: python3 04_ic3.py (about 5 s), with figures/04_ic3_scaling.png.


6. Craig interpolation and interpolation-based model checking

6.1 Craig’s theorem

Theorem (Craig 1957). If A∧BA \wedge B is unsatisfiable, there is an interpolant II with:

  • A⊨IA \models I;
  • I∧BI \wedge B unsatisfiable;
  • II mentions only variables that occur in both AA and BB.

II is “what AA says about the shared vocabulary that is enough to contradict BB”.

McMillan’s system (2003) reads II off any resolution refutation, as a partial interpolant for each line:

proof linepartial interpolant
input clause of AAthe disjunction of its shared literals (⊥\bot if none)
input clause of BB⊤\top
resolvent on a variable that occurs only in AAI1∨I2I_1 \vee I_2
resolvent on any other variableI1∧I2I_1 \wedge I_2

The empty clause’s partial interpolant is II. Lecture 5’s CDCL solver writes every learned clause as a chain of resolution steps (resolution=True), so interpolants come for free.

Script 05, Part 1, with A={a,b},{¬a,c},{¬b,c}A = \{a, b\}, \{\neg a, c\}, \{\neg b, c\} and B={¬c,d},{¬d}B = \{\neg c, d\}, \{\neg d\}:

line  clause      how                             partial interpolant
   1  {a, b}      input clause of A               ⊥
   2  {¬a, c}     input clause of A               c
   3  {¬b, c}     input clause of A               c
   4  {¬c, d}     input clause of B               ⊤
   5  {¬d}        input clause of B               ⊤
   6  {a, c}      resolve 1, 3 on b (A-local: ∨)  c
   7  {c}         resolve 6, 2 on a (A-local: ∨)  c
   8  {d}         resolve 7, 4 on c (shared: ∧)   c
   9  □           resolve 8, 5 on d (shared: ∧)   c

I=cI = c: exactly the fact that AA passes to BB.

6.2 Interpolants as images

McMillan used interpolants to compute over-approximate images. Let RR be the current over-approximation of the reachable states, starting with R=IR = I:

A=R(s0)∧T(s0,s1)B=T(s1..sk)∧⋁j=1k¬P(sj)A = R(s_0) \wedge T(s_0, s_1) \qquad B = T(s_1..s_k) \wedge \bigvee_{j=1}^{k} \neg P(s_j)

If A∧BA \wedge B is unsatisfiable, no bad state is reachable within kk steps after one step from RR. The interpolant JJ, renamed from time 1 to time 0, has three properties:

  • it contains every successor of RR (since A⊨JA \models J);
  • it cannot reach a bad state within k−1k - 1 more steps;
  • it mentions only state variables.

The loop then continues:

  • if J⇒RJ \Rightarrow R, RR is closed under TT: an inductive invariant;
  • otherwise set R:=R∨JR := R \vee J and repeat.

If A∧BA \wedge B is satisfiable and R=IR = I, it is a real counterexample (a BMC run). If R≠IR \ne I, it may be spurious, because the over-approximation reached too far. Then increase kk and restart from II.

Script 05, Part 2 counts states:

systemkiteration∣R∣\lvert R\rvert∣\lvertexact image of R∣\rvert∣J∣\lvert J\rvertoutcome
even counter11118R := R ∨ J
even counter12888fixpoint

From R={0}R = \{0\} the exact image is the single state 2. The interpolant covers all 8 even values, because the refutation only needed ”x0x_0 stays 0”. Two interpolants reach the fixpoint, where exact image computation would need 8 steps.

On the saturating counter, small kk give interpolants that overshoot into unreachable states, which can reach the bad state, so the run ends spurious. ITP increases kk six times and reaches a fixpoint at k=7k = 7 after 6 iterations, with every interpolant inside the reachable states.

6.3 The price: interpolant size

Interpolants are as large as the proofs they come from. In the comparison of §7, the largest interpolant on Peterson’s protocol has 1,916 distinct subformulas for a system of 7 latches. ITP runs out of its budget (3,000 conflicts) at k=8k = 8. Production tools shrink interpolants with circuit rewriting; ours uses them as they come.

Run it: python3 05_interpolation.py (about 25 s).


7. Model checking in practice

7.1 Five engines side by side

Script 05, Part 3, runs every engine on every case study (deterministic work measures; times vary by machine):

systemtruthexplicitBMC (≤ 20)k-inductionIC3ITP (3,000 conflicts)
counter mod 6, c≠7c \neq 7SAFE6 statesnone ≤ 20k = 215 callsk = 2
counter mod 6, c≠5c \neq 5UNSAFE6 statesat 5k = 637 callsk = 5
even counterSAFE8 statesnone ≤ 20k = 88 callsk = 1
shift registerSAFE64 statesnone ≤ 20k = 11,424 callsk = 1
shift register, buggyUNSAFE65 statesat 7k = 81,432 callsk = 7
PetersonSAFE20 statesnone ≤ 20k = 17566 callsUNKNOWN
check-then-setUNSAFE16 statesat 6k = 7129 callsk = 6
arbiterSAFE18 statesnone ≤ 20k = 129 callsk = 1
arbiter, buggyUNSAFE19 statesat 8k = 9200 callsk = 8
saturating counterSAFE6 statesnone ≤ 20k = 1025 callsk = 7

All engines agree wherever they answer, and every answer is checked.

On systems this small explicit search wins every row. Its cost is the number of reachable states, while the symbolic engines’ cost is the size of a proof. On a design with thousands of latches only the symbolic engines have a chance. Industrial model checkers therefore run a portfolio of BMC, k-induction, IC3 and interpolation, often in parallel. Examples are ABC, nuXmv, AVR and Pono (and CBMC and ESBMC for software).

7.2 Where model checking is used

  • Hardware. Every major chip company runs SAT-based model checkers on RTL. The Hardware Model Checking Competition (HWMCC) uses the AIGER format, which is the same “latches + next-state functions + bad states” form as TransitionSystem.
  • Protocols. Cache-coherence and consensus protocols are checked with explicit-state tools (Murφ, TLC for TLA+) and with SAT/SMT-based ones.
  • Memory models. Trippel’s research verifies that processors implement their memory consistency models and that hardware is free of side channels. Examples are TriCheck (ASPLOS 2017) and CheckMate (MICRO 2018), which search for bad executions with relational model finding on top of SAT. These are the same “find a run that ends in a bad state” questions.
  • Software. Bounded model checkers for C (CBMC, ESBMC) unroll loops just as BMC unrolls time. k-induction and IC3 are applied to programs over integers and arrays, which needs SMT instead of SAT: the subject of Lectures 10–16.

8. Summary

  1. A transition system is I(s)I(s) and T(s,i,s′)T(s, i, s'). A safety property PP is an invariant iff no bad state is reachable. A violation always has a finite witness.
  2. Explicit-state search finds shortest counterexamples and proves safety by exhausting the reachable states. Its cost grows exponentially with the latches (2^18 states: 0.7 s).
  3. BMC encodes “a bad state at depth kk” as one SAT formula, linear in kk. It finds shortest counterexamples (the arbiter’s at depth 128 in about 5 s) and proves nothing unless kk passes a completeness threshold (diameter, recurrence diameter).
  4. Induction proves inductive properties with one SAT query (parity of 256 bits). Its counterexamples, the CTIs, are usually unreachable states, and inductive invariants lie between Reach and Safe.
  5. k-induction strengthens the hypothesis with kk steps of history. It needs the simple-path constraint for completeness, and kk can be exponential (even counter: 2n−12^{n-1}).
  6. IC3 builds an inductive strengthening clause by clause through relative induction, generalization and propagation. It is robust, and it fails when the invariant has no short CNF (parity).
  7. Interpolants from resolution proofs over-approximate images and can jump to an invariant in one step. Their size grows with the proofs.
  8. Every answer is certified: counterexamples by simulation, invariants by initiation, consecution and safety.

9. Common pitfalls

  • “BMC found no bug up to depth 50, so the design is correct.” Only if 50 exceeds a completeness threshold. The arbiter’s bug sits at depth 128 with a 7-bit timer.
  • Confusing invariant with inductive invariant. PP may hold in every reachable state and still fail the induction step. A CTI is not a bug.
  • Forgetting the base case. P∧T⇒P′P \wedge T \Rightarrow P' alone proves nothing: P=⊥P = \bot satisfies it trivially, as does any property that is closed under transitions but false in an initial state.
  • k-induction without the simple-path constraint, then concluding “UNKNOWN means probably buggy”. A stuttering system defeats it for every kk.
  • Reading IC3’s frames as reachable sets. FiF_i over-approximates the states reachable in at most ii steps. Only a fixpoint Fi=Fi+1F_i = F_{i+1} is a proof.
  • Generalizing a cube into the initial states. A blocked cube must stay disjoint from II, or IC3 would “prove” that initial states are unreachable.
  • Treating a spurious ITP counterexample as real. Only A∧BA \wedge B satisfiable with R=IR = I is a real run.
  • Mixing up time steps. In the unrolling, xx__33 and xx__44 are different variables. Forgetting to rename a subformula silently links two time steps.

10. Exercises

1. (modeling) Model a 2-bit Gray-code counter (00 → 01 → 11 → 10 → 00) as a TransitionSystem with next-state functions. Property: consecutive states differ in exactly one bit. Is this a safety property of single states? How do you check it with mc.py?

Answer

“Consecutive states differ in one bit” is a property of transitions, not of single states. Make it a state property by adding history latches:

  • add latches h0,h1h_0, h_1 with hi′=gih_i' = g_i (the previous value);
  • add a latch started with init 0 and next 1.

The property is then started ⇒ (g ⊕ h has exactly one bit set). This “monitor” construction turns any finite-history property into a safety property of an extended system. With it, explicit search, BMC or IC3 all prove the property.

2. (BMC) Write BMCk\mathrm{BMC}_k for “a bad state within kk steps” instead of “at exactly kk”. When would you prefer each?

Answer

I(s0)∧T(s0..sk)∧⋁j=0k¬P(sj)I(s_0) \wedge T(s_0..s_k) \wedge \bigvee_{j=0}^{k} \neg P(s_j).

  • “Within kk” answers “any bug up to kk?” with one query, and suits jumping to a large kk directly.
  • “Exactly kk” with increasing kk gives shortest counterexamples and simpler queries.

With an incremental solver, “exactly kk” plus learned clauses usually wins.

3. (diameter) Show that the recurrence diameter is always at least the diameter, and give a system where it is exponentially larger.

Answer

Why rd ≥ D. A shortest path to a state is loop-free, and the diameter is the longest of these shortest paths. So D≤rdD \le rd.

Example. Take nn latches, all initial values free (every state initial). Then D=0D = 0. With a transition relation that allows a Hamiltonian path through all 2n2^n states (e.g. a counter), rd=2n−1rd = 2^n - 1.

4. (induction) For the counter mod 6 with P:c≠7P: c \neq 7, find the weakest QQ such that P∧QP \wedge Q is inductive. Compare with IC3’s invariant.

Answer

The weakest Q. P∧QP \wedge Q must exclude 6, the only good state with a bad successor. No state steps to 6 (5 wraps to 0), so excluding 6 is enough: Q=c≠6Q = c \neq 6, i.e. ¬(¬c0∧c1∧c2)=c0∨¬c1∨¬c2\neg(\neg c_0 \wedge c_1 \wedge c_2) = c_0 \vee \neg c_1 \vee \neg c_2.

IC3’s answer. IC3 found ¬c1∨¬c2\neg c_1 \vee \neg c_2, which excludes both 6 and 7: generalization dropped c0c_0. Both are valid strengthenings, and IC3’s is shorter.

5. (k-induction) Prove that k-induction with the simple-path constraint terminates on every finite system.

Answer

Case: bad state reachable. Some base case basek\text{base}_{k} with k−1k-1 = the length of a shortest counterexample is satisfiable.

Case: no bad state reachable. Consider kk larger than the number of states NN. The step case asks for k+1>Nk+1 > N pairwise distinct states, which is impossible. So stepk\text{step}_k is unsatisfiable for k≥Nk \ge N at the latest, and k-induction answers SAFE.

The bound is the longest loop-free path, at most N−1N - 1.

6. (IC3) In the even-counter trace, why may IC3 drop the literals ¬x1,¬x2,¬x3\neg x_1, \neg x_2, \neg x_3 but not x0x_0? What would happen if generalization dropped x0x_0 too?

Answer

What generalization tests. Dropping a literal ll from the cube ss is allowed if the smaller cube gg is still disjoint from II and F0∧¬g∧T∧g′F_0 \wedge \neg g \wedge T \wedge g' is unsatisfiable.

Why the three literals can go. With g=x0g = x_0, the query asks for a state with x0=0x_0 = 0 (not in gg) whose successor has x0=1x_0 = 1. Adding 2 never changes x0x_0, so this is unsatisfiable.

Why x0x_0 must stay. The empty cube is ⊤\top. It intersects II, so dropping x0x_0 is forbidden: it would “block” every state, including the initial one.

7. (certificates) An engine claims that Inv=P\mathit{Inv} = P is an inductive invariant for Peterson. Which of the three checks of check_invariant fails, and what does the failing model look like?

Answer

Which check fails. Initiation and safety hold. Consecution fails: P∧T∧¬P′P \wedge T \wedge \neg P' is satisfiable.

The failing model. A CTI, e.g. script 03’s: process 0 waiting, process 1 critical, both flags down, turn = 0. The scheduler moves process 0, which enters because flag1=0\mathrm{flag}_1 = 0.

8. (interpolation) Compute McMillan’s interpolant by hand for A={p},{¬p,q}A = \{p\}, \{\neg p, q\} and B={¬q}B = \{\neg q\}. Then swap the roles of AA and BB. What do you get, and why?

Answer

A={p},{¬p,q}A = \{p\}, \{\neg p, q\}; B={¬q}B = \{\neg q\}. The shared variable is qq.

  • {p}\{p\} gets ⊥\bot (no shared literal), {¬p,q}\{\neg p, q\} gets qq, {¬q}\{\neg q\} gets ⊤\top.
  • Resolving on pp (A-local) gives {q}\{q\} with ⊥∨q=q\bot \vee q = q.
  • Resolving on qq (shared) gives □ with q∧⊤=qq \wedge \top = q.

So I=qI = q.

Swapped. Now A={¬q}A = \{\neg q\} and B={p},{¬p,q}B = \{p\}, \{\neg p, q\}. A proof is: resolve {p}\{p\} with {¬p,q}\{\neg p, q\} on pp (B-local: ∧) to get {q}\{q\}, then {q}\{q\} with {¬q}\{\neg q\} on qq (shared: ∧).

The interpolant is ¬q\neg q, the negation of the first one. In general, the negation of any interpolant of (A,B)(A, B) is an interpolant of (B,A)(B, A): B⊨¬IB \models \neg I because I∧BI \wedge B is unsatisfiable, and ¬I∧A\neg I \wedge A is unsatisfiable because A⊨IA \models I.

9. (programming) Add incremental BMC to mc.py: keep one CDCLSolver across depths. Which changes does cdcl.py need (adding clauses after solve, solving under assumptions)? Measure the gain on the arbiter family.

Answer sketch

Changes to cdcl.py.

  • Adding clauses after solve: a method that grows the variable arrays (values, levels, watches, heap) and watches new clauses at level 0.
  • Assumptions: solve(assumptions=[...]) decides the assumption literals first, one per decision level. A conflict involving them means “UNSAT under these assumptions”, without learning anything that depends on them as a fact.

How to use them. Encode ¬P(sk)\neg P(s_k) as an assumption literal bad_k.

What to expect. The learned clauses about TT carry over between depths. MiniSat-based BMC typically gains several-fold.

10. (programming) Implement ternary simulation to generalize IC3’s predecessor cubes. Drop a latch from the predecessor cube if setting it to X (unknown) still forces the successor cube under the same inputs. Measure SAT calls on Peterson.

Answer sketch

Ternary simulation. Evaluate the next-state functions over {0,1,X}\{0, 1, X\}:

  • 0∧X=00 \wedge X = 0, 1∧X=X1 \wedge X = X, ¬X=X\neg X = X, and so on.

The algorithm. For each latch of the predecessor, set it to X. If every latch of the successor cube still evaluates to its required value, keep it as X, which drops it from the cube.

What to expect. Fewer, larger blocked regions per obligation, and so fewer SAT calls. This is Eén et al.’s PDR trick.


11. Further reading

  • E. M. Clarke, O. Grumberg, D. Peled, Model Checking, MIT Press 1999 (2nd ed. with Kroening and Veith, 2018).
  • J. R. Burch, E. M. Clarke, K. L. McMillan, D. L. Dill, L. J. Hwang, “Symbolic Model Checking: 10^20 States and Beyond”, LICS 1990.
  • A. Biere, A. Cimatti, E. Clarke, Y. Zhu, “Symbolic Model Checking without BDDs”, TACAS 1999 (bounded model checking).
  • M. Sheeran, S. Singh, G. Stålmarck, “Checking Safety Properties Using Induction and a SAT-Solver”, FMCAD 2000.
  • N. Eén, N. Sörensson, “Temporal Induction by Incremental SAT Solving”, BMC 2003.
  • K. L. McMillan, “Interpolation and SAT-Based Model Checking”, CAV 2003.
  • A. R. Bradley, “SAT-Based Model Checking without Unrolling”, VMCAI 2011 (IC3).
  • N. Eén, A. Mishchenko, R. Brayton, “Efficient Implementation of Property Directed Reachability”, FMCAD 2011.
  • A. Biere, “Bounded Model Checking”, Chapter 18 of the Handbook of Satisfiability (2nd ed. 2021).
  • C. Trippel, Y. Manerkar, D. Lustig, M. Pellauer, M. Martonosi, “TriCheck: Memory Model Verification at the Trisection of Software, Hardware, and ISA”, ASPLOS 2017.

12. Next lecture

Lecture 10: first-order theories and DPLL(T). Model checking at the bit level stops where designs have 64-bit adders and memories. The next unit lets the solver reason directly about integers, arrays and uninterpreted functions: satisfiability modulo theories.

  • We study the eager approach (translate everything to SAT, as we did here) and the lazy one.
  • In the lazy approach a CDCL engine works on the Boolean skeleton while a theory solver checks conjunctions of literals.
  • We build smt.py: congruence closure for equality with uninterpreted functions, plugged into CDCL with conflict explanations and theory propagation.
← 返回课程目录