Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stronger learning and higher backjumping

Similar presentations


Presentation on theme: "Stronger learning and higher backjumping"β€” Presentation transcript:

1 Stronger learning and higher backjumping
Clause minimization Stronger learning and higher backjumping Recursive conflict clause reduction (deep /shallow) Glucose-style Volunteers and inverse-arcs ContraMinisat

2 Learnt Conflict Clauses, and minimization
π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘› π‘₯ 3 = πœ” 4 , π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘› π‘₯ 6 = πœ” 5 , … Local / General implication graph 4 1 Learnt Conflict clause: (x10 Γ‡ :x4 Γ‡ x11) 6  conflict Decision 3 3 2 5 Redundant – does not change the satisfiability 2 5 π‘₯ 10 β†’ π‘₯ 11 or, π‘₯ 11 β†’ π‘₯ 10 Clause minimization: Drop π‘₯ 11

3 Learnt Conflict Clauses, and minimization
More generally: if we have a c.c. 𝑐=( π‘₯ 0 βˆ¨β‹―βˆ¨ π‘₯ 𝑛 ), and ... all reverse paths on the implication graph hit 𝑐 literals... 4 6  conflict 5 Redundant – does not change the satisfiability 5 π‘₯ 𝑖 βˆˆπ‘ π‘₯ 𝑖 ∧ π‘₯ 𝑗 ∧ π‘₯ π‘˜ β†’ π‘₯ 𝑙 or, π‘₯ 𝑙 β†’ π‘₯ 𝑖 ∨ π‘₯ 𝑗 ∨ π‘₯ π‘˜ Clause minimization: Drop π‘₯ 𝑙 π‘₯ 𝑙 π‘₯ 𝑗 βˆˆπ‘ π‘₯ π‘˜ βˆˆπ‘

4 More generally... Learnt clause: 𝑐= π‘₯ 0 βˆ¨β‹―βˆ¨ π‘₯ 𝑛
For 0≀𝑗≀𝑛, we can remove π‘₯ 𝑗 if πœ‘βˆ§ π‘₯ 𝑗 β†’ π‘βˆ–π‘₯ 𝑗 Or, more generally, for any 𝑐 β€² βŠ† π‘βˆ– π‘₯ 𝑗 , πœ‘βˆ§ π‘₯ 𝑗 →𝑐′ equivalently, if πœ‘βˆ§ 𝑐 β€² β†’ π‘₯ 𝑗 E.g., in the previous slide: π‘₯ 𝑖 ∧ π‘₯ 𝑗 ∧ π‘₯ π‘˜ β†’ π‘₯ 𝑙 Order of checking matters. Can we optimize ?

5 Clause minimization: minisat
Deep mode (recursive conflict-clause reduction): Traverse recursively π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘›( π‘₯ 𝑗 ) Stop if a literal is not in the decision levels of 𝑐 . Stop if hitting a decision variable. If all paths hit a variable from 𝑐, remove π‘₯ 𝑗 . e.g., we hit π‘₯ 2 , π‘₯ 5 , π‘₯ 7 , hence π‘₯ 2 ∧ π‘₯ 5 ∧ π‘₯ 7 β†’ π‘₯ 𝑗 , or equivalently π‘₯ 𝑗 β†’ π‘₯ 2 ∨ π‘₯ 5 ∨ π‘₯ 7 Instead of maintaining the list of decision levels of c’s literals and checking it each time, they maintain an abstraction of that list; hence they might end up visiting such a level, which will anyway result in hitting a decision variable and aborting. * Minimizing Learned clauses/SΓΆrensson, Biere, SAT’09

6 Clause minimization: minisat
Deep mode (recursive conflict-clause reduction), optimization: Suppose 𝐿= π‘₯βˆˆπ‘ 𝑑.𝑙.(π‘₯) Don’t: maintain 𝐿 as a list and search it. Do: maintain an abstraction of 𝐿 in a 32- bit int; Suppose we hit π‘™βˆ‰πΏ but π‘™βˆˆπ‘Žπ‘π‘ (𝐿) => hit a decision variable and abort. Hence, cannot hinder correctness * Minimizing Learned clauses/SΓΆrensson, Biere, SAT’09

7 Clause minimization: minisat
Shallow mode: same as deep mode, but only search in current d.l. Literals seen in the current analysis * Minimizing Learned clauses/SΓΆrensson, Biere, SAT’09

8 Clause minimization: Glucose
Use binary clauses: If (𝑐 0 ∨ π‘₯ 𝑖 ) is a binary clause, remove π‘₯ 𝑖 from 𝑐. asserting literal Instead of maintaining the list of decision levels of c’s literals and checking it each time, they maintain an abstraction of that list; hence they might end up visiting such a level, which will anyway result in hitting a decision variable and aborting. * ChanseokΒ Ho’s Glucose patch to minisat.

9 Volunteers and inverse arcs
Let c = ( π‘₯ 0 βˆ¨β€¦βˆ¨ π‘₯ 𝑛 ) = π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘›(π‘₯ 0 ) i.e., π‘₯ 1 βˆ§β‹―βˆ§ π‘₯ 𝑛 β†’ π‘₯ 0 𝑐 has the following two properties: π‘₯ 1 … π‘₯ 𝑛 are currently false π‘₯ 0 is the latest in the trail In a volunteer of π‘₯ 0 , item#2 no longer holds: For some 1≀𝑖≀𝑛, 𝑙𝑒𝑣𝑒𝑙 π‘₯ 𝑖 >𝑙𝑒𝑣𝑒𝑙( π‘₯ 0 ) i.e., some false literal discovered after true literal.

10 Volunteers and inverse arcs
Let c β€² = π‘₯ 0 ∨ 𝑦 1 β€¦βˆ¨ 𝑦 𝑛 i.e., 𝑦 1 βˆ§β‹―βˆ§ 𝑦 𝑛 β†’ π‘₯ 0 𝑐′ has the following two properties: 𝑦 1 … 𝑦 𝑛 are currently false π‘₯ 0 is not the latest in the trail // (possibly earlier d.l., possibly was a decision) e.g., current level: π‘₯ 1 ∧ π‘₯ 2 βˆ§β‹―βˆ§ π‘₯ 𝑛 β†’ π‘₯ 0 𝑐 β€² is called a volunteer* for π‘₯ 0 : gives us an alternative reason clause. Volunteers are generalization of inverse-arcs** 6 5 3 level: * Generalized Conflict-Clause Strengthening for Satisfiability Solvers/Van-Gelder, SAT’11 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

11 Inverse arcs Conflict clause A=( α∨ π‘₯ π‘š ∨ 𝑦 𝑖 )
Conflict clause A=( α∨ π‘₯ π‘š ∨ 𝑦 𝑖 ) 𝛼 – literals with level ≀𝑖 π‘₯ – asserting literal 𝑖<π‘š – back-jumping level 4. Find a volunteer for 𝑦 𝑖 𝑐′=( 𝛽 𝑗 ∨ 𝛾 π‘˜ ∨ 𝑦 𝑖 ) 𝐴 β€² = π‘Ÿπ‘’π‘  𝐴,𝑐′,𝑦 = π›Όβˆ¨ 𝛽 𝑗 ∨ 𝛾 π‘˜ ∨ π‘₯ π‘š Ideally: 𝛾 π‘˜ =0 Then 𝐴′ is an asserting clause with back-jumping level 𝑗<𝑖. Otherwise… (next slide) 𝑗<𝑖 π‘˜β‰₯𝑖 1 Note that we do not start the process if in A there is more than one literal at level i. ** generalized framework for conflict analysis / Audemard et al. SAT’08.

12 Inverse arcs Otherwise 𝛾 π‘˜ >0 : repeat with 𝐴′ being the conflicting clause. Not necessarily will be better. But we can apply recursively. Heuristics for choosing the inverse arc 𝑐′: Do not start the process if in 𝐴 there is more than one literal at level 𝑖. Otherwise, allow only if βˆ€π‘™βˆˆ 𝛾 π‘˜ . 𝑙𝑒𝑣𝑒𝑙 𝑙 =π‘š and 𝑙 seen on the implication graph so far This guarantees that it will be eliminated during conflict analysis, … and that we jump to 𝑗 < 𝑖 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

13 Inverse arcs can create cycles
Generally adding inverse arcs can lead to cycles in the implication graph, e.g.: 𝑐 0 = π‘₯ 0 π‘₯ 1 π‘₯ 𝑐 1 =( π‘₯ π‘₯ π‘₯ 3 ) 𝑐 2 = π‘₯ π‘₯ 2 This, in turn, may lead to cycles in the resolution process. Such cycles are expensive to detect. π‘₯ 0 π‘₯ 1 π‘₯ 3 π‘₯ 2 π‘₯ 4 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

14 Precosat’s solution to volunteers without cycles
Precosat considers volunteers of a specific type: When learning 𝑐 with asserting literal π‘₯ 0 (π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘› π‘₯ 0 =𝑐) Consider a clause cβ€²=( π‘₯ 0 𝑦 1 β‹― 𝑦 𝑛 ) a volunteer if π‘₯ 0 was last to be assigned in 𝑐’. β‡’ π‘₯ 0 did not lead to propagating any 𝑦 𝑖 , β‡’ no cycles π‘β€²β‰ π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘›( π‘₯ 0 ) because of the literal order in the trail. Precosat apparently has the same goal but looks only at a specific type of volunteers. * Precosat (unpublished; open source)

15 Example Suppose 𝑐= π‘₯ 0 𝑧 , 𝑐′={ π‘₯ 0 𝑦 } The trail:
Had 𝑦 been processed first… π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘› π‘₯ 0 =𝑐′ π‘₯ … 𝑦 π‘₯ 0 π‘Ÿπ‘’π‘Žπ‘ π‘œπ‘› π‘₯ 0 =𝐢 qhead * Precosat (unpublished; open source)

16 ContraMiniSat BCP is not done directly on the trail as in Minisat
Instead, maintain a priority-queue of implications Implication = clause + priority 𝑙𝑒𝑣𝑒𝑙, π‘‘π‘Ÿπ‘Žπ‘–π‘™_𝐼𝑛𝑑𝑒π‘₯ // lower is better Rationale: prefer antecedents with low decision levels; among those, prefer stronger literals. Max. dec. level of the non-watched literals Index of the implying literal in the local trail * Contrasat – A contrarian SAT solver (system description) /Van-Gelder

17


Download ppt "Stronger learning and higher backjumping"

Similar presentations


Ads by Google