Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallelism in SAT Solvers

Similar presentations


Presentation on theme: "Parallelism in SAT Solvers"— Presentation transcript:

1 Parallelism in SAT Solvers
Vadim Ryvchin

2 Parallel vs. One threaded (SAT’16 Competition)

3 Low Level Parallelization
BCP Parallelization Cuda Cores Simplification Parallelization Cube and Conquer How to Cube? What to share? Portfolio Same solver different strategies Different Solvers Cooperative portfolio

4 Low Level Parallelization
BCP Parallelization Cuda Cores Simplification Parallelization Cube and Conquer How to Cube? What to share? Portfolio Same solver different strategies Different Solvers With and without sharing

5 Low Level Parallelization
BCP Parallelization Cuda Cores Simplification Parallelization Cube and Conquer How to Cube? What to share? Portfolio Same solver different strategies Different Solvers Cooperative portfolio

6 Concurrent Clause Strengthening
Concurrent Clause Strengthening, SAT’13: Siert Wieringa and Keijo Heljanko

7 Reminder – Conflict Clause
@2 @2 @2 @5 @5 @5 @5 @5 @5 @5 X @5 @5 @5 @3 @3 @3

8 Reminder – Conflict Clause Simplification
@2 @2 @2 @5 @5 @5 @5 @5 @5 @5 X @5 @5 @5 @3 @3 @3

9 Concurrent Clause Strengthening
Two threads: Solver - solves the SAT problem Reducer - reduces the learned clauses The main solver can disable any type of conflict clause minimization

10 Concurrent Clause Strengthening
Solver Work Set Reducer Result Queue

11 Concurrent Clause Strengthening
Shared Memory Solver Work Set Reducer Result Queue

12 Concurrent Clause Strengthening
Copy Learned Clause Solver Work Set Reducer Result Queue

13 Concurrent Clause Strengthening
Solver Work Set Reducer Clause Strengthening Result Queue

14 Concurrent Clause Strengthening
Solver Work Set Reducer Result Queue Reduced Clause

15 Concurrent Clause Strengthening
Solver Work Set Reducer Result Queue Solver Picks Reduced Clauses

16 Concurrent Clause Strengthening
Solver Work Set Reducer Result Queue Conflict as result of reduced clause

17 Concurrent Clause Strengthening
If reduced clause creates a conflict: Backtrack to conflict level Perform a regular conflict analyzes Notice: Original clause ᴄ and reduced clause ᴄ’: ᴄ’ < ᴄ Two runs are on the same problem are none-deterministic

18 The Reducer SAT Solver with all the original clauses
Keeps all newly added and later reduced clauses The Reduction Algorithm: For input clause c: For every literal l of c assign ~l If conflict: analyze and learn a new clause (reduced size) If no conflict: Remove implied literals from c

19 The Reducer

20 The Work Set The reducer thread process conflicts slower than new clauses provided FIFO – old clauses reduced first, but less relevant to the solver LIFO – newest clauses reduced first, but “misses” good old ones By Clause “Quality” – length or LBD – too expensive to keep ordered Solution: Limited size ordered by “quality” queue. Oldest clause removed if new inserted

21 Result Queue Unlimited FIFO

22

23 Unsatisfiable Benchmarks

24 Satisfiable Benchmarks

25 Low Level Parallelization
BCP Parallelization Cuda Cores Simplification Parallelization Cube and Conquer How to Cube? What to share? Portfolio Same solver different strategies Different Solvers With and without sharing

26 Cube and Conquer (CC) Cube and Conquer: Guiding CDCL SAT Solvers by Lookahead, HVC’11: Marijn J.H. Heule , Oliver Kullmann , Siert Wieringa and Armin Biere Concurrent Cube-and-Conquer, Pragmatics of SAT’12: Peter van der Tak , Marijn J.H. Heule and Armin Biere Combination of Lookahead solvers with CDCL solvers

27 Cube and Conquer Motivation: Main Problems:
Split the search space to cubes Combined cubes easier to solver than the original formula Main Problems: Cutoff Heuristic Splitting Heuristic

28 Cube and Conquer

29 Look Ahead Solvers in a Nutshell
Given CNF formula F a lookahead on literal x: x assigned to T Run BCP() In case no conflict, F’ created (~x removed from the clauses, clauses containing x removed) F’/F is weighted Reverse F’ to F For every decision choose literal with largest weight If x analyzed without decisions and conflict occurs then x is failed literal Local Learning – mostly unary and binary clauses, example: hyper binary resolution

30 Creating Cubes

31 Creating Cubes Input Formula

32 Cubes Discovered Till now
Creating Cubes Cubes Discovered Till now

33 Creating Cubes Conflict Clauses

34 Decision Literals (Current Cube)
Creating Cubes Decision Literals (Current Cube)

35 Creating Cubes Implied Literals (In Current Cube)

36 Run BCP and Simplification
Creating Cubes Run BCP and Simplification

37 Creating Cubes In case of conflict

38 Creating Cubes Perform Cutoff

39 Creating Cubes Choose new variable l

40 Call recursively for l and ~l
Creating Cubes Call recursively for l and ~l

41 After Creating Cubes Reduce CNF C by applying self-subsumption resolution Reduce cubes in DNF A by using CNF C clauses. Both replaced by:

42 Cutoff Heuristic Good Heuristic:
The runtimes to solve each of the subproblems are comparable The sum of runtimes does not exceed the runtime of solving the original formula Suggestion: Achieved by fraction of the variables which are assigned After k decisions Combination of both

43 Cutoff Heuristic – Cube and Conquer
Use product of both:

44 Cutoff Heuristic – Cube and Conquer

45 Cutoff Heuristic – Cube and Conquer

46 Cutoff Heuristic – Cube and Conquer

47 Cutoff Heuristic – Cube and Conquer

48 Splitting Heuristic Use of Lookahead heuristic:
evalcls(xi) – sum of the reduced, not satisfied clauses evalvar(xi) – number of assigned variables

49 Splitting Heuristic Use of Lookahead heuristic:
evalcls(xi) – sum of the reduced, not satisfied clauses evalvar(xi) – number of assigned variables

50 Splitting Heuristic Use of Lookahead heuristic:
evalcls(xi) – sum of the reduced, not satisfied clauses evalvar(xi) – number of assigned variables

51 Splitting Heuristic Use of Lookahead heuristic:
evalcls(xi) – sum of the reduced, not satisfied clauses evalvar(xi) – number of assigned variables

52 Splitting Heuristic Choose the variable with the highest:
In case of tie, broke by: - more effective on instances with few binary clauses, usually in crafter and random instances - more effective on industrial instances, faster and easier for implementation

53 Sequential Solver

54 Problems with Cube-and-Conquer (CC)
Splitting to cubes should help CDCL solver Refute cubes which are easy to CDCL and not to refute the hard ones In reality there are cases where: Huge number of easy cubes (thousands of millions) Several cubes as difficult as the original formula (1-2 usually)

55 Lookahead and CDCL in Parallel
New Splitting Literal CDCL SAT Assumptions Unsat Core

56 Lookahead and CDCL in Parallel
No need for cutoff heuristic as we wait till CDCL solver is done Cannot be parallelized on cubes In case CDCL much faster than Lookahead, CDCL stuck

57 Improvements If CDCL faster than Lookahead (after 5sec), then stop the Lookahead and let CDCL work Additional heuristic to cutoff to enable parallel cube solution: Just leave the CDCL thread working

58


Download ppt "Parallelism in SAT Solvers"

Similar presentations


Ads by Google