Solving Boolean Satisfiability (SAT) Problem Using the Unate Recursive Paradigm Priyank Kalla, Maciej Ciesielski Dept.

Download Report

Transcript Solving Boolean Satisfiability (SAT) Problem Using the Unate Recursive Paradigm Priyank Kalla, Maciej Ciesielski Dept.

Solving Boolean Satisfiability (SAT)
Problem Using the Unate Recursive
Paradigm
Priyank Kalla, Maciej Ciesielski
Dept. of Elec. & Comp. Engineering
University of Massachusetts Amherst, USA
Supported by Avery Design Systems, Inc., USA
The SAT Problem – in Our Context
• Given: output value requirements for a circuit
• Compute: satisfying assignments at the inputs
a
b
c
u
d
w
v
Output requirements: u=1, v=1, w=1
SAT assignments: a, b, c, d = ?
2
Application to Functional Verification
• Given an RTL specification of a circuit
• Simulate the design (user directed, pseudo-random,
targeted vectors)
• Code coverage ? Module
Expand
The underlying logic
Input ports, output ports, internal signals
Begin description
.....
If (condition) then
Assign signal = function( );
End if;
.....
End module
• Solve SAT for expanded logic + re-simulate
3
Solving SAT Using BDDs: BDD-SAT
Boolean
logic
•
•
•
•
Build BDDs for each output
Build the product BDD (AND of output BDDs)
Result: set of all satisfying assignments
If the set is empty, infeasible SAT instance
4
How Does BDD-SAT Work
Product BDD
•
a
satisfying solutions
b
0
Product BDD = set of all
ab
• Every path root --> 1 is a
SAT solution
c
• Pick any path (prod. term)
ab’c
•
1
Limitation: BDD may be
too large
5
Our Focus
•
How to solve the SAT problem without
building the product BDD?
•
•
Assume individual BDD can be built
Why is the intermediate product too large?
•
•
Intermediate computations contain regions of
empty solution space
Discard regions of empty solution space from
further exploration
6
Unate Functions in SAT
• Positive unate: f x  f x
fx
i
f = x fx + fx
fx
i
• Neither f x nor f x contain x
• Simplification: SAT ( f ) = x SAT ( f x )
• Look for solution in f
x
7
Unateness Consistency
• If all functions consistently unate in x
f g = x fx gx + f x gx
SAT(f g) = x SAT( f x g x )
fx gx
fx
f x gx
gx
fx
gx
8
Unate Recursive Paradigm For SAT
• What if no consistently unate variables?
• consider two functions f, g, both unate in x
• use Shannon expansion recursively
f g = x fx gx + x f x gx
SAT (f g) = x SAT( f x g x) + xSAT( f x g x)
•
Perhaps the co-factors are unate
9
Conclusions and Future Work
•
Exploiting the unate recursive paradigm to solve
SAT, using BDDs
•
•
Developed two algorithms: B-SAT & Inc-USAT
BSAT: efficiently controls the BDD size, but slow for
infeasible SAT instances
Inc-USAT: incomplete search, finds easy solutions
quickly, cannot prove infeasibility unequivocally
Both B-SAT & Inc-USAT are inefficient for infeasible
SAT instances
Future work: incorporation of “learning” techniques
•
•
•
10