Lookahead Techniques
Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019
1 / 29
Lookahead Techniques Marijn J.H. Heule - - PowerPoint PPT Presentation
Lookahead Techniques Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019 1 / 29 DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based
Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019
1 / 29
2 / 29
3 / 29
Simplifies the formula (using unit propagation) Splits the formula into two subformulas
4 / 29
5 / 29
5 / 29
5 / 29
6 / 29
7 / 29
7 / 29
7 / 29
7 / 29
7 / 29
7 / 29
8 / 29
9 / 29
9 / 29
9 / 29
9 / 29
9 / 29
10 / 29
10 / 29
10 / 29
10 / 29
10 / 29
11 / 29
12 / 29
12 / 29
12 / 29
xa xb xc
1
?
1 DPLL
x1 x2 x3 x4 FLA
9 1 9 13 1 6 1 7 10 1 8 LookAhead H(xi)
13 / 29
1: F := Simplify (F) 2: if F is empty then return satisfiable 3: if ∅ ∈ F then return unsatisfiable 4: F; ldecision := LookAhead (F) 5: if (DPLL( F(ldecision ← 1)) = satisfiable) then 6:
return satisfiable
7: return DPLL (F(ldecision ← 0))
14 / 29
15 / 29
Learn small (typically unit or binary) clauses that are valid for the current node and lower in the DPLL tree Locally learnt clauses have to be removed during backtracking
16 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict.
17 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. Flearning := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧ (x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
17 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. Flearning := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧ (x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6) ϕ = {x4=0, x6=1}
17 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. Flearning := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧ (x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6) ϕ = {x4=0, x6=1, x1=1}
17 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. Flearning := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧ (x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6) ϕ = {x4=0, x6=1, x1=1, x2=1}
17 / 29
A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. Flearning := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧ (x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6) ϕ = {x4=0, x6=1, x1=1, x2=1, x3=1}
17 / 29
Definition (Hyper Binary Resolution Rule)
(x ∨ x1 ∨ x2 ∨ · · · ∨ xn) (¯ x1 ∨ x′) (¯ x2 ∨ x′) . . . (¯ xn ∨ x′) (x ∨ x′) binary edge hyper edge hyper binary edge ¯ x′ x ¯ x1 . . . ¯ x2 ¯ xn x′ ¯ x Hyper Binary Resolution Rule: combines multiple resolution steps into one uses one n-ary clauses and multiple binary clauses special case hyper unary resolution where x = x′
18 / 29
19 / 29
19 / 29
19 / 29
19 / 29
19 / 29
19 / 29
19 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
20 / 29
In short, St˚ almarck’s Method is a procedure that generalizes the concept of necessary assignments. For each variable x, (Simplify(F |x) ∩ Simplify(F |x)) \ F is added to F. The above is repeated until fixpoint, i.e., until ∀x : (Simplify(F |x) ∩ Simplify(F |x)) \ F = ∅ Afterwards the procedure is repeated using all pairs for variables x and y: Add (Simplify(F |xy) ∩ Simplify(F |xy) ∩ Simplify(F |xy ∩ Simplify(F |xy)) \ F to F. The second round is very expensive and can typically not be finished in reasonable time.
21 / 29
22 / 29
23 / 29
23 / 29
23 / 29
23 / 29
23 / 29
24 / 29
24 / 29
24 / 29
24 / 29
24 / 29
24 / 29
24 / 29
25 / 29
by Olivier Roussel http://www.cs.utexas.edu/~marijn/game/2SAT
25 / 29
26 / 29
26 / 29
26 / 29
26 / 29
26 / 29
26 / 29
27 / 29
Given a formula F which includes the clauses (a ∨ b) and (a ∨ c), tree-based look-ahead can reduce the look-ahead costs. F a b c
2 3 4 5 1 6
implication action 1 propagate a 2 propagate b 3 backtrack b 4 propagate c 5 backtrack c 6 backtrack a
28 / 29
Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019
29 / 29