1 / 19

Parallel SAT (Sat4j)

Parallel SAT (Sat4j). Ella Rabinovich (ellarabi@tx.technion.ac.il) Nimrod Busany (nimrodbu@tx.technion.ac.il) Based on Y. Hamadi, S. Jabbour, L. Sais. “ManySAT: A parallel SAT solver.”. DPLL SAT - reminder. A wrapper creating 4 solvers with different thread ids

Télécharger la présentation

Parallel SAT (Sat4j)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parallel SAT (Sat4j) Ella Rabinovich (ellarabi@tx.technion.ac.il) Nimrod Busany (nimrodbu@tx.technion.ac.il) Based on Y. Hamadi, S. Jabbour, L. Sais. “ManySAT: A parallel SAT solver.”

  2. DPLL SAT - reminder

  3. A wrapper creating 4 solvers with different thread ids Varying solvers’ individual parameters according to thread id restart strategy, variable selection order, polarity (phase) selection,restart-related parameters Invocation of 4 solvers simultaneously First thread that finishes destroys all the others and reports results Measurements are aggregated over the entire collection Methodology

  4. Solver 0 is left with its initial parameters MiniSat restart strategy conflicts = initConflictBound upon a restart: conflicts=conflicts*conflictBoundIncFactor VSIDS like heuristics from MiniSAT taking into account the objective, and phase selection based on the latest learnt clause Variables activity is based on both constraints and objective function Variable is assigned a value based on the latest learnt clause (with the corresponding var) conflictBoundIncFactor=1.5, initConflictBound=100 Stops conflict analysis at the first Unique Implication Point Learn all clauses as in MiniSAT Solver 0 configuration

  5. Solver 1 parameters were configured as following: Armin Biere (Picosat) restarts strategy inner, outer = initConflictBound upon a restart: if (inner>=outer) {inner=initConflictBound; outer=outer*conflictBoundIncFactor;} else {inner=inner*conflictBoundIncFactor;} conflicts=inner; conflicts number is advances in a cyclic manner (50, 50, 75, 50, 75, 113…) VSIDS like heuristics from MiniSAT taking into account the objective, and a lightweight component caching from RSAT Variables activity is based on both constraints and objective function Variable is assigned a value based on its latest assignment (phase saving) conflictBoundIncFactor=1.5, initConflictBound=50 Stops conflict analysis at the first Unique Implication Point Learn all clauses as in MiniSAT Solver 1 configuration

  6. Solver 2 parameters were configured as following: luby style (SATZ_rand, TiniSAT) restarts strategy with factor 32 luby series of values is precomputed upon a restart: conflicts=luby[restart]*factor VSIDS like heuristics from MiniSAT taking into account the objective function,and using a negative phase selection Variables activity is based on both constraints and objective function Chosen variable is assigned a negative value Stops conflict analysis at the first Unique Implication Point Learn all clauses as in MiniSAT Solver 2 configuration

  7. Solver 3 parameters were configured as following: MiniSAT restarts strategy conflicts = initConflictBound upon a restart: conflicts=conflicts*conflictBoundIncFactor Tries to first select a watched unassigned pure (single phase) literal, else VSIDS if there is a watched unassigned pure literal – take it else use the VSIDS heuristic conflictBoundIncFactor=1, initConflictBound=500 Stops conflict analysis at the first Unique Implication Point Learn all clauses as in MiniSAT Solver 3 configuration

  8. 0 1 2 3 i m p o r t e x p o r t 0 head tail 1 head tail 2 head tail 3 head tail Sharing clauses - implementation

  9. Extension of java ConcurrentHashMap<String,ConcurrentLinkedQueue<Constr>> A queue with clauses is maintained for each solver, with string solver id Once a conflict clause is learnt it is exported to queues of all others Only if the queue does not contain it already (was exported by some other solver) At restart point a solver imports all clauses from its individual queue Only clauses that where not imported already (additional HashSet) The queue is emptied at import Sharing learnt (conflict) clauses

  10. Two collections – SAT-UNSAT (314) and OPTIMIZATION (398) Benchmark used in PB’12 competition SAT-UNSAT collection divided into easy and difficult instances easy instance: solution time <=60 sec difficult instance: solution time >60 sec Both collections contain instances from various sub-categories “small”, “medium” and “big” integers Sharing unit clauses only Import at restart Experimental setup

  11. Experimental environment – linux, java 32 bit, ~2750MB memory, 4 cores Python script invoking parallel and sequential solvers on each instance Results validation for correctness Both solvers “agree” on SAT and UNSAT Naturally, there are some disagreements on timeouts Results analysis Solution statistics Sensitivity analysis (varying the shared clause size) Scatter plots Evaluation

  12. Experimental results – SAT-UNSAT (easy)

  13. Experimental results – SAT-UNSAT (difficult)

  14. Scatter plots Experimental results – SAT-UNSAT (cont.)

  15. Scatter plots (log-log) Experimental results – SAT-UNSAT (cont.)

  16. Experimental results – OPTIMIZATION

  17. Experimented with a subset of SAT-UNSAT collection containing almost no timeouts See additional detailed results in the attached pdf Experimental results – varying clause size

  18. We’ve presented a parallel SAT which exploits multi-core architectureby using multi-threaded environment Our approach uses a portfolio of complementary sequential solvers, where solvers cooperate in order to improve the overall performance The proposed technique is relatively simply to apply, however, performs surprisingly well in many “hard” cases Good results achieved, particularly with SAT-UNSAT collection Also, in OPTIMIZATION collection reduced the total time to ~30% Significant decrease in number of timeouts  pragmatic industrial impact Yet, there are many instances where the sequential solver performed better (could do better with a multi-processing approach?) Improvement in total time spent Summary

  19. Y. Hamadi, S. Jabbour, L. Sais. “ManySAT: A parallel SAT solver” D. Le Berre, L. Simon, A. Tacchella: “Challenges in the QBF arena: the SAT’03 evaluation of QBF solvers”. J. Chen: “Phase selection heuristics for satisfiability solvers”. References

More Related