Learning from BDDs in SATbased Bounded Model Checking - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Learning from BDDs in SATbased Bounded Model Checking

Description:

Prototype: DiVer Verification System. DiVer. Design. buscore.v ... Basic DiVer BMC (No BDD Learning) Witness at depth 56. Difficult SAT problem. At depth 10 ... – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 27
Provided by: aarti1
Category:

less

Transcript and Presenter's Notes

Title: Learning from BDDs in SATbased Bounded Model Checking


1
Learning from BDDs in SAT-based Bounded Model
Checking
  • Aarti Gupta, NEC Labs America
  • Malay Ganai, NEC Labs America
  • Chao Wang, University of Colorado
  • Zijiang (James) Yang, NEC Labs America
  • Pranav Ashar, NEC Labs America

2
Boolean Satisfiability (SAT)
  • Given a Boolean formula
  • find an assignment to the variables such
    thatformula evaluates to true
  • or, prove that no such assignment exists
  • Decision Procedure
  • Davis Logemann Loveland (DLL/DPLL) algorithm
  • Branch-and-backtracking search
  • Applications in VLSI CAD
  • ATPG, timing analysis, FPGA routing,
  • Verification
  • equivalence checking
  • bounded model checking
  • image computation
  • unbounded model checking

3
Bounded Model Checking (BMC)
  • BMC Given a design, and a correctness
    property,search for a bounded depth
    counterexample
  • by unrolling time frames of design
  • by specifying constraints on design signals
  • BMC problem for a given depth k
  • translated to a Boolean formula, where formula
    issatisfiable if and only if a counterexample
    exists
  • SAT Check performed by a backend SAT solver
  • Typically, use BMC for increasing k
  • For deeper searches, efficiency of SAT solver is
    critical

4
SAT DLL Decision Procedure
SAT_Solve() if (preprocess() CONFLICT)
return UNSAT while (1) if
(decide_next_branch()) while (deduce()
CONFLICT) blevel analyze_conflict()
if (blevel lt 0) return UNSAT else
backtrack(blevel) else return SAT
  • Main Engines
  • Decision for choosing which variable to branch
    on,and what value
  • Deduction for performing BCP and checking
    conflicts
  • Diagnosis for conflict-driven learning and
    backtracking
  • Modern SAT Solvers Grasp, SATO, Chaff, BerkMin,
    Hybrid

5
Motivation
  • Improve SAT Solvers performance by Learning
  • What is Learning (in SAT Solvers) ?
  • Adds new but redundant clauses to the given
    problem
  • Though redundant, they are useful in pruning
    search
  • Learning Techniques in Modern SAT Solvers
  • Conflict-driven learning key feature Silva 96
  • Structural circuit simplifications Kuehl 01
  • Recursive learning Kunz 93
  • Stalmarcks algorithm Stalm 89
  • Our Contribution Efficient learning from BDDs

6
Related Work
  • Combining BDDs and SAT both explore search space
  • Equivalence checking Jain95, Kunz95, Gup98,
    Burch98,
  • Image computation Gupta00
  • Model checking Williams00, Abdulla00
  • BMC Anderson02
  • Combining BDDs and SAT in BMC framework
  • Goal simplification Anderson02
  • BDD sweeping for simplifying transition relation
    Kuehl97
  • BDD reachability constraints Cabodi03, Gupta03
  • BDD Learning is orthogonal to such use, and can
    be also combined with clause replication
    Strich01
  • Contrast
  • Dam03 Apply CNF-based SAT techniques to BDDs
  • This talk Add information from BDDs into
    CNF-based SAT

7
Outline
  • Background
  • SAT-based BMC
  • SAT Decision Procedure
  • Motivation and Related Work
  • BDD Learning
  • Review Conflict-driven learning
  • BDD Learning Technique
  • BDD Learning Engine
  • Integration with a Standard SAT Solver
  • Experimental Results
  • Conclusions

8
Review Conflict-Driven Learning
  • x1 x4
  • x1 x3 x8
  • x1 x8 x12
  • x2 x11
  • x7 x3 x9
  • x7 x8 x9
  • x7 x8 x10
  • x7 x10 x12

9
Review Conflict-Driven Learning
  • Benefits of CDL
  • Allows non-chronological backtracking
  • Avoids same conflict in future
  • Decision heuristics using CDL information are
    more effective

x1
x2
x3
x3
x4
x5
x5
Conflict clause x1 x3 x5
10
BDDs and Conflicts
  • Each path to 0 in a BDD denotes a conflict on its
    variables
  • A BDD captures all conflicts
  • Each conflict can be avoided by adding a learned
    clause
  • a b c d
  • a b e
  • Learning
  • No need to add each clause
  • Select clauses to add

11
BDD Learning Technique
  • Given a SAT problem
  • Build multiple BDDs for parts of the problem
  • For each BDD, paths to 0 represent conflicts
  • Add learned clauses to avoid selected paths
  • Tradeoff between usefulness and overhead
  • Useful multiple conflicts are handled
    simultaneously
  • Overhead too many learned clauses slow down BCP
  • Strategy Effective and Lightweight BDD Learning

