Download presentation
Presentation is loading. Please wait.
1
SAT’07 Conference, Lisbon; 30.05.2007
Towards a Better Understanding of the Functionality of a Conflict-Driven SAT Solver Nachum Dershowitz¹ Ziyad Hanna² Alexander Nadel¹,² 1Tel-Aviv University 2Intel SAT’07 Conference, Lisbon;
2
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time
3
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver?
4
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? Decision Tree Chaff is based on backtrack search DPLL, so the most natural way to explain its behaviour is to construct a decision tree, characterizing its run.
5
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? Implication Graph Decision Tree Also, constructing an implication graph is helpfull for explanatory purposes, since it visualizes the BCP process.
6
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f b’ + f’ + c a’ + f’ + c’ f + g g + e’ + c g + e’ + c’ f + e + c’ I’ll explain on an example what difficulties one encounters when trying to construct a decision tree, characterizing a run of a modern SAT solver. g’ + e + c …
7
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ f + g g + e’ + c a g + e’ + c’ f + e + c’ g’ + e + c …
8
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f + g g + e’ + c a g + e’ + c’ f + e + c’ g’ + e + c …
9
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b f + g g + e’ + c a g + e’ + c’ f + e + c’ g’ + e + c …
10
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b e f + g g + e’ + c a g + e’ + c’ e’ f + e + c’ g’ + e + c …
11
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b e f + g g + e’ + c a f g + e’ + c’ e’ f + e + c’ g’ + e + c …
12
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b c e f + g g + e’ + c a f g + e’ + c’ e’ c’ f + e + c’ g’ + e + c …
13
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b c e f + g g + e’ + c a f g + e’ + c’ e’ c’ f + e + c’ You have a conflict here, so plain DPLL would just flip the value of e and continue with backtracking. g’ + e + c dec. level 2 …
14
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: a’ + b’ + f’ a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b c e f + g g + e’ + c a f g + e’ + c’ e’ c’ f + e + c’ Chaff needs doing a failure-driven assertion (goes down to GRASP). How would one show on the decision tree that the decision variable has changed? a’ + b’ + f’ g’ + e + c dec. level 2 …
15
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: a’ + b’ + f’ a b’ + f’ + c dec. level 1 1 a’ + f’ + c’ b c e f + g f 1 g + e’ + c a f g + e’ + c’ e’ c’ f + e + c’ … to continue, as if f had been a decision variable. a’ + b’ + f’ g’ + e + c dec. level 2 …
16
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f 1 a g + e’ + c g + e’ + c’ f + e + c’ a’ + b’ + f’ g’ + e + c …
17
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g 1 a g + e’ + c g + e’ + c’ f + e + c’ a’ + b’ + f’ g’ + e + c …
18
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g 1 a g + e’ + c e g + e’ + c’ 1 f + e + c’ e a’ + b’ + f’ g’ + e + c …
19
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g 1 a g + e’ + c c’ e g + e’ + c’ 1 f + e + c’ e a’ + b’ + f’ c g’ + e + c …
20
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b 1UIP: g + e’ f’ e f + g f g 1 a g + e’ + c c’ e g + e’ + c’ 1 f + e + c’ e a’ + b’ + f’ c g’ + e + c g’ + e’ …
21
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g 1 a g + e’ + c e’ e g + e’ + c’ 1 f + e + c’ a’ + b’ + f’ g’ + e + c g’ + e’ …
22
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g c 1 a g + e’ + c e’ e g + e’ + c’ c’ 1 f + e + c’ a’ + b’ + f’ g’ + e + c g’ + e’ …
23
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: f a b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g c 1 a g + e’ + c e’ e g + e’ + c’ c’ 1 f + e + c’ We already have a node with f, should it be re-used? Or, should a be replaced with f, but what about the left subtree of a, should we delete it or to leave it as is? a’ + b’ + f’ g’ + e + c g’ + e’ f …
24
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: f a f b’ + f’ + c 1 a’ + f’ + c’ b f’ e f + g f g c 1 a g + e’ + c e’ e g + e’ + c’ c’ 1 f + e + c’ One solution would be replacing a by f as if f had been a decision variable of decision level 1, but then you have two f’s in the same path for two paths. a’ + b’ + f’ g’ + e + c g’ + e’ f …
25
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: f a f b’ + f’ + c 1 a’ + f’ + c’ b f’ f + g g c a g + e’ + c e’ g + e’ + c’ c’ f + e + c’ So maybe one should just drop the whole subtree, but then we loose information regarding the exploration itself. g’ + e + c …
26
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q1: How can one explain to a student the behavior of a Chaff-like SAT solver? a’ + b Implication Graph Decision Tree e + f 1UIP: f a b’ + f’ + c 1 a’ + f’ + c’ b f f’ e f + g f g c 1 a g + e’ + c e’ e g + e’ + c’ c’ 1 f + e + c’ A better solution in this case is as follows: a’ + b’ + f’ g’ + e + c g’ + e’ f …
27
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q2. Why 1UIP scheme is so much faster than AllUIP scheme?
28
What is the Motivation behind this Work?
Answering 2 questions that puzzled me for some time Q2. Why 1UIP scheme is so much faster than AllUIP scheme? a’ + b Implication Graph Decision Tree e + f 1UIP of dl 1 1UIP: a’ + b’ + f’ a b’ + f’ + c 1 a’ + f’ + c’ b c e f + g g + e’ + c a f g + e’ + c’ e’ c’ f + e + c’ AllUIP clauses are always shorter than 1UIP clauses, but It was shown in [ZMMM’01] and that 1UIP outperforms AllUIP author = {Lintao Zhang and Conor F. Madigan and Matthew H. Moskewicz and Sharad Malik}, title = {Efficient conflict driven learning in a boolean satisfiability solver}, booktitle = {ICCAD'01}, a’ + b’ + f’ g’ + e + c … AllUIP: a’ + f’
29
Results: 1 / 3 Characterization of decision tree construction and pruning process by a conflict-driven SAT solver
30
Results: 1 / 3 Characterization of decision tree construction and pruning process by a conflict-driven SAT solver Each flipped variable is associated with a left decision sub-tree, explored while refuting corresponding left subspace A way to create this decision tree for a newly flipped variable is shown in the paper The solver maintains a forest of left decision subtrees, joined into one tree after the last conflict It is building and pruning the decision forest on-the-fly Two types of pruning Forward pruning: conflict clause recording Backward pruning: conflict-directed backjumping
31
Results: 2 / 3 Explaining why 1UIP is preferable over other schemes
32
Results: 2 / 3 Explaining why 1UIP is preferable over other schemes b
1UIP is preferable over AllUIP Better forward pruning Less decisions & flips will be required in future Fr(b): fraction of all clauses, recorded before flipping b, that contain b (b is a flipped variable) All such clauses will be satisfied after flipping b; thus they will not contribute to BCP b Fr(b) = 2/3 1 c d 1 b’ + c’ c + d b’ + c + d
33
Results: 2 / 3 Explaining why 1UIP is preferable over other schemes
1UIP is preferable over AllUIP Better forward pruning Less decisions & flips will be required in future Fr(b): fraction of all clauses, recorded before flipping b, that contain b (b is a flipped variable) All such clauses will be satisfied after flipping b Average Fr(b) for AllUIP is twice as higher as for 1UIP
34
1UIP vs. AllUIP (Timeout is 4 hours)
Instance 1UIP AllUIP Time 10-3 Conf Fr NSk 10-3 Conf. 4pipe 51 101 0.41 0.19 11930 29985 0.83 0.24 5pipe 50 85 0.40 0.18 t/0 28185 0.84 0.21 8pipe_k 2426 1478 0.37 t/o 13192 0.81 9pipe_k 1493 640 0.20 6678 0.86 0.26 longmult10 485 237 0.13 590 379 longmult11 559 273 0.14 690 471 0.25 rotmul 578 615 0.52 0.16 992 1576 0.27 term1mul 2173 1585 0.55 0.15 2875 3059
35
Results: 2 / 3 Explaining why 1UIP is preferable over other schemes
1UIP is preferable over AllUIP Better forward pruning Fr(b): fraction of all clauses, recorded before flipping b, that contain b (b is a flipped variable) All such clauses will be satisfied after flipping b Fr(b) for AllUIP is twice as higher than for 1UIP 1UIP is preferable over UIP-2 (2nd UIP of the last decision level) Better backward pruning: more flipped variables and respective decision tree nodes are skipped 1UIP scheme corrects mistakes on-the-fly
36
1UIP vs. UIP-2 (Timeout is 4 hours)
Instance 1UIP UIP-2 Time 10-3 Conf Fr NSk 10-3 Conf. 4pipe 51 101 0.41 0.19 148 308 0.38 0.14 5pipe 50 85 0.40 0.18 347 562 0.33 8pipe_k 2426 1478 0.37 0.21 t/o 10129 0.26 0.13 9pipe_k 1493 640 0.20 6040 0.27 0.16 longmult10 485 237 513 261 0.34 0.11 longmult11 559 273 756 346 0.35 rotmul 578 615 0.52 1186 1371 0.48 term1mul 2173 1585 0.55 0.15 5213 3750 0.54
37
Results: 3 / 3 Local conflict clause recording a b f’ e g c a e’ e c’
If there exists a flipped variable, dominated by the first UIP Suppose last such variable f defines a new decision level (like GRASP does) Record a 1UIP clause wrt new decision level Normal 1UIP clause is recorded and used as usual a’ + b e + f Implication Graph Decision Tree b’ + f’ + c 1UIP: f LCC: e a f a’ + f’ + c’ 1 b f + g f’ e f g c g + e’ + c 1 a e’ g + e’ + c’ e f + e + c’ c’ 1 a’ + b’ + f’ g’ + e + c … g + e’ f
38
LCC: What Problem are We Aiming to Solve?
Asserting clause contains e’. It is consistent with the rightmost path a 1 Asserting clause for flipping b contained b’ It is inconsistent with the left-most path. It is consistent with the right-most path b 1 c e 1 d f LTree(B) 1 Let P be a path in LTree(a), having N nodes Leftmost path is inconsistent with N asserting conflict clauses, recorded while exploring LTree(a) Rightmost path is inconsistent with none of the asserting conflict clauses If leftmost path of LTree(a) is encountered after backtracking beyond a, it will be immediately pruned away. Rightmost path will not be pruned. We want to help forward pruning rightmost paths and all the paths that have few left edges.
39
Local Conflict Clause Recording Impact
Family Default Default + LCC Time in sec. t/o sat04-maris03-gripper-sat 2238 986 sat04-goldb03_hard_eq_chk 30336 2 15353 sat04-maris03-gripper-unsat 30135 4 17842 velev_fvp_unsat.3.0 18199 10928 velev_fvp_sat.3.0 9041 7155 velev_vliw_sat.2.0 5970 4715 barrel 260 226 velev_pipe_unsat_1.0 15880 13094 velev_pipe_unsat_4.0 17260 14810 longmult 5413 5076 velev_vliw_sat_4.0 5116 6882
40
Thanks for your attention! (See you in poster session)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.