Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept.

Slides:



Advertisements
Similar presentations
Model Checking Base on Interoplation
Advertisements

The behavior of SAT solvers in model checking applications K. L. McMillan Cadence Berkeley Labs.
The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota.
Exploiting SAT solvers in unbounded model checking K. L. McMillan Cadence Berkeley Labs.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
The Analysis of Cyclic Circuits with Boolean Satisfiability John Backes, Brian Fett, and Marc Riedel Electrical Engineering, University of Minnesota.
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 - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
Proof-based Abstraction Presented by Roman Gershman Ken McMillan, Nina Amla.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
On-The-Fly Resolve Trace Minimization Ohad Shacham and Karen Yorav IBM Haifa Research Laboratory.
1 Linear-time Reductions of Resolution Proofs Omer Bar-Ilan Oded Fuhrmann Shlomo Hoory Ohad Shacham Ofer Strichman Technion.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Formal Verification Group © Copyright IBM Corporation 2008 IBM Haifa Labs SAT-based unbounded model checking using interpolation Based on a paper “Interpolation.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
ECE 667 Synthesis and Verification of Digital Systems
1 Linear-time Reductions of Resolution Proofs Omer Bar-Ilan Oded Fuhrmann Shlomo Hoory Ohad Shacham Ofer Strichman Technion.
7/13/2003BMC A SAT-Based Approach to Abstraction Refinement in Model Checking Bing Li, Chao Wang and Fabio Somenzi University of Colorado at Boulder.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Boolean Satisfiability and SAT Solvers
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: SAT SAT applied in equivalence checking.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
Property Directed Reachability (PDR) Using Cubes of Non-state Variables With Property Directed Reachability Using Cubes of Non-state Variables With Property.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Boolean Satisfiability Present and Future
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
BDS – A BDD Based Logic Optimization System Presented by Nitin Prakash (ECE 667, Spring 2011)
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
1 Alan Mishchenko Research Update June-September 2008.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Resolution Proofs as a Data Structure for Logic Synthesis John Backes Marc Riedel Electrical.
Synthesis for Verification
Alan Mishchenko UC Berkeley
Logic Synthesis CNF Satisfiability.
Lifting Propositional Interpolants to the Word-Level
Mining backbone literals in incremental SAT
A Boolean Paradigm in Multi-Valued Logic Synthesis
Georg Hofferek, Ashutosh Gupta, Bettina Könighofer, Jie-Hong Roland Jiang and Roderick Bloem Synthesizing Multiple Boolean Functions using Interpolation.
SAT-Based Area Recovery in Technology Mapping
Canonical Computation without Canonical Data Structure
ECE 667 Synthesis and Verification of Digital Circuits
Canonical Computation Without Canonical Data Structure
SAT-based Methods for Scalable Synthesis and Verification
Resolution Proofs for Combinational Equivalence
Efficient MUS Extraction with Resolution
Canonical Computation without Canonical Data Structure
Canonical Computation without Canonical Data Structure
SAT-based Methods: Logic Synthesis and Technology Mapping
SAT-Based Logic Synthesis
Faster Extraction of High-Level Minimal Unsatisfiable Cores
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept. ECE

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

Craig Interpolation Cont. For an instance of unsatisfiablity, if the clauses are divided into sets A and B then A → ¬B. –An interpolant I can be generated from a proof of unsatisfiability of A and B. –The structure of this proof influences the structure of I

Applications Model Checking 1 –Interpolants are used to over approximate the set of reachable states in a transition relation. Functional Dependencies 2 –Interpolants are used to generate a dependency function in terms of a specified support set. –The size of the interpolant directly correlates to the size of the circuit implementation. 1 (K. L. McMillan. Interpolation and SAT-based model checking. ICCAV, 2003.) 2 C.-C. Lee, J.-H. R. Jiang, C.-Y. Huang, and A. Mishchenko. Scalable exploration of functional dependency by interpolation and incremental SAT solving. ICCAD, 2007.

Generating Interpolants A method was proposed by P. Pudlák et al. 1 A similar method was proposed by K. L. McMillan 2 –In this work we build off this procedure 1 P. Pudlak. Lower bounds for resolution and cutting plane proofs and monotone computations. Journal of Symbolic Logic, 62:981– 998, (K. L. McMillan. Interpolation and SAT-based model checking. In International Conference on Computer Aided Verification, pages 1– 13, 2003.)

Resolution Proofs A proof of unsatisfiability for an in 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 roots) is formed via Boolean resolution. –I.e.: (c + d)(¬c + e) → (d + e) –Here “ c ” is referred to as the pivot variable.

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

Generating Interpolants Interpolants are generated by calling a recursive function on the empty clause. Logic gates are created on the intermediate nodes. –The function of the gate depends on which set of root nodes the pivot variable is present in. The procedure terminates on root nodes.

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

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

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

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

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

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

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

Generating I Example >

Draw Backs Model Checking –Interpolants that are large over approximations can trigger false state reachability. Functional Dependencies –In many cases the structure of the interpolant may be very redundant and large.

Proposed Solution Goal: reduce size of an interpolant generated from a resolution proof. –Change the structure of a proof with the aim of reducing interpolant size. –In general, the less intermediate nodes in the proof, the smaller then interpolant.

Proposition 1 Nodes resolved only from A (or B) can be considered as roots of A (or B). Proof: Given clauses C, D, and E such that (C)(D) → (E), (C)(D) ≡ (C)(D)(E). A I B

Example (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( )

Example (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( )

Example (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (d+¬c) ( ) (¬c)(c)

Example (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (d+¬c) ( ) (¬c)(c) 0

Observation Proofs with few resolutions between clauses of A and B will tend to have smaller interpolants. –We refer to nodes that have ancestors for A and B as mixed nodes. –We refer to proofs with few mixed nodes as being more disjoint. Our goal: find a more disjoint proof before generating the interpolant.

Proposition 2 If node c in a proof is implied by root nodes R, then all assignments that satisfy the clauses of R also satisfy c. Proof: since R → c, whenever R = 1, c = 1.

SAT Based Methods Since R → c the SAT instance (R)(¬c) will be unsatisfiable. R. Gershman used this observation to find Minimum Unsatisfiable Cores (MUCs) for resolution proofs 1. 1 R. Gershman, M. Koifman, and O. Strichman. An approach for extracting a small unsatisfiable core. Formal Methods in System Design, 2008.

Example What if we want to know if (¬c) can be implied by A? Check the satisfiability of: (a + ¬c + d)(¬a + ¬c + d)(a+ c)(¬a + c)(¬d)(c) Root of A? (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( ) = UNSAT!

Example What if we want to know if ( ) can be implied by A? Check the satisfiability of: (a + ¬c + d)(¬a + ¬c + d)(a+ c)(¬a + c)(¬d) Root of A? (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( ) = UNSAT!

Example What if we want to know if ( ) can be implied by A? Check the satisfiability of: (a + ¬c + d)(¬a + ¬c + d)(a+ c)(¬a + c)(¬d) Root of A? (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( ) = UNSAT!

Proposed Method

Optimizations The complexity of this approach is dominated by solving different SAT instances. We can reduce the number of calls to the SAT solver by checking mixed nodes in specific orders.

Optimization 1 If node 1 is a root of A (B) then we don’t need to check node 3....( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) ……..

If node 1 is a root of A (B) then we don’t need to check node 3....( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 1

If nodes 1 and 2 are roots of A (B) then we don’t need to check nodes 3 4 or 5....( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 1

If nodes 1 and 2 are roots of A (B) then we don’t need to check nodes 3 4 or 5....( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 1 Checking nodes near the leaf first is a backward search

If nodes and 3 and 4 are roots of A (B) then node 1 can be considered a root of A (B)...( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 2

If nodes and 3 and 4 are roots of A (B) then node 1 can be considered a root of A (B)...( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 2

If nodes and 3 and 4 are roots of A (B) then node 1 can be considered a root of A (B)...( )( )( )( )( )( )( )... (3) (4 5) (1 2) ( ) …….. Optimization 2 Checking nodes near the roots first is a forward search

Forward vs. Backward Search Backward Search –Eliminates many mixed nodes at once –May take many SAT checks before we prove a node to be a root. Forward Search –Nodes toward the beginning are more likely to be roots –May require more checks then backward search.

Incremental Techniques Each call to the SAT solver is very similar. –Each instance is in the form (A)(¬c) or (B)(¬c). The negated literals of clause c can be set as unit assumptions to the SAT Solver. –We then just solve the same instance repeatedly with different assumptions. Variables a off and b off can be added to the clauses of A and B respectively.

Example What if we want to know if (d + ¬c) can be implied by A? Assume a off = 0, b off = 1, d = 0, and c = 1. Then check the satisfiability of: (a + ¬c + d + a off )(¬a + ¬c + d + a off )(a+ c + a off )(¬a + c + a off ) (¬d + a off )(d + ¬c + b off )(a + b + b off ) Root of A? (a+¬c+d)(¬a+¬c+d a+c ¬a+c ¬d)(d+¬c)(a+b) (c ¬c) ( ) = UNSAT!

Experiment Searched for different functional dependencies in benchmark circuits. –Found small support sets for POs expressed in terms of other POs and PIs. Performed forward and backward search on the resolution proofs. –The number of SAT checks was limited to –This limit was reached for the larger proofs.

Experiment Cont. After the new interpolants from the modified resolution proofs are. generated, the size is compared to the un modified proofs. The size after running logic minimization on the modified and non modified interpolants is also compared.

Results (table3 benchmark) table3 Benchmark: Forward Search Function# NodesOrig SizeNew Size CheckedFoundTime (s)Orig ReducedNew ReducedRatio

Results (table3 benchmark) table3 Benchmark: Backward Search FunctionNodesOrig SizeNew SizeCheckedFoundTime (s)Orig ReducedNew ReducedRatio

Results (Summarized) Forward Search BenchmarkNodesCheckedFound% Change% Change ReducedTime (s) apex %-2.73%69.48 apex %-1.47% styr %-5.71%18.3 s %-8.41%7.62 s %-4.43%15.51 s %-2.33%97.45 s %-3.70%89.16 table %-4.08%48.05 vda %-17.33%27.34 sbc %-1.08%19.09

Results (Summarized) Backward Search BenchmarkNodesCheckedFound% Change% Change ReducedTime (s) apex %-5.84%72.03 apex %-5.24% styr %-10.14%19.36 s %-9.59%7.98 s %-5.19%15.83 s %-2.78%95.37 s %-6.20%82.86 table %-15.83%81.16 vda %-19.72%27.07 sbc %-0.92%19.09

Discussion Why are some interpolants significantly reduced and others not? –Don’t care conditions that exist can be simplified. –Function f can be either 0 or 1 for the assignment g = 1, h = 0.

Summary The new method finds a lot of variability in some of the interpolants. –After running logic minimization the results are less significant but still better then the size of the interpolants for the non altered proofs.

Future Work Applications in model checking –Can these techniques be used to generate interpolants that are less of an over approximation? SAT solver decision heuristics –This approach is still somewhat biased by the initial proof. New data structure for synthesis? –Can the incremental techniques be more refined to allow changes to a resolution proof correspond to changes to an entire circuit?

Questions? Thanks to FENA and NSF Career Award