12
Effective and Lightweight BDD Learning
  • Global BDD learning for every circuit node
  • Impractical, wasteful
  • Targeted BDD Learning for selected circuit nodes
    (Seeds)
  • Two Learning Paradigms
  • Static BDD Learning
  • Seeds are selected statically
  • Learned clauses are added statically before
    decisions
  • Dynamic BDD Learning
  • Seeds are selected dynamically
  • Learned clauses are added dynamically during
    decisions
  • Heuristics are targeted at achieving a good
    balance between usefulness and overheads

13
BDD Learning Engine
  • 3 main components
  • Seed selection
  • Creation of a BDD for the seed
  • Generation of learned clauses from the BDD

BDD_Learning_Engine() update_engine_info()
if (ready_for_learning) node
select_a_seed() bdd create_a_bdd(node)
cl_list generate_learned_clauses(bdd)
return (cl_list)
14
Seed Selection
  • Strategy preempt conflicts in the SAT Solver
  • Seed Selection Heuristics (SSH)based on
    Decision heuristics of the SAT Solver
  • Next decision
  • Past decisions, ranked back from current decision
  • Most frequent decisions
  • Decisions at back-leap levels Pil 02
  • Most frequent backtrack levels

15
Creation of BDDs
  • Region heuristic
  • Fanin cone of chosen seed
  • Region around the chosen seed (faninfanout)
  • Region across a few logic levels (typically 5-10)
  • Avoids BDD blowup, very fast
  • Keeps BDD paths short, giving short learned
    clauses
  • More useful for implications than long clauses
  • Should not duplicate gate constraints

16
Generation of Learned Clauses
  • Simple cube enumeration of negated BDD
  • Only a fixed number of cubes enumerated
  • To avoid exponential enumeration
  • Maximum clause length enforced, typically 5-10
  • Shorter clauses are more useful for implication
  • Fixed-depth cube enumeration with Approximation
  • Shorter paths to 1 are enumerated (in negated
    BDD)
  • Longer paths are approximated to 0
  • Some heuristically chosen variables
    areuniversally quantified
  • Corresponds to resolution on learned clauses
  • Can result in shorter and fewer learned clauses

17
Integration with SAT Solver
SAT_Solve() if (preprocess() CONFLICT)
return UNSAT while (1) cl_list
bdd_learning_engine() if (add_clauses(cl_list
) UNSAT) return UNSAT if
(decide_next_branch()) while (deduce()
CONFLICT) blevel analyze_conflict()
if (blevel 0) return UNSAT
else backtrack(blevel) else return SAT
  • BDD Learning is in addition to standard CDL
  • BDD Learning engine is invoked before a decision
  • Static one time only, after preprocess
  • Dynamic before each decision, but learning is
    performed every N backtracks (e.g. N100)
  • A clause added due to BDD Learning is treated as
    a conflict clause
  • affects future implications and decisions

18
Dynamic Addition of Learned Clauses
  • Effect of added clauses on SAT Solver invariants
  • Conflict clause is conflicting/unit when added
  • may not be the case for externally learned
    clauses
  • Action in SAT Solver depends on clause status
  • Conflicting add it immediately
  • Unsatisfied, with ? 2 free literals add it
    immediately
  • Unit Choice between
  • Add immediately, and backtrack to implication
    level
  • Add later, when decision level is the implication
    level
  • Heuristic add it immediately if (d_level
    imp_level) lt threshold
  • Pseudo-satisfied (should have been an
    implicationon the true literal) like a unit
    clause
  • Satisfied add it immediately

19
Filtering Learned Clauses
  • Additional Filters
  • Non-local literals assigned at different
    decision levels
  • Avoid local learning, inferred directly from
    circuit
  • Relevant sum of true/unassigned literals lt
    threshold
  • Unrelevant clauses unlikely to cause implications
  • Similar to conflict clause deletion criteria in
    SAT Solvers
  • Three Levels of Learning Projected usefulness
  • Level 1 conflicting 1-literal unit
  • Level 2 (Level 1) unit pseudo-satisfied
  • Level 3 (Level 2) all filtered clauses

20
Prototype DiVer Verification System
DiVer
21
Experiments
  • Setup
  • Six large industrial designs
  • BMC used to check safety properties
  • 3 hour time limit (2.2 GHz Xeon, 900 MHz Sun
    220R)
  • Basic DiVer BMC (No BDD Learning)

22
Results Static BDD Learning
  • Chose top 20 variables ranked by decision
    heuristic

Mixed Results No Clear Winner
23
Results Dynamic BDD Learning
  • Significant Improvements with Level 3 Learning

D1 15 clauses, 3 seeds D5 89 clauses, 32
seeds SSH Past Decision (3/6)
24
Results Dynamic BDD Learning
  • Effect of Maximum Clause Length
  • Max length 6 gave best empirical results
  • May be related to BDD creation parameters

25
Conclusions
  • BDD Learning Technique
  • Creates BDDs on-the-fly for selected seeds
  • Adds useful learned clauses for conflicts to SAT
    Solver
  • Static and Dynamic BDD Learning in SAT Solver
  • Heuristics for Lightweight and Effective Learning
  • Seed selection heuristics
  • Can also be applied to selective replication
  • Clause filtering heuristics
  • Can also be applied to other external learning
    techniques
  • Improved search in BMC with Dynamic BDD Learning
  • Upto 73 reduction in time for same depth
  • Upto 39 more (60 more) time frames searched

26
SAT Example
Conjunctive Normal Form (CNF)
Clause
Literal
Write a Comment
User Comments (0)
About PowerShow.com