Resolution Proofs as a Data Structure for Logic Synthesis
-
Upload
coby-riley -
Category
Documents
-
view
34 -
download
0
description
Transcript of Resolution Proofs as a Data Structure for Logic Synthesis
![Page 1: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/1.jpg)
Resolution Proofs as a Data Resolution Proofs as a Data Structure for Logic SynthesisStructure for Logic Synthesis
John Backes ([email protected])
Marc Riedel ([email protected])
Electrical and Computer Engineering
University of Minnesota
![Page 2: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/2.jpg)
Data Structures
• Sum of Products (SOPs)– Advantages: explicit, readily mapable.– Disadvantages: not scalable.
• Binary Decision Diagrams (BDDs)– Advantages: canonical, easily manipulated.– Disadvantages: not readily mapable, not
scalable.
![Page 3: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/3.jpg)
Data Structures
• And Inverter Graphs (AIGs)– Advantages:
• Compact.• Easily convertible to CNFs.• Scalable, efficient.
– Disadvantages:• Hard to perform large structural changes.
![Page 4: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/4.jpg)
Resolution Proofs
• Implicitly extracted from SAT solvers; converted to logic via Craig Interpolation.
• Utilize as a data structure to perform logic manipulations.
• Advantages:– Scalable, efficient.– Can effect large structural changes.
![Page 5: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/5.jpg)
AIG Synthesis• Re-writing
– Cuts are replaced by pre-computed optimal structures (Mishchenko ’06).
• SAT Sweeping– Nodes of an AIG can be merged by proven
equivalence (Zhu ‘06).
• SAT-Based Resubstitution– Target nodes are recomputed from other nodes
(Lee ‘07).
![Page 6: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/6.jpg)
AIG Synthesis
SAT-Sweeping (merging equivalent nodes)
![Page 7: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/7.jpg)
AIG Synthesis
SAT-Sweeping (merging equivalent nodes)
![Page 8: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/8.jpg)
AIG Synthesisz1 z2 zn
f1 fj-1 fj fk fk+1 fm
…………….
…. …. ….
• AIG re-writing– Local
manipulations performed on windows
– Local minimums can be reached
![Page 9: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/9.jpg)
AIG Synthesisz1 z2 zn
f1 fj-1 fj fk fk+1 fm
…………….
…. …. ….
• AIG re-writing– Local
manipulations performed on windows
– Local minimums can be reached
![Page 10: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/10.jpg)
AIG Synthesisz1 z2 zn
f1 fj-1 fj fk fk+1 fm
…………….
…. …. ….
• AIG re-writing– Local
manipulations performed on windows
– Local minimums can be reached
![Page 11: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/11.jpg)
Resubstitution a.k.a. Functional Dependencies
Given target:
f (z1,z2,…,zn),
Given candidates:x1(z1,z2,…,zn), x2(z1,z2,…,zn), …, xm(z1,z2,…,zn)
is it possible to implement f (x1,x2,…,xm)?
![Page 12: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/12.jpg)
Aig Synthesisz1 z2 zn
f1 fj-1 fj fk fk+1 fm
…………….
…. …. ….
x1
x2
f
• Resubstitution– f (x1,x2)?
![Page 13: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/13.jpg)
Aig Synthesisz1 z2 zn
f1 fj-1 fj fk fk+1 fm
…………….
…. …. ….
x1
x2
f
• Resubstitution– f (x1,x2)?
– Large changes– This question is
formulated as a SAT instance.
– Craig Interpolation provides implementation.
![Page 14: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/14.jpg)
Craig Interpolation
• Given formulas A and B such that A → ¬B, there exists I such that A → I → ¬B
• I only contains variables that are present in both A and B.
A
I
B
![Page 15: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/15.jpg)
SAT?: ( f )(CNFLeft)( f *)(CNFRight)(x1 = x1*)(x2 = x2
*)…(xm = xm*)
A B
• f (x1,x2,…,xm)?
• If UNSAT, a proof of unsatisfiablility is generated.
• An implementation of f is generated from the proof.
(Lee ‘07)
Craig Interpolation
![Page 16: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/16.jpg)
Resolution Proofs
• A proof of unsatisfiability for an instance of SAT forms a graph structure.
• The original clauses are called the roots and the empty clause is the only leaf.
• Every node in the graph (besides the leaves) is formed via Boolean resolution.– E.g.,: (c + d)(¬c + e) → (d + e)
![Page 17: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/17.jpg)
A Resolution ProofClauses of A are shown in red, and clauses of B are shown in blue.
(a + ¬c + d)(¬a + ¬c + d)(a+ c)(¬a + c)(¬d)(d + ¬c)(a + b)
(c) (¬c)
( )
![Page 18: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/18.jpg)
Example: Generating I
(a + ¬c + d)(¬a + ¬c + d)(a+ c)(¬a + c)(¬d)(d + ¬c)(a + b)
(c) (¬c)
( )
![Page 19: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/19.jpg)
Example: Generating I
(a+ c)(¬a + c)(¬d)(d + ¬c)
(c) (¬c)
( )
![Page 20: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/20.jpg)
(a+ c)(¬a + c)(¬d)(d + ¬c)
(c) (¬c)
( )
a c ¬a c
Example: Generating I
![Page 21: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/21.jpg)
)(¬d)(d + ¬c)
(c) (¬c)
( )
a c ¬a c
Example: Generating I
![Page 22: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/22.jpg)
(¬d)
(c) (¬c)
( )
a c ¬a c
Example: Generating I
![Page 23: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/23.jpg)
a c ¬a c
¬d
( )
(¬d)
Example: Generating I
![Page 24: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/24.jpg)
Generating Multiple Dependencies
• Often, goal is to synthesize dependencies for multiple functions with overlapping support sets.
• In this case, multiple proofs are generated and then interpolated.
![Page 25: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/25.jpg)
Example
Large portions of a network can be converted to a resolution proof.
fj (x1,x2,x3,x4,x5,x6)?
fk (x1,x2,x3,x4,x5,x6)?
![Page 26: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/26.jpg)
Example
fj (x1,x2,x3,x4,x5,x6)? fk (x1,x2,x3,x4,x5,x6)?
(a + b) (a + b) (a)
(a)
( )
…….. ……..(c + e) (c + e) (c)
(c)
( )
( )( )( )( )( )( ) ( )( )( )( )( )( )( )
![Page 27: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/27.jpg)
Example
fj (x1,x2,x3,x4,x5,x6)? fk (x1,x2,x3,x4,x5,x6)?
![Page 28: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/28.jpg)
Observation
• There are often many ways to prove a SAT instance unsatisfiable.
• Same/similar nodes shared between different proofs.
![Page 29: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/29.jpg)
Example
fj (x1,x2,x3,x4,x5,x6)? fk (x1,x2,x3,x4,x5,x6)?
( )( )( )( )( )( )( )( )( )( )( )( )( )( )
………….(a + b) (a + b) (a)
( )
(a)
(c + e) (c + e) (c)
(c)
( )
![Page 30: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/30.jpg)
Example
fj (x1,x2,x3,x4,x5,x6)? fk (x1,x2,x3,x4,x5,x6)?
![Page 31: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/31.jpg)
Restructuring Mechanism
• Some clause c can be resolved from some set of clauses W iff (W)(c) is unsatisfiable.
• The resolution proof of (W)(c) can be altered to show how c can be resolved from W.
(Gershman ‘08)
![Page 32: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/32.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a + b + c) (a + b + c) (a + e + d) (a + b + d) (a + b + d + e)
(a + b)
……………….
……………….
(Gershman ‘08)
![Page 33: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/33.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(Gershman ‘08)
![Page 34: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/34.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(e + d) (b + d) (b + d + e)
(Gershman ‘08)
![Page 35: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/35.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(e + d) (b + d) (b + d + e)
(d) (d + e)
(Gershman ‘08)
![Page 36: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/36.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(e + d) (b + d) (b + d + e)
(d) (d + e)
(d)
(Gershman ‘08)
![Page 37: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/37.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(e + d) (b + d) (b + d + e)
(d) (d + e)
(d)( )
(Gershman ‘08)
![Page 38: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/38.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(e + d) (b + d) (b + d + e)
(d) (d + e)
(d)(a + b)
(Gershman ‘08)
![Page 39: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/39.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(a + b)
(a + b + d)
(Gershman ‘08)
![Page 40: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/40.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a) (b) (a + e + d) (a + b + d) (a + b + d + e)
(a + b)
(a + b + d)
(Gershman ‘08)
![Page 41: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/41.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a + e + d) (a + b + d) (a + b + d + e)
(a + b)
(a + b + d)
(Gershman ‘08)
![Page 42: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/42.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a + b + c) (a + b + c) (a + e + d) (a + b + d) (a + b + d + e)
(a + b)
……………….
……………….
(Gershman ‘08)
![Page 43: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/43.jpg)
Example
Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e)?
(a + b + c) (a + b + c) (a + e + d) (a + b + d) (a + b + d + e)
(a + b)
……………….
……………….(a + b + d)
(Gershman ‘08)
![Page 44: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/44.jpg)
Proposed method
• Select potential target functions with the same support set: f1(x1,x2,…,xm), f2(x1,x2,…,xm), … , fn(x1,x2,…,xm)
• Generate collective resolution proof.
• Structure the proofs so that there are more shared nodes.
![Page 45: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/45.jpg)
Which nodes can be shared?
• For the interpolants to be valid:– The clause partitions A and B must remain
the same.– The global variables must remain the same.
![Page 46: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/46.jpg)
Which nodes can be shared?
( f )(CNFLeft)( f *)(CNFRight)(x1 = x1*)(x2 = x2
*)…(xm = xm*)
A B
f (x1,x2,…,xm):
( g)(CNFLeft)( g *)(CNFRight)(x1 = x1*)(x2 = x2
*)…(xm = xm*)
A B
g (x1,x2,…,xm):
![Page 47: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/47.jpg)
Which nodes can be shared?
( f )(CNFLeft)( f *)(CNFRight)(x1 = x1*)(x2 = x2
*)…(xm = xm*)
A B
f (x1,x2,…,xm):
( g)(CNFLeft)( g *)(CNFRight)(x1 = x1*)(x2 = x2
*)…(xm = xm*)
A B
g (x1,x2,…,xm):
Only the assertion clauses differ
![Page 48: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/48.jpg)
Restructuring Proofs
• Color the assertion clauses and descendants black.
• Color the remaining clauses white.
• Resolve black nodes from white nodes.
![Page 49: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/49.jpg)
Restructuring Proofs
![Page 50: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/50.jpg)
Restructuring Proofs
![Page 51: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/51.jpg)
Restructuring Proofs
![Page 52: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/52.jpg)
Proposition
The interpolants from restructured proofs are equivalent.
Proof:
•The roots of all white clauses are present in the original SAT instance.
•The global variables are the same for each SAT instance.
![Page 53: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/53.jpg)
Experiment
• Test to see to what extent proofs can be restructured.– How many black nodes can be resolved
from white nodes?
• Generated resolution proofs from benchmark circuits.– POs specified in terms of all PIs.
![Page 54: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/54.jpg)
BenchmarkOrig. Num.
WhiteOrig. Num.
BlackNum.
CheckedNum.
Sharable%
Sharable Time (s)
dk15 1743 581 581 175 30.12 0.04
5xp1 3203 1636 1636 275 16.81 0.18
sse 3848 2650 2650 563 21.25 0.28
ex6 4055 2731 2731 588 21.53 0.29
s641 6002 5148 5148 2269 44.08 0.46
s510 7851 5092 5092 1155 22.68 0.74
s832 15359 14826 14826 3358 22.65 3.67
planet 40516 43387 43387 10640 24.52 26.39
styr 44079 54128 54128 16578 30.63 33.88
s953 49642 46239 46239 12252 26.5 31.99
bcd 96385 109167 103514 34349 33.18 200
table5 137607 288461 69070 27848 40.32 200
table3 177410 283066 47279 24454 51.72 200
![Page 55: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/55.jpg)
Can effect large structural changes.
Discussion
![Page 56: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/56.jpg)
Discussion
• Preliminary results show that there is significant potential for node sharing.
• Techniques are highly scalable.– Calls to SAT solver are incremental.– Heuristics could improve scalability.
![Page 57: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/57.jpg)
Future Work
• Implement full synthesis routine.
• Improve conversion of resolution proofs to circuits (Backes and Riedel ICCAD’10).
• Try different decision variable orderings.
• Explore more general restructuring operations with resolution proofs.
![Page 58: Resolution Proofs as a Data Structure for Logic Synthesis](https://reader036.fdocuments.net/reader036/viewer/2022062421/56812a59550346895d8db635/html5/thumbnails/58.jpg)
Questions?
Acknowledgments