Resolution Proofs as a Data Structure for Logic Synthesis John Backes Marc Riedel Electrical.

Slides:



Advertisements
Similar presentations
The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota.
Advertisements

Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
The Analysis of Cyclic Circuits with Boolean Satisfiability John Backes, Brian Fett, and Marc Riedel Electrical Engineering, University of Minnesota.
Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept.
Algorithms and Data Structures for Logic Synthesis and Verification using Boolean Satisfiability John Backes Advisor: Marc Riedel
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
ECE 667 Synthesis & Verification - Boolean Functions 1 ECE 667 Spring 2013 ECE 667 Spring 2013 Synthesis and Verification of Digital Circuits Boolean Functions.
Equivalence Checking Using Cuts and Heaps Andreas Kuehlmann Florian Krohm IBM Thomas J. Watson Research Center Presented by: Zhenghua Qi.
Boolean Functions and their Representations
1 Linear-time Reductions of Resolution Proofs Omer Bar-Ilan Oded Fuhrmann Shlomo Hoory Ohad Shacham Ofer Strichman Technion.
Introduction to Logic Synthesis Alan Mishchenko UC Berkeley.
Formal Verification Group © Copyright IBM Corporation 2008 IBM Haifa Labs SAT-based unbounded model checking using interpolation Based on a paper “Interpolation.
DAG-Aware AIG Rewriting Alan Mishchenko, Satrajit Chatterjee, Robert Brayton Department of EECS, University of California Berkeley Presented by Rozana.
1 Linear-time Reductions of Resolution Proofs Omer Bar-Ilan Oded Fuhrmann Shlomo Hoory Ohad Shacham Ofer Strichman Technion.
USING SAT-BASED CRAIG INTERPOLATION TO ENLARGE CLOCK GATING FUNCTIONS Ting-Hao Lin, Chung-Yang (Ric) Huang Graduate Institute of Electrical Engineering,
Binary Decision Diagrams (BDDs)
Electrical and Computer Engineering Archana Rengaraj ABC Logic Synthesis basics ECE 667 Synthesis and Verification of Digital Systems Spring 2011.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Logic Synthesis: Past and Future Alan Mishchenko UC Berkeley.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
The Analysis of Cyclic Circuits with Boolean Satisfiability
Synthesis for Verification
SAT-based Methods: Logic Synthesis and Technology Mapping
Alan Mishchenko UC Berkeley
Delay Optimization using SOP Balancing
Deriving small unsatisfiable cores with dominators
SAT-Based Logic Optimization and Resynthesis
New Directions in the Development of ABC
Logic Synthesis CNF Satisfiability.
Alan Mishchenko Robert Brayton UC Berkeley
Applying Logic Synthesis for Speeding Up SAT
Versatile SAT-based Remapping for Standard Cells
SAT-based Methods: Logic Synthesis and Technology Mapping
Integrating an AIG Package, Simulator, and SAT Solver
A Boolean Paradigm in Multi-Valued Logic Synthesis
Synthesis for Verification
SAT-Based Logic Synthesis (yes, Logic Synthesis Is Everywhere
Georg Hofferek, Ashutosh Gupta, Bettina Könighofer, Jie-Hong Roland Jiang and Roderick Bloem Synthesizing Multiple Boolean Functions using Interpolation.
The Synergy between Logic Synthesis and Equivalence Checking
SAT-Based Area Recovery in Technology Mapping
Alan Mishchenko University of California, Berkeley
Canonical Computation without Canonical Data Structure
ECE 667 Synthesis and Verification of Digital Circuits
Canonical Computation Without Canonical Data Structure
Robert Brayton UC Berkeley
Scalable and Scalably-Verifiable Sequential Synthesis
Improvements to Combinational Equivalence Checking
SAT-based Methods for Scalable Synthesis and Verification
Resolution Proofs for Combinational Equivalence
SAT-Based Logic Synthesis (yes, Logic Synthesis Is Everywhere!)
Introduction to Logic Synthesis
Canonical Computation without Canonical Data Structure
SAT-Based Logic Synthesis
SAT-based Methods: Logic Synthesis and Technology Mapping
Recording Synthesis History for Sequential Verification
SAT-based Methods: Logic Synthesis and Technology Mapping
Delay Optimization using SOP Balancing
Logic Synthesis: Past and Future
Canonical Computation without Canonical Data Structure
SAT-Based Logic Synthesis (yes, Logic Synthesis Is Everywhere!)
SAT-based Methods: Logic Synthesis and Technology Mapping
SAT-Based Logic Synthesis (yes, Logic Synthesis Is Everywhere!)
Introduction to Logic Synthesis with ABC
SAT-Based Logic Synthesis
Alan Mishchenko Department of EECS UC Berkeley
Integrating AIG Package, Simulator, and SAT Solver
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

Resolution Proofs as a Data Structure for Logic Synthesis John Backes Marc Riedel Electrical and Computer Engineering University of Minnesota

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.

Data Structures And Inverter Graphs (AIGs) –Advantages: Compact. Easily convertible to CNFs. Scalable, efficient. –Disadvantages: Hard to perform large structural changes.

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.

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).

AIG Synthesis SAT-Sweeping (merging equivalent nodes)

AIG Synthesis SAT-Sweeping (merging equivalent nodes)

AIG Synthesis AIG re-writing –Local manipulations performed on windows –Local minimums can be reached

AIG Synthesis AIG re-writing –Local manipulations performed on windows –Local minimums can be reached

AIG Synthesis AIG re-writing –Local manipulations performed on windows –Local minimums can be reached

Resubstitution a.k.a. Functional Dependencies Given target: f (z 1,z 2,…,z n ), Given candidates: x 1 (z 1,z 2,…,z n ), x 2 (z 1,z 2,…,z n ), …, x m (z 1,z 2,…,z n ) is it possible to implement f (x 1,x 2,…,x m ) ?

Aig Synthesis Resubstitution –f (x 1,x 2 )?

Aig Synthesis Resubstitution –f (x 1,x 2 )? –Large changes –This question is formulated as a SAT instance. –Craig Interpolation provides implementation.

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

SAT?: ( f )(CNF Left )( f * )(CNF Right )(x 1 = x 1 * )(x 2 = x 2 * )…(x m = x m * ) AB f (x 1,x 2,…,x m ) ? If UNSAT, a proof of unsatisfiablility is generated. An implementation of f is generated from the proof. (Lee ‘07) Craig Interpolation

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)

A Resolution Proof Clauses 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 ) ( )

Example: Generating I ( a+¬c+d )( ¬a+¬c+d a+c ¬a+c ¬d )( d+¬c )( a+b ) ( c ¬c ) ( )

Example: Generating I ( a+c )( ¬a+c ¬d )( d+¬c ) ( c ) ( ¬c ) ( )

( a+c )( ¬a+c ¬d )( d+¬c ) ( c ) ( ¬c ) ( ) a c ¬a c Example: Generating I

)( ¬d )( d+¬c ) ( c ) ( ¬c ) ( ) a c ¬a c Example: Generating I

( ¬d ) ( c ) ( ¬c ) ( ) a c ¬a c Example: Generating I

a c ¬a c ¬d ( ) ( ¬d ) Example: Generating I

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.

Example Large portions of a network can be converted to a resolution proof. f j (x 1,x 2,x 3,x 4,x 5,x 6 )? f k (x 1,x 2,x 3,x 4,x 5,x 6 )?

Example f j (x 1,x 2,x 3,x 4,x 5,x 6 )?f k (x 1,x 2,x 3,x 4,x 5,x 6 )?

Example f j (x 1,x 2,x 3,x 4,x 5,x 6 )?f k (x 1,x 2,x 3,x 4,x 5,x 6 )?

Observation There are often many ways to prove a SAT instance unsatisfiable. Same/similar nodes shared between different proofs.

Example f j (x 1,x 2,x 3,x 4,x 5,x 6 )?f k (x 1,x 2,x 3,x 4,x 5,x 6 )?

Example f j (x 1,x 2,x 3,x 4,x 5,x 6 )?f k (x 1,x 2,x 3,x 4,x 5,x 6 )?

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)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Example Can (a + b) be resolved from (a + e + d)(a + b + d) (a + b + d + e) ? (Gershman ‘08)

Proposed method Select potential target functions with the same support set: f 1 (x 1,x 2,…,x m ), f 2 (x 1,x 2,…,x m ), …, f n (x 1,x 2,…,x m ) Generate collective resolution proof. Structure the proofs so that there are more shared nodes.

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.

Which nodes can be shared? ( f )(CNF Left )( f * )(CNF Right )(x 1 = x 1 * )(x 2 = x 2 * )…(x m = x m * ) A B f (x 1,x 2,…,x m ) : ( g)(CNF Left )( g * )(CNF Right )(x 1 = x 1 * )(x 2 = x 2 * )…(x m = x m * ) A B g (x 1,x 2,…,x m ) :

Which nodes can be shared? ( f )(CNF Left )( f * )(CNF Right )(x 1 = x 1 * )(x 2 = x 2 * )…(x m = x m * ) A B f (x 1,x 2,…,x m ) : ( g)(CNF Left )( g * )(CNF Right )(x 1 = x 1 * )(x 2 = x 2 * )…(x m = x m * ) A B g (x 1,x 2,…,x m ) : Only the assertion clauses differ

Restructuring Proofs Color the assertion clauses and descendants black. Color the remaining clauses white. Resolve black nodes from white nodes.

Restructuring Proofs

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.

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.

Benchmark Orig. Num. White Orig. Num. Black Num. Checked Num. Sharable % SharableTime (s) dk xp sse ex s s s planet styr s bcd table table

Can effect large structural changes. 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.

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.

Questions? Acknowledgments