200 likes | 394 Views
Simultaneous CNF Encoder Optimization with SAT solver Setting Selection. 0407 CAD_B. Outline. Introduction SAT & CNF Problem Motivation Problem Description Input/Output Format and Example Evaluation Issues & Future Work Reference. Boolean Satisfiability.
E N D
Simultaneous CNF Encoder Optimization with SAT solver Setting Selection 0407 CAD_B
Outline • Introduction • SAT & CNF • Problem Motivation • Problem Description • Input/Output Format and Example • Evaluation • Issues & Future Work • Reference
Boolean Satisfiability • SATisfiability is the problem of determining if there exists an interpretation that satisfies a given Boolean formula • Given a suitable representation for a Boolean function f(X): • Find an assignment X* such that f(X*) = 1 (SAT) • Or prove that such an assignment does not exist (UNSAT) (i.e. f(X) = 0 for all possible assignments) • In the “classical” SAT problem, f(X) is represented in product-of-sums (POS) or conjunctive normal form (CNF) • Many decision (yes/no) problems can be formulated either directly or indirectly in terms of Boolean Satisfiability • Satisfiability problems can be defined on Boolean circuits/formulas
Why is SAT important • Theoretical importance: • First NP-complete problem (Cook, 1971) • Many practical applications: • Model Checking • Automatic Test Pattern Generation • Combinational Equivalence Checking • Planning in AI • Automated Theorem Proving • Software Verification • …
Conjunctive Normal Form • CNF
CNF Transformation • h=1?
Verification Miter
Motivation of the Problem • Efficiently solving the combinational single-output netlist is an important core engine, which is widely and frequently used for conquering the modern front-end problems • Logic rewriting, false path analysis, property checking, equivalence checking… • In practical usage, one application would solve numerous sub-problems where each sub-problem is formulated in a single-output netlist • Similar circuit characteristics: size, depth, and combinations • The runtime for solving a single-output function is decided by two factors: the CNF encoding and the SAT solving • Exploring the best CNF encoding setting and the best SAT solver setting by sampled sub-problems => reducing the total runtime for solving the numerous similar sub-problems
Outline • Introduction • SAT & CNF • Problem Motivation • Problem Description • Input/Output Format and Example • Evaluation • Issues & Future Work • Reference
Problem Description • For each case 3 10 Exploration phase expcnf –exp<sample1.v> <sample2.v> <sample3.v> <EncoderSetting> <SATSolverSetting> Solving phase expcnf –gen <EncoderSetting> <test.v> <CNF output>
Problem Description • Exploration phase • Learn something from these 3 samples • Output the SAT-solver setting (choice & parameters) • Solving phase • Conduct CNF encoding according to the information from the exploration phase • Output the DIMACS CNF format file
SAT solvers • Use only one (for each case) in single command line • Lingelingats (in name lingeline) • http://fmv.jku.at/lingeling/lingeling-ats-57807c8-131016.tar.gz • Glucose 3.0 (in name glucose) • http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-3.0.tgz • Minisat 2.2 (in name minisat) • http://minisat.se/downloads/minisat-2.2.0.tar.gz
I/O Format & Example Exploration phase Solving phase
Evaluaion • 2 open cases and 10 hidden cases for evaluation • Each case contains 3 samples for the exploration phase and 10 tests for the solving phase • Exploration phase • Time limit : 1800 sec. • If it exceeds, cost = 3000 and abort; otherwise, enter the solving phase • Solving phase • SAT or UNSAT must be correct (or we will be disqualified) • The cost is 4 × t1 + t2 only when t1 < 25 s and t2 < 100 s. Otherwise, the cost will be 300 • Final score • Total cost of 12 cases; the least one wins
Q&A • Are there any further information about the relation between sample and test designs • No, no further information we would provide, actually contestants would go to learn that. • Would you mind list all types of gate belonging to primitive gates? And what is the maximum input pin number of the gates? • Ok, we would go to provide them and also announce the maximum input number, but don’t worry about the abnormal case now. • Which solver is used for solving optimized CNF file after solving phase? Could participant choose ideal solver for their encoding? • Of course, you should specify the solver you want to used into the solver-setting file, which would be a executable line without cnf-file.
Issues & Future Work • Coding • Verilog parser + data structure of circuit • Embedded SAT-solver (?) • Studying • CNF encoding methods • SAT solver (understand corresponding parameters) • Learning skills of SAT solver
Reference • EE Testing course • CAD Contest 2014 • http://en.wikipedia.org/wiki/Boolean_satisfiability_problem • http://en.wikipedia.org/wiki/Tseitin_transformation • …