cube and conquer
play

Cube and Conquer Guiding CDCL SAT Solvers by Lookaheads Marijn Heule - PowerPoint PPT Presentation

Cube and Conquer Guiding CDCL SAT Solvers by Lookaheads Marijn Heule 1 , 2 , Oliver Kullmann 3 , Siert Wieringa 4 and Armin Biere 1 1 Johannes Kepler University, Linz, Austria 2 Delft University of Technology, Delft, The Netherlands 3 Swansea


  1. Cube and Conquer Guiding CDCL SAT Solvers by Lookaheads Marijn Heule 1 , 2 , Oliver Kullmann 3 , Siert Wieringa 4 and Armin Biere 1 1 Johannes Kepler University, Linz, Austria 2 Delft University of Technology, Delft, The Netherlands 3 Swansea University, United Kingdom http://cs.swan.ac.uk/~csoliver 4 Aalto University, Helsinki, Finland Belgrade, February 3, 2012, Fifth Workshop on Formal and Automated Theorem Proving and Applications Best Paper Award at HVC 2011 [Heule et al., 2012] O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 1 / 27

  2. Motivation Context: Huge performance boost of CDCL solvers in the last decade CDCL solvers have become a crucial tool, e.g. in Formal Verification Challenges: CDCL is not strong on small hard combinatorial problems CDCL is hard to parallelise effectively CDCL: Conflict-Driven Clause Learning O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 2 / 27

  3. Satisfiability problem Satisfiability (SAT) problem: Given a formula in Conjunctive Normal Form, is there a truth assignment to the Boolean variables satisfying all clauses? clause: ( a ∨ b ∨ c ) (“CNF-clause”) cube: ( d ∧ e ∧ f ) (alternatively, think of it as a partial assignment). Major complete SAT solver architectures: Conflict-Driven Clause Learning Lookahead. O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 3 / 27

  4. Conflict-Driven Clause Learning solvers Highlights: goal: find small effective conflict clauses decisions: assign variables that occur in recent conflicts strength: powerful on ”easy” problems Ideal CDCL situation: hit a conflict that can be generalised / analysed to a small clause O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 4 / 27

  5. Conflict-Driven Clause Learning solvers Highlights: goal: find small effective conflict clauses decisions: assign variables that occur in recent conflicts strength: powerful on ”easy” problems General CDCL situation: hit a conflict that can be generalised / analysed to a large clause O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 5 / 27

  6. Lookahead solvers Highlights: goal: construct a small binary search tree decisions: assign variables that cause a large reduction strength: powerful on small hard problems Ideal lookahead situation: split the search space into two equally large but smaller parts O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 6 / 27

  7. Lookahead solvers Highlights: goal: construct a small binary search tree decisions: assign variables that cause a large reduction strength: powerful on small hard problems General lookahead situation: the search space is split into a large and a small part O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 7 / 27

  8. Best of both worlds: Combining Lookahead and CDCL L o o k a h e a d C D C L O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 8 / 27

  9. Best of both worlds: Cube and Conquer C U B E & Q C O N U E R O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 9 / 27

  10. Cube: key observation / contribution Split until the (sub-)problems become easy: do not have a fixed cut off depth determine hardness by (total) number of assigned variables create many thousands or even millions of cubes. General lookahead situation: the search space is split into a large and a small part O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 10 / 27

  11. Cube: example x 5 cutoff leaf 1 0 refuted leaf x 7 x 2 1 0 0 1 x 8 x 9 x 3 x 8 1 1 1 0 1 0 0 0 x 2 x 7 x 9 1 0 0 1 1 0 F 1 := F ∧ ( x 5 ∧ x 7 ∧ ¬ x 8 ) F 5 := F ∧ ( ¬ x 5 ∧ ¬ x 2 ∧ ¬ x 3 ) F 2 := F ∧ ( x 5 ∧ x 7 ∧ x 8 ∧ x 2 ) F 6 := F ∧ ( ¬ x 5 ∧ x 2 ∧ x 8 ∧ x 9 ) F 3 := F ∧ ( x 5 ∧ ¬ x 7 ∧ x 9 ) F 7 := F ∧ ( ¬ x 5 ∧ x 2 ∧ x 8 ∧ ¬ x 9 ) F 4 := F ∧ ( x 5 ∧ ¬ x 7 ∧ ¬ x 9 ) O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 11 / 27

  12. Cube: pseudo-code (1) Cube(CNF F , DNF A , CNF C , dec. lits. ϕ dec , imp. lits. ϕ imp ) returns a pair ( A , C ), the list of cubes and the list of learned clauses 1 θ := 1 . 05 · θ 2 ( F , ϕ imp ) := lookahead simplify and learn( F , ϕ dec , ϕ imp ) if ϕ dec ∪ ϕ imp falsify a clause in F or | ϕ dec | > 20 then θ := 0 . 7 · θ 3 4 if ϕ dec ∪ ϕ imp falsify a clause in F then return ( A , C ∪ {¬ ϕ dec } ) 5 if cutoff heuristic is triggered then return ( A ∪ { ϕ dec } , C ) 6 l dec := lookahead decide( F , ϕ dec , ϕ imp ) 7 ( A , C ) := Cube( F , A , C , ϕ dec ∪ { l dec } , ϕ imp ) return Cube( F , A , C , ϕ dec ∪ {¬ l dec } , ϕ imp ) 8 O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 12 / 27

  13. Cube: pseudo-code (2) Cube (CNF F , DNF A , CNF C , dec. lits. ϕ dec , imp. lits. ϕ imp ) θ := 1 . 05 · θ 1 � F , ϕ imp � := lookahead simplify and learn ( F , ϕ dec , ϕ imp ) 2 3 if ϕ dec ∪ ϕ imp falsify a clause in F or | ϕ dec | > 20 then θ := 0 . 7 · θ 4 if ϕ dec ∪ ϕ imp falsify a clause in F then return �A , C ∪ {¬ ϕ dec }� 5 if | ϕ dec | · | ϕ dec ∪ ϕ imp | > θ · | vars( F ) | then return �A ∪ { ϕ dec } , C� l dec := lookahead decide ( F , ϕ dec , ϕ imp ) 6 �A , C� := Cube ( F , A , C , ϕ dec ∪ { l dec } , ϕ imp ) 7 8 return Cube ( F , A , C , ϕ dec ∪ {¬ l dec } , ϕ imp ) O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 13 / 27

  14. Conquer: describing cubes How much information to send to the CDCL solver? Only the decisions ∧ ϕ dec The full assignment (including failed literals) ∧ ϕ dec ∧ ϕ imp The simplified formula (including local learnt clauses) O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 14 / 27

  15. Conquer: ordering cubes What is the optimal order to solve the cubes? Depth-first search (in lookahead order) 1 2 3 4 5 6 Solves cubes with increasing (approximated) search space 4 1 5 3 6 2 Solves cubes with decreasing (approximated) search space 2 6 3 5 1 4 O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 15 / 27

  16. Conquer: pseudo-code Conquer (CDCL solver S , CNF formula F , DNF of assumptions A ) 1 S . Load ( F ) 2 while A is not empty do get a cube c from A and remove c from A 3 if S . SolveWithAssumptions ( c ) = satisfiable then 4 5 return satisfiable 6 S . AnalyzeFinal () 7 S . ResetClauseDeletionPolicy () return unsatisfiable 8 O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 16 / 27

  17. Conquer: parallel solving Strategies to solve cubes in parallel: 1 cores solve different cubes in parallel 2 cores solve the same cube in parallel 3 start with (1) till no new cubes are available, continue with (2) What to share between cores? nothing, so hardly communication required (only ask / receive cubes) sharing the AnalyzeFinal clauses (maybe only to master) sharing the short conflict clauses, units (maybe also binaries) O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 17 / 27

  18. Conquer: parallel solving Strategies to solve cubes in parallel: 1 cores solve different cubes in parallel 2 cores solve the same cube in parallel 3 start with (1) till no new cubes are available, continue with (2) What to share between cores? nothing, so hardly communication required (only ask / receive cubes) sharing the AnalyzeFinal clauses (maybe only to master) sharing the short conflict clauses, units (maybe also binaries) O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 17 / 27

  19. Results: two experiments 1 st experiment: single core on Van der Waerden numbers hard combinatorial problem in Ramsey Theory comparison with the best solver for each instance cube solver: OKsolver conquer solver: minisat-2.2.0 describing the cubes (just) by the naked simplified formula (applying the partial assignments; without any local learning). 2 nd experiment: multi core on challenging applications unsolved application instances from the SAT09 benchmarks comparison with the best parallel solvers cube solver: march conquer solver: lingeling . O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 18 / 27

  20. Results: palindromic Van der Waerden numbers k 1 : arithmetic progression of first set k 2 : arithmetic progression of second set n : number of variables best solver : time of fastest sequential solver D : cut off depth. k 1 k 2 n #cls ? best solver D #cubes C&C 3 25 294 45779 U ∼ 13 days 45 9120 6.5 hours 3 25 304 49427 U ∼ 13 days 45 13462 2 days 4 12 194 15544 U > 14 days 30 132131 2 days 4 12 198 15889 U > 14 days 34 147237 8 hours 5 8 157 9121 U 3 . 5 days 20 2248 5 hours 5 8 162 9973 U 53 days 20 87667 40 hours See [Ahmed et al., 2011, Kullmann, 2012]. O Kullmann (Swansea University) Cube and Conquer February 3, 2012, FATPA 19 / 27

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend