Algorithm Search⌘K

Techniqueadvanced

Partitioned transition relation

Also called early quantification, conjunctive partitioning.

Keeps the transition relation as a list of BDD conjuncts and quantifies each variable as soon as no later conjunct uses it, so image computation stays small.

A partitioned transition relation keeps the transition relation of a circuit as a list of small BDDs whose conjunction is the relation, instead of one large BDD. To compute an image, it conjoins the set of states with the parts one at a time, and it quantifies each present-state or input variable as soon as no remaining part uses it. This step, early quantification, is exact because ∃v. (A∧B)=A∧∃v. B\exists v.\,(A \wedge B) = A \wedge \exists v.\,B when AA does not depend on vv. Burch, Clarke and Long (1991) introduced it. Here "transition relation" means the relation T(s,x,y)T(s, x, y) on present states, inputs and next states, not the next-state functions. The transition-function method uses those functions and builds no relation. Symbolic reachability is the fixed-point loop that calls either one as its image step.

In plain words

To find the states a circuit can reach in one clock tick, you combine the set of present states with a rule that links present states to next states, and then you forget the present states. For a big circuit the full rule is too large to write down. So keep one small rule for each register bit, and add the rules one by one. When no rule that is still to come mentions a present-state bit or an input, forget that bit at once. The pieces you carry along stay small, and at the end you get the same answer as with the full rule.

When it applies

  • The system is synchronous, so the relation is a conjunction: T(s,x,y)=⋀i=1mTiT(s, x, y) = \bigwedge_{i=1}^{m} T_i with Ti=(yi≡δi(s,x))T_i = (y_i \equiv \delta_i(s, x)). Each TiT_i has a BDD about as small as δi\delta_i, while the BDD of TT can be far larger.
  • Each δi\delta_i depends on few variables, so many variables are used by few parts and can be quantified early. Circuits with local next-state logic fit well; a circuit where every next-state function depends on every latch gains little.
  • For asynchronous or interleaving systems, the relation is a disjunction of the moves of the components. Existential quantification distributes over disjunction with no condition, so the image is the union of the images of the parts; see the variations.

The template

The set of states is S(s)S(s), the parts are T1,…,TkT_1, \ldots, T_k (one per latch, or clusters of them), and Q=s∪xQ = s \cup x is the set of variables to quantify. The next-state variables yy are never quantified.

  1. IMAGE-PARTITIONED(S, T₁, ..., Tₖ)
  2. 1 order T₁, ..., Tₖ by a heuristic
  3. 2 for j ← 1 to k do
  4. 3 Eⱼ ← (variables of Q in Tⱼ) minus (variables in Tⱼ₊₁, ..., Tₖ) minus (E₁ ∪ ... ∪ Eⱼ₋₁)
  5. 4 E₀ ← variables of Q in no Tⱼ
  6. 5 R ← ∃E₀. S
  7. 6 for j ← 1 to k do
  8. 7 R ← ∃Eⱼ. (R ∧ Tⱼ)
  9. 8 return R with each yᵢ renamed to sᵢ

Line 7 is one relational product (AND-EXISTS), which a BDD package does in one pass without building R∧TjR \wedge T_j; see BDD quantification. Line 3 puts each variable of QQ in the set of the last part that uses it.

Lemma (early quantification). If v∉supp(A)v \notin \mathrm{supp}(A), then ∃v. (A∧B)=A∧∃v. B\exists v.\,(A \wedge B) = A \wedge \exists v.\,B. The same holds for a set VV of variables with V∩supp(A)=∅V \cap \mathrm{supp}(A) = \emptyset.

Proof. By the Shannon expansion, ∃v. F=F∣v=0∨F∣v=1\exists v.\,F = F|_{v=0} \vee F|_{v=1}. Since AA does not depend on vv, A∣v=0=A∣v=1=AA|_{v=0} = A|_{v=1} = A. So

∃v. (A∧B)=(A∧B∣v=0)∨(A∧B∣v=1)=A∧(B∣v=0∨B∣v=1)=A∧∃v. B.\exists v.\,(A \wedge B) = (A \wedge B|_{v=0}) \vee (A \wedge B|_{v=1}) = A \wedge (B|_{v=0} \vee B|_{v=1}) = A \wedge \exists v.\,B.

For a set V={v1,…,vr}V = \{v_1, \ldots, v_r\}, write ∃V\exists V as ∃v1⋯∃vr\exists v_1 \cdots \exists v_r and apply the one-variable case rr times, from the inside out. Each ∃vi. B′\exists v_i.\,B' again does not add v1,…,vrv_1, \ldots, v_r to the support of AA. □\square

Theorem (same image as the monolithic relation). IMAGE-PARTITIONED returns ∃Q. (S∧T1∧⋯∧Tk)\exists Q.\,\big(S \wedge T_1 \wedge \cdots \wedge T_k\big), with yy renamed to ss, for every order of the parts.

Proof. Let Fj=E0∪E1∪⋯∪EjF_j = E_0 \cup E_1 \cup \cdots \cup E_j. We show that after the jj-th pass of line 7,

R=∃Fj. (S∧T1∧⋯∧Tj).R = \exists F_j.\,(S \wedge T_1 \wedge \cdots \wedge T_j).

For j=0j = 0 this is line 5. Assume it for j−1j - 1. By line 3 and line 4, no variable of Fj−1F_{j-1} is in TjT_j: a variable in E0E_0 is in no part, and a variable in ElE_l with l<jl < j is in no part after TlT_l. So the lemma, with A=TjA = T_j and V=Fj−1V = F_{j-1}, gives

R∧Tj=(∃Fj−1. (S∧T1∧⋯∧Tj−1))∧Tj=∃Fj−1. (S∧T1∧⋯∧Tj),R \wedge T_j = \big(\exists F_{j-1}.\,(S \wedge T_1 \wedge \cdots \wedge T_{j-1})\big) \wedge T_j = \exists F_{j-1}.\,(S \wedge T_1 \wedge \cdots \wedge T_j),

and line 7 adds ∃Ej\exists E_j in front. After the last pass, R=∃Fk. (S∧T)R = \exists F_k.\,(S \wedge T). Every variable of QQ is in FkF_k: if it is in no part, it is in E0E_0, and otherwise it is in EjE_j for the last jj whose part uses it. So Fk=QF_k = Q. The order of line 1 was arbitrary. ■\blacksquare

The theorem is all that is proved here. That the intermediate BDDs are smaller than the BDD of TT is measured, not proved: Burch, Clarke and Long, and Ranjan and coauthors, report it on benchmark circuits, and in the worst case an intermediate RR can be as large as the monolithic product.

Classic examples

A three-bit machine. Take the machine of the image computation example: δ1=s1⊕x\delta_1 = s_1 \oplus x, δ2=s1∧s2\delta_2 = s_1 \wedge s_2, δ3=x∨s2\delta_3 = x \vee s_2 and S=(s1⊕s2)∧¬s3S = (s_1 \oplus s_2) \wedge \neg s_3. With the order T2,T3,T1T_2, T_3, T_1, line 3 gives E1=∅E_1 = \emptyset, E2={s2}E_2 = \{s_2\}, E3={s1,x}E_3 = \{s_1, x\}, and line 4 gives E0={s3}E_0 = \{s_3\}.

step quantified RR
line 5 s3s_3 s1⊕s2s_1 \oplus s_2
with T2T_2 none (s1⊕s2)∧¬y2(s_1 \oplus s_2) \wedge \neg y_2
with T3T_3 s2s_2 ¬y2∧(y3≡x∨¬s1)\neg y_2 \wedge (y_3 \equiv x \vee \neg s_1)
with T1T_1 s1,xs_1, x ¬y2∧(y1∨y3)\neg y_2 \wedge (y_1 \vee y_3)

The result is {100,101,001}\{100, 101, 001\} as y1y2y3y_1 y_2 y_3, the same as the range method gives, and every step was checked by enumeration. No intermediate RR has more than 4 variables, while S∧TS \wedge T has 7.

Reachable states. Symbolic reachability iterates this image until the set of reached states stops growing. It is the setting in which Burch, Clarke and Long measured the method.

Sequential equivalence. The product machine of two circuits has the parts of both, and its next-state logic is local to each circuit. So the parts of one circuit never mention the latches of the other, and early quantification separates them well. This is how BDD-based sequential equivalence checking computes reachable states.

Model checking of CTL. The preimage ∃y,x. (S(y)∧T)\exists y, x.\,(S(y) \wedge T) behind EX\mathsf{EX} in symbolic model checking uses the same schedule, with yy and xx quantified and ss kept.

Variations

  • Clustering. Conjoin neighbouring parts into clusters while the BDD of a cluster stays under a size limit. Fewer, larger parts mean fewer relational products. Ranjan and coauthors (1995) gave heuristics to order the parts and to form the clusters, and measured their effect on benchmark circuits.
  • Disjunctive partitioning. For T=T1∨⋯∨TkT = T_1 \vee \cdots \vee T_k, ∃Q. (S∧T)=⋁j∃Q. (S∧Tj)\exists Q.\,(S \wedge T) = \bigvee_j \exists Q.\,(S \wedge T_j) with no condition on supports, because ∃\exists distributes over ∨\vee. Burch, Clarke and Long used this for asynchronous systems, where one component moves at a time.
  • Preimage. Quantify yy and xx, keep ss, with the same schedule over the parts.
  • The transition-function method. Do not build any relation; constrain the next-state functions by SS and compute their range. See transition function image computation.

Pitfalls

  • Quantifying too early. ∃\exists does not distribute over ∧\wedge in general. With A=xA = x and B=¬xB = \neg x, ∃x. (A∧B)=0\exists x.\,(A \wedge B) = 0, but (∃x. A)∧(∃x. B)=1(\exists x.\,A) \wedge (\exists x.\,B) = 1. A variable may be quantified only after the last part that uses it.
  • Quantifying yy. The next-state variables are the result. Quantifying any of them gives a projection of the image, not the image.
  • The variable order. The BDD of yi≡δiy_i \equiv \delta_i is small only if yiy_i sits next to the support of δi\delta_i in the order. The usual choice interleaves sis_i and yiy_i, which also makes the final renaming of line 8 cheap. See variable ordering.
  • The order of the parts. Every order gives the same image, but a bad order keeps variables alive for long and gives large intermediate BDDs. The theorem says nothing about sizes.

Exercises

  1. Prove that ∃v. (A∨B)=(∃v. A)∨(∃v. B)\exists v.\,(A \vee B) = (\exists v.\,A) \vee (\exists v.\,B) for all AA and BB, and use it to show that disjunctive partitioning gives the exact image.
  2. Find AA and BB, with vv in the supports of both, such that ∃v. (A∧B)≠A∧∃v. B\exists v.\,(A \wedge B) \ne A \wedge \exists v.\,B.
  3. In the three-bit example, run the template with the order T1,T2,T3T_1, T_2, T_3. Give E0,…,E3E_0, \ldots, E_3 and the largest number of variables of an intermediate RR.
  4. For parts with the supports {s1,x1}\{s_1, x_1\}, {s1,s2}\{s_1, s_2\}, {s2,x2}\{s_2, x_2\} and {s3}\{s_3\} (besides their own yiy_i), find an order that quantifies a variable after every part.

References

  1. J. R. Burch, E. M. Clarke and D. E. Long, Symbolic model checking with partitioned transition relations, VLSI 91, Edinburgh, IFIP Transactions A-1, 49 to 58, 1991, conjunctive partitioning for synchronous circuits, disjunctive partitioning for asynchronous ones, and the early quantification of variables
  2. R. K. Ranjan, A. Aziz, R. K. Brayton, B. Plessier and C. Pixley, Efficient BDD algorithms for FSM synthesis and verification, IWLS 1995, the heuristics that order the conjuncts and cluster them up to a size limit, and the measured results on benchmark circuits
  3. Edmund M. Clarke, Orna Grumberg and Doron A. Peled, Model Checking, MIT Press, 1999, Chapter 6 (symbolic model checking, the relational product and partitioned transition relations)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples