Title: Complexity Analysis of a Massively Parallel Boolean Satisfiability Implication Circuit
1- Complexity Analysis of a Massively Parallel
Boolean Satisfiability Implication Circuit -
Ph.D. Defense By Mark J. Boyd Chair
Tracy Larrabee Reader Andrea Di Blas
Reader Richard Hughey
2Significant and Novel Research
- Analyzed O(mn) parallelism for SAT
- Showed unroutability of FPGA approach
- Demonstrated floorplanned solution
3Overview
- Synopsis of the research
- Boolean satisfiability (SAT)
- Previous FPGA parallel approaches
- Zhong (Princeton) instance-specific
- Unroutable with claimed resources
- My floorplanned approach
- ELVIS single chip
- PRISCILA multi-chip
- Conclusion
4Overview - Research
- Research interests
- Boolean satisfiability
- Fundamental open problem with currently
exponential runtime - FPGAs
- Parallel applications
- Rapid prototyping
- Dynamic rerouting
- I implemented a regular floorplan methodology
- ELVIS
- Single chip design
- Easily and quickly loaded
- PRISCILA
- Multi-chip design explicitly showing external
routing scalability
5Overview - Motivations
- FPGA approach has long compile times
- Field Programmable Custom Computing Machines
Conference - We showed routing problem unscalable
- We presented a regular generalized layout
- Need to evaluate wide clauses in parallel
- GRASP and zchaff software
- Clause addition helps scalable speedup GOOD!
- Wide clauses take time to evaluate BAD!
6Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- k3, maximum clause width
- n4, number of variables
- m5, number of clauses
7Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- k3, maximum clause width
- n4, number of variables
- m5, number of clauses
8Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- k3, maximum clause width
- n4, number of variables (A,B,C,D)
- m5, number of clauses
9Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- k3, maximum clause width
- n4, number of variables
- m5, number of clauses
10Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- k3, maximum clause width
- n4, number of variables
- m5, number of clauses
- L13, number of literals
11Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
12Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TBC)(AB)(BC)(ABC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
13Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TBC)(FB)(BC)(ABC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
14Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TBC)(FB)(BC)(FBC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
15Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TBC)(FB)(BC)(FBC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
16Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFC)(FB)(BC)(FBC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
17Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFC)(FT)(BC)(FBC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
18Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFC)(FT)(TC)(FBC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
19Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFC)(FT)(TC)(FFC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
20Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFF)(FT)(TC)(FFC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
21Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFF)(FT)(TT)(FFC)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
22Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFF)(FT)(TT)(FFT)(FCD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
23Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFF)(FT)(TT)(FFT)(FFD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
24Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
25Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
26Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T T
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
27Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T T T
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
28Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T T T T
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
29Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T T T T T
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
30Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - T T T T T TRUE
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
31Boolean satisfiability (SAT)
- But wouldnt it be nice if all of these
operations happened simultaneously? - (ABC)(AB)(BC)(ABC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment
32Boolean satisfiability (SAT)
- But wouldnt it be nice if all of these
operations happened simultaneously? - T T T T T TRUE
- (TFF)(FT)(TT)(FFT)(FFT)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment - Well get there soon
33Boolean satisfiability (SAT)
- What is a transitive implication?
- (ABC)(AB)(BC)(ABC)(ACD)
- B1 is a partial truth assignment
34Boolean satisfiability (SAT)
- What is a transitive implication?
- (ABC)(AF)(BC)(ABC)(ACD)
- B1 is a partial truth assignment
35Boolean satisfiability (SAT)
- What is a transitive implication?
- (ABC)(AF)(BC)(ABC)(ACD)
- B1 implies A0 because A must now be
assigned 0 to make the clause true
36Boolean satisfiability (SAT)
- What is a transitive implication?
- (ABC)(TF)(BC)(ABC)(ACD)
- B1 implies A0
37Boolean satisfiability (SAT)
- What is a transitive implication?
- (FBC)(TF)(FC)(ABC)(ACD)
- B1 implies A0
38Boolean satisfiability (SAT)
- What is a transitive implication?
- (FBC)(TF)(FC)(ABC)(ACD)
- B1 implies A0,C0
39Boolean satisfiability (SAT)
- What is a transitive implication?
- (FBC)(TF)(FT)(ABC)(ACD)
- B1 implies A0,C0, called transitive
implications
40Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(AB)(BC)(ABC)(ACD)
- A1,C1 is a partial truth assignment
41Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(FB)(BF)(FBF)(ACD)
- A1,C1 is a partial truth assignment
42Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(FB)(BF)(FBF)(ACD)
- A1,C1 implies B0,B1
43Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(FB)(BF)(FBF)(ACD)
- A1,C1 implies B0,B1 ?
- But thats a contradiction, right?
44Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(FB)(BF)(FBF)(ACD)
- A1,C1 implies B0,B1
- Because it results in a contradiction, A1,C1
cannot be a part of any satisfying assignment
45Boolean satisfiability (SAT)
- Lets restart and try more variables
- (ABC)(FB)(BF)(FBF)(ACD)(AC)
- A1,C1 implies B0,B1
- Because A1,C1 cannot be a part of any
satisfying assignment we can add a clause
forbidding it. DeMorgan (AC) (AC)
46Boolean satisfiability (SAT)
- But wouldnt it be nice if all of these
operations happened simultaneously? - (ABC)(FB)(BF)(FBF)(ACD)(AC)
- A1,C1 implies B0,B1
- Well get there
47Boolean satisfiability (SAT)
- Lets try a really big problem
- (ABCDG)(ABCEH)(ABDEI)
- (ACDEJ)(BCDEK)(GHIJK)
- A0,B0,C0,D0,E0 implies
48Boolean satisfiability (SAT)
- Lets try a really big problem
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(GHIJK)
- A0,B0,C0,D0,E0 implies
- G1,H1,I1,J1,K1
49Boolean satisfiability (SAT)
Boolean satisfiability (SAT)
- Lets try a really big problem
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(GHIJK)
- A0,B0,C0,D0,E0 implies
- G1,H1,I1,J1,K1
50Boolean satisfiability (SAT)
- Lets try a really big problem
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(FFFFF)
- A0,B0,C0,D0,E0 implies
- G1,H1,I1,J1,K1, which creates a falsified
clause
51Boolean satisfiability (SAT)
- Lets try a really big problem
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(FFFFF)
- A0,B0,C0,D0,E0 cannot be a part of any
satisfying truth assignment, add - (ABCDE)
52Boolean satisfiability (SAT)
- 25 operations in parallel?
- (ABCDG)(ABCEH)(ABDEI)
- (ACDEJ)(BCDEK)(GHIJK)
- A0,B0,C0,D0,E0
53Boolean satisfiability (SAT)
- 25 operations in parallel?
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(GHIJK)
- A0,B0,C0,D0,E0 implies
- G1,H1,I1,J1,K1
- Wouldnt THAT be something
54Boolean satisfiability (SAT)
- 25 operations in parallel?
- (FFFFG)(FFFFH)(FFFFI)
- (FFFFJ)(FFFFK)(GHIJK)
- A0,B0,C0,D0,E0 implies
- G1,H1,I1,J1,K1
- For kO(n)O(m), O(mn) parallelism
55Boolean satisfiability (SAT)
- For any m, randomly pick m/2 variables for each
clause - Append a new unique variable to each clause
- Add one clause with the negations of all the
appended variables - A partial assignment of true to the first m
variables implies all of the appended variables
true - Contradicts the final clause
56Boolean satisfiability (SAT)
- 25 operations in parallel?
- (ABCDG)(ABCEH)(ABDEI)
- (ACDEJ)(BCDEK)(GHIJK)
- A problem which supports O(mn) speedup by
parallel literal evaluation
57Boolean satisfiability (SAT)
- For SOME k-SAT formulas, evaluating all literals
and clause implications in a single operation
provides O(mn) parallelism over serial literal
operations.
58Purpose of parallelism for speedup of SAT
- Calculating transitive implications, Boolean
Constraint Propagation (BCP) - Commonly 90 to 99 of the total runtime
- Excellent heuristics of GRASP or zchaff software
speed up solution - Addition of wide conflict clauses avoids
repetitive search - Avoids evaluating unneeded clauses
- BUTsoftware heuristics still slow for some
densely connected unsatisfiable problems - Hole, hgen benchmarks of about 260 variables
59Parallel FPGA approaches
- Zhong (Princeton) instance-specific mapping of a
formula to an FPGA - State machine generates partial assignments to
send to IMP circuit - IMP circuit calculates implications and sends
back results -
60Parallel FPGA approaches
- Zhong (Princeton) instance-specific mapping of a
formula to an FPGA - Each clause is made into a gate for each variable
- But this is a bipartite graph 2-Level
Planarization problem NP-hard for arealtO(n )
2
61What is an FPGA?
- An array of logic and memory
- Logic cells (4x4 memory)
- A mesh of routing
- Crossbar switchboxes (4x4) supporting flexible
interconnect
62Parallel FPGA PR
- Zhong (Princeton) instance-specific mapping
requires PR - Each clause is made into a gate for each variable
- But this is a bipartite graph 2-Level
Planarization problem NP-hard for arealtO(n )
2
63Parallel FPGA PR
1 2 3 4 5 6
64Zhong gate blowup for big k
- Zhong (Princeton) instance-specific mapping of a
formula to an FPGA - Wide clause made into gates BIG
- Example
- Clause from hole10
- Even gates grow as O(k m)
2
65General Floorplan of ELVIS
66Shift Register Bus Mask
- Eliminate routing problem by
- Routing all variables to all clauses using a bus
- Masking unused variable signals using a shift
register
67Shift Register Bus Mask
- Only allows the lines through that are selected
by the shift register
0
0
0
0
0
1
1
1
1
1
0
0
68Oneact one active encoder
- A multi-bit unary input, two-bit result
- An adder that overflows at 2
69Shift Register Bus Mask
70Example of CEC
71Example of CEC, A1, C1
1
0
0
0
1
0
0
0
1
1
1
0
72Example of VEC, A1, C1
1
1
1
0
1
0
0
0
73Example of VEC, A1, C1
1
1
1
0
1
0
0
0
0
1
0
1
74The other two variables
1
75Floorplan of CECs and VECs
CECs
VECs
76Partition of CECs and VECs
CECs
VECs
77Board Layout of PRISCILA
78Overview of PRISCILA
- 14 FPGA boards
- Regular wiring with 40 wire ribbon cables
- 12 boards for a 3x4 rectangular array
- 1 board is the FSM
- 1 board to collect data on performance
- 3.1 MHz theoretical maximum
- 1.6 MHz tested
79Cycle Speedup of PRISCILA
Dubois
Pretolani
80Analysis
- Cycles for A-SAT are really complex operations
(load, load, decrement,store), so not comparable - Assumed memory latency increases with size of
problem. Not necessarily true for cached,
pipelined serial processor - Used a big (32 var, 48 clause) PRISCILLA for all
problems. Latency not scaled.
81The Hughey Amendment
- Cycles for A-SAT are really complex operations
(load, load, decrement,store), so not comparable - Doesnt matter, just want scalable speedup
- Assumed memory latency increases with size of
problem. Not necessarily true for cached,
pipelined serial processor - Assume perfect pipe/cache, constant access times
- Used a big (32 var, 48 clause) PRISCILLA for all
problems. Latency not scaled. - Penalize larger problems by a factor of m (delay)
82Speedup of PRISCILA
83Rebuttal to Hughey Amendment
- Scalable speedup (between log and linear)
- VS a serial processor of O(1) memory latency!
- Because serial processor is O(mn) operations
- Results arent a proof in themselves (too small)
but are consistent with previous work
84How can ELVIS/PRISCILA improve
- Two major improvements
- Use the carry logic in FPGAs for wide functions
- Cycle speeds improved by 100x (250 MHz)
- Resource usage much more efficient
- Design a parallel FSM to drive the implication
logic faster - Transitive implications only 90-99 of the total
time - Speedups over 10-100 not generally possible
except for hardest benchmarks
85What can ELVIS/PRISCILLA do
- Coprocessor for industrial problems
- zchaff extraction of small cores within 2-20 of
size of the minimal unsatisfiable core. - PRISCILLA detects unsatisfiable formulas 10-100
times faster (limited by state machine) - Place and route, logic minimization, verification
and testing of circuits and software, airline
scheduling
86RECAP and Acknowledgments
- Parallel calculation of SAT
- transitive implications
- O(mn) over software
- Instance-specific approaches unscalable
- Negative result
- Scalable floorplanned approach (ELVIS)
- Useful for small unsatisfiable cores
- Any clause width
- Multi-chip (PRISCILLA)
- More speedup from larger problems
Acknowledgements Kevin Klenk for help with
initial state machine design. Doanna Weissgerber
for help with the software loading interface.
NSF funding under CCR-9971172. Xilinx for
devices and ISE software.
87(No Transcript)
88(No Transcript)
89P Parallel Pipelines
90Pipelined approach
- Zhong time-sliced variables through a pipeline
91EXTRAS
92The Experiment Results
- Average times in seconds to complete all tasks
for each of the 21 alignments - Experimental group 1.5 times faster
93Protein Structure
- Hierarchical Structure
- Goal understand function of protein from primary
structure - Sequence of protein relatively easy to obtain
94Floorplan of the Approach
95Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (AB)(ABC)(BC)(ABD)
- (CD)(BCD)(ACD)(BD)
- k3, maximum clause width
- n4, number of variables
- m8, number of clauses
96Boolean satisfiability (SAT)
- A k-SAT formula is a Boolean expression in
conjunctive normal form (CNF) - (ABC)(AB)(BC)(ABC)(ACD)
- A1, B0, C0, D1 is an easily verified
satisfying truth assignment - T T T T T TRUE
- (TFF)(FT)(TT)(FFT)(FFT)
97Protein Structure
98Floorplan of the Approach
99A Critically Unsatisfiable Formula
100Parallel FPGA approaches
101Floorplan of the Approach
102Layers ofVisPad
Independent of RDAG-128H
Dependent on RDAG-128H knowledge