Simple Circuit-Based SAT Solver

Slides:



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

Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Aaron Bradley University of Colorado, Boulder
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
IBM Labs in Haifa © 2005 IBM Corporation Adaptive Application of SAT Solving Techniques Ohad Shacham and Karen Yorav Presented by Sharon Barner.
State-of-the-art in SAT solvers
Efficient Reachability Checking using Sequential SAT G. Parthasarathy, M. K. Iyer, K.-T.Cheng, Li. C. Wang Department of ECE University of California –
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
1 FRAIGs: Functionally Reduced And-Inverter Graphs Adapted from the paper “FRAIGs: A Unifying Representation for Logic Synthesis and Verification”, by.
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.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
MBSat Satisfiability Program and Heuristics Brief Overview VLSI Testing B Marc Boulé April 2001 McGill University Electrical and Computer Engineering.
Enhancing and Integrating Model Checking Engines Robert Brayton Alan Mishchenko UC Berkeley June 15, 2009.
Parallelizing MiniSat I-Ting Angelina Lee Justin Zhang May 05, Final Project Presentation.
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
Efficient SAT Solving Under Assumptions Alexander Nadel 1 and Vadim Ryvchin 1,2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12, Trento, Italy.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 Alan Mishchenko Research Update June-September 2008.
Enhancing Model Checking Engines for Multi-Output Problem Solving Alan Mishchenko Robert Brayton Berkeley Verification and Synthesis Research Center Department.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Global Delay Optimization using Structural Choices Alan Mishchenko Robert Brayton UC Berkeley Stephen Jang Xilinx Inc.
Introduction to Formal Verification
Hybrid BDD and All-SAT Method for Model Checking
Chih-Fan Lai1, J.-H. Roland Jiang1, and Kuo-Hua Wang2
Synthesis for Verification
Parallelism in SAT Solvers
Alan Mishchenko UC Berkeley
Improving Runtime and Memory Requirements in EDA Applications
SAT-Based Logic Optimization and Resynthesis
Robert Brayton Alan Mishchenko Niklas Een
New Directions in the Development of ABC
Logic Synthesis CNF Satisfiability.
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
Synthesis for Verification
LPSAT: A Unified Approach to RTL Satisfiability
Introduction to Formal Verification
SAT-Based Area Recovery in Technology Mapping
Canonical Computation without Canonical Data Structure
ECE 667 Synthesis and Verification of Digital Circuits
SAT-Based Optimization with Don’t-Cares Revisited
Canonical Computation Without Canonical Data Structure
Scalable and Scalably-Verifiable Sequential Synthesis
Improvements to Combinational Equivalence Checking
SAT-based Methods for Scalable Synthesis and Verification
GLA: Gate-Level Abstraction Revisited
Resolution Proofs for Combinational Equivalence
Automatic Test Pattern Generation
Integrating an AIG Package, Simulator, and SAT Solver
Introduction to Logic Synthesis
Canonical Computation without Canonical Data Structure
Alan Mishchenko UC Berkeley
Recording Synthesis History for Sequential Verification
Alan Mishchenko UC Berkeley
Logic Synthesis: Past and Future
Canonical Computation without Canonical Data Structure
SAT-based Methods: Logic Synthesis and Technology Mapping
SAT-Based Logic Synthesis
GRASP-an efficient SAT solver
Alan Mishchenko Department of EECS UC Berkeley
Integrating AIG Package, Simulator, and SAT Solver
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Alan Mishchenko Robert Brayton UC Berkeley
Improving Runtime and Memory Requirements in EDA Applications
Presentation transcript:

Simple Circuit-Based SAT Solver Alan Mishchenko

Outline Motivation Implementation Experiment

Motivation for a New SAT Solver Runtime of several applications is dominated by SAT SAT sweeping Sequential SAT sweeping (register/signal correspondence) Accumulation of structural choices Computing don’t-cares in a window The problems solved by SAT solver in these applications have the following in common Incremental (each problem has +/- 10 AIG nodes, compared to the previous problem solved) Relatively easy (less than 100 conflicts) Numerous (10K-100K problems)

Motivation for a Circuit-Based Solver CNF is an intermediate step MiniSat uses more memory to represent CNF, which is not needed for easy problems Circuit is a helpful data-structure It is the primary problem representation It is more compact than CNF It has useful information for the solver Some of these observations are well known in the ATPG community

Implementation High-level view of the solver Solver data structures Recursive procedure Additional implementation details

High-Level View of the Solver Input: Multi-output combinational AIG Output: SAT solving status for each output SAT: satisfiable (provide a counter-example) UNSAT: unsatisfiable UNDECIDED: the solver’s resource limit is reached status_array SatSolver( Sat_Solver * p, Aig_Man * pMan ) { for each primary output Out of pMan { if ( Out is driven by a constant ) status = DeriveStatusSimple( Out ); else { PQueueAssume( p, DrivingNode( Out ) ); status = SatSolve_rec( p ); } AddStatusToArray( status_array, status ); return status_array;

Data Structures Constraint data-base (AIG) Propagation queue (PQueue) Each node is labeled with two binary flags Assign: Set to 1 iff the node is assigned a value Value: Set to 1 iff the node’s current value is 1 Propagation queue (PQueue) The sequence of assignments made Justification queue (JQueue) The set of nodes to be justified The output is assigned 0 while inputs are unassigned Node vector containing a SAT assignment Used to PI nodes participating in a counter-example after a satisfiable SAT run

Recursive SAT Procedure status SatSolve_rec( Sat_Solver * p ) { if ( PQueuePropagate( p ) == UNSAT ) return UNSAT; if ( JQueueIsEmpty( p ) ) return SAT; Aig_Node * Var = JQueueSelectVariable( p ); int mark = PQueueMarkCurrentPosition( p ); PQueueAssume( p, !Var ); if ( SatSolve_rec( p ) == SAT ) return SAT; PQueueCancelUntil( mark ); PQueueAssume( p, Var ); return UNSAT; }

Implementation Details JQueue is not implemented as an array (as opposed to the traditional implementation as a linked list) Before each decision JQueue is duplicated and stored away Non-chronological backtracking can be added Need two additional data-structures For each assigned node, save its level For each assigned node, save its reason (NULL, if decision) Recording learned clauses can be added A learned clause is derived after each conflict Constraint propagation on learned clauses can be added Watched literal scheme can be used It is important to keep only learned clauses in the data-base this allows the solver to derive incomplete assignments

Experimental Results (SAT)

Experimental Results (CEC) CEC results for 8 hard industrial instances. Runtime in minutes on Intel Q9450 @ 2.66 Ghz. Time1 is “cec” in ABC809xx. Time2 is “&cec” in abc90329. Timeout is 1 hour. Less than 100 Mb of RAM was used in these experiments.

Why MiniSAT Is Slower? Requires multiple intermediate steps Window  AIG  CNF  Solving Instead of Window  Solving Uses too much memory Solver + CNF = 140 bytes / AIG node Instead of 8-16 bytes / AIG node Decision heuristics Are not aware of the circuit structure Instead of Using circuit information