Parallelism in SAT Solvers

Slides:



Advertisements
Similar presentations
The behavior of SAT solvers in model checking applications K. L. McMillan Cadence Berkeley Labs.
Advertisements

Exploiting SAT solvers in unbounded model checking
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
Counting the bits Analysis of Algorithms Will it run on a larger problem? When will it fail?
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
IBM Labs in Haifa © 2005 IBM Corporation Adaptive Application of SAT Solving Techniques Ohad Shacham and Karen Yorav Presented by Sharon Barner.
ULTIMATELY INCREMENTAL SAT Alexander Nadel 1, Vadim Ryvchin 1,2, and Ofer Strichman 2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’14, Vienna,
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
Hrinking hrinking A signment tack tack. Agenda Introduction Algorithm Description Heuristics Experimental Results Conclusions.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
On-The-Fly Resolve Trace Minimization Ohad Shacham and Karen Yorav IBM Haifa Research Laboratory.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
Searching for Autarkies to Trim Unsatisfiable Clause Sets Mark H. Liffiton and Karem A. Sakallah University of Michigan {liffiton,
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke.
State-of-the-art in SAT solvers
Solving the Protein Threading Problem in Parallel Nocola Yanev, Rumen Andonov Indrajit Bhattacharya CMSC 838T Presentation.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 21, 2008 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
1 Linear-time Reductions of Resolution Proofs Omer Bar-Ilan Oded Fuhrmann Shlomo Hoory Ohad Shacham Ofer Strichman Technion.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Boolean Satisfiability and SAT Solvers
Large-scale Hybrid Parallel SAT Solving Nishant Totla, Aditya Devarakonda, Sanjit Seshia.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Parallelizing MiniSat I-Ting Angelina Lee Justin Zhang May 05, Final Project Presentation.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Boolean Satisfiability Present and Future
Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper Eszterházy Károly.
Efficient SAT Solving Under Assumptions Alexander Nadel 1 and Vadim Ryvchin 1,2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12, Trento, Italy.
“Predicting Learnt Clauses Quality in Modern SAT Solvers” & “Blocked Clause Elimination” Ateeq Sharfuddin CS 297: Championship Algorithms.
Preprocessing in Incremental SAT Alexander Nadel 1, Vadim Ryvchin 1,2, and Ofer Strichman 2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12,
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
REU 2007-ParSat: A Parallel SAT Solver Christopher Earl, Mentor: Dr. Hao Zheng Department of Computer Science & Engineering Introduction Results and Conclusions.
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
Bit-Vector Optimization ALEXANDER NADER AND VADIM RYVCHIN INTEL TACAS 2016.
Dynamic Backtracking for SAT Presented by: Phil Oertel April 6, 2004.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
CS137: Electronic Design Automation
Inference and search for the propositional satisfiability problem
Deriving small unsatisfiable cores with dominators
Simple Circuit-Based SAT Solver
Mining backbone literals in incremental SAT
Canonical Computation without Canonical Data Structure
ECE 667 Synthesis and Verification of Digital Circuits
Canonical Computation Without Canonical Data Structure
Decision Procedures An Algorithmic Point of View
Efficient MUS Extraction with Resolution
Canonical Computation without Canonical Data Structure
Artificial Intelligence
Canonical Computation without Canonical Data Structure
Stronger learning and higher backjumping
Decision heuristics based on an Abstraction/Refinement model
Faster Extraction of High-Level Minimal Unsatisfiable Cores
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

Parallelism in SAT Solvers Vadim Ryvchin

Parallel vs. One threaded (SAT’16 Competition)

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

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

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

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

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

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

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

Concurrent Clause Strengthening Solver Work Set Reducer Result Queue

Concurrent Clause Strengthening Shared Memory Solver Work Set Reducer Result Queue

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

Concurrent Clause Strengthening Solver Work Set Reducer Clause Strengthening Result Queue

Concurrent Clause Strengthening Solver Work Set Reducer Result Queue Reduced Clause

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

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

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

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

The Reducer

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

Result Queue Unlimited FIFO

Unsatisfiable Benchmarks

Satisfiable Benchmarks

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

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

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

Cube and Conquer

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

Creating Cubes

Creating Cubes Input Formula

Cubes Discovered Till now Creating Cubes Cubes Discovered Till now

Creating Cubes Conflict Clauses

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

Creating Cubes Implied Literals (In Current Cube)

Run BCP and Simplification Creating Cubes Run BCP and Simplification

Creating Cubes In case of conflict

Creating Cubes Perform Cutoff

Creating Cubes Choose new variable l

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

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

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

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

Cutoff Heuristic – Cube and Conquer

Cutoff Heuristic – Cube and Conquer

Cutoff Heuristic – Cube and Conquer

Cutoff Heuristic – Cube and Conquer

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

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

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

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

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

Sequential Solver

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)

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

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

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