Download presentation
Presentation is loading. Please wait.
Published byDeirdre Moore Modified over 6 years ago
1
Canonical Computation without Canonical Data Structure
Alan Mishchenko Robert Brayton Department of EECS, UC Berkeley Luca Amarú Synopsys Inc., Design Group, Sunnyvale, California, USA Ana Petkovska Mathias Soeken Integrated Systems Laboratory, EPFL, Lausanne, Switzerland
2
Overview Motivation Definition of canonicity
Fundamentals of SAT solving Canonicity in SAT-based computations for satisfiable calls (LEXSAT) for unsatisfiable calls (LEXUNSAT) Experiments Conclusion 2
3
Motivation Complementary data structures: BDDs vs SAT BDDs SAT
trading space for time BDDs canonical, easy to use but difficult to construct (may mem out) SAT non-canonical, easy to construct but difficult to use (may time out) The conclusion is: SAT is “better” in most cases Can we improve SAT by borrowing from the BDD world? How about canonicity? - Yes, we can!
4
What Is Canonicity? Representing Boolean functions in a unique way
for a given Boolean function with a given variable order, only one representation is possible Computing Boolean functions in a unique way for a given Boolean function with a given variable order, only one result of computation is possible In the BDD world, we did not distinguish the two In the SAT world, we cannot have both However, we can have canonical computation!
5
SAT in Practical Applications
Netlist Answer: “SAT” or “UNSAT” CNF SAT solver CNF generator CNF Design constraints If SAT, a counter-example If UNSAT, a core User cost functions Both counter-examples and cores are useful in SAT-based applications. In practice, cores are often represented as subsets of assumptions that make the problem UNSAT.
6
Incremental SAT Initial CNF Round 1: SAT solver Initial assumptions Additional CNF Round 2: SAT solver New assumptions Additional CNF Round 3: SAT solver New assumptions Assumptions are CNF clauses used only in the current round – they are handled differently from the rest of CNF clauses.
7
Proposed Modification to SAT
Traditional: Input: CNF, assumptions Output: (1) satisfying assignment or (2) UNSAT core, that is, a subset of literals that make the instance unsatisfiable Proposed: Input: CNF, assumptions, variable order (1) canonical satisfying assignment or (2) canonical UNSAT core, that is, subset of literals that make the instance unsatisfiable
8
The Main Idea Canonicity is achieved by adopting a variable order
Now all satisfying assignments can be compared, and the smallest one can be returned Similarly, all UNSAT cores can be compared, and the smallest one can be returned
9
Choosing The Smallest How to choose the smallest assignment (or core)?
Since we have a variable order, we order all assignments (cores) using this order, and take the first one in the list Fortunately, there is no need to compute all assignments in order to find the minimum one
10
LEXSAT Input: cnf F Output: the smallest satisfying assignment as literals in array A array LEXSAT( cnf F ) { Initialize array A to have all negative literals in the given order; for ( i = 0; i <|A|; i++ ) { if ( F is UNSAT under assumptions A[0] through A[i] ) invert the polarity of literal A[i] to be positive; } return A;
11
LEXUNSAT Input: cnf F Output: the smallest satisfying assignment as literals in array A array LEXUNSAT( cnf F ) { Initialize array A to have all positive literals in the given order; for ( i = 0; i <|A|; i++ ) { if ( F is UNSAT under assumptions in A without A[i] ) invert the polarity of literal A[i] to be negative; } return A;
12
Applications of LEX{SAT,UNSAT}
Canonical SAT-based ISOP (similar to BDD-based ISOP) useful in collapsing/refactoring, timing-driven optimization, etc Computing minimal supports in node minimization, resubstitution, Boolean decomposition, ECO Diversifying SAT assignments useful in both logic synthesis and formal verification Approximate computing, SMT solving, etc
13
Conclusion Reviewed BDDs and SAT
drew a distinction between canonical representation and canonical computation Showed that SAT can have canonical computations discussed two simple algorithms (LEXSAT and LEXUNSAT) Listed several practical applications most of them in logic synthesis Future work (before DAC deadline) Collecting impressive experimental results
14
Abstract A computation is canonical if the result depends only on the Boolean function and a selected variable order, and does not depend on how the function is represented and how the computation is implemented. In the context of Boolean satisfiability (SAT), canonicity implies that the result (a satisfying assignment for satisfiable instances and a UNSAT core for unsatisfiable ones) does not depend on the circuit structure, CNF generation algorithm, and the SAT solver used. The main highlight of this paper is that all SAT-based computations can be made canonical without building a canonical data-structure. The runtime overhead for inducing canonicity is relatively small and is often justifies by the uniqueness and the improved quality of results.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.