340 likes | 527 Views
Empirical Study of the Anatomy of Modern SAT Solvers. Hadi Katebi Karem A. Sakallah University of Michigan Joao Marques-Silva University College Dublin. Study Caveats. Not trying to find the fastest SAT solver! Not considering all SAT techniques out there! Preprocessing
E N D
Empirical Study of the Anatomy of Modern SAT Solvers HadiKatebi Karem A. Sakallah University of Michigan Joao Marques-Silva University College Dublin SAT 2011 Ann Arbor Michigan June 22nd
Study Caveats • Not trying to find the fastest SAT solver! • Not considering all SAT techniques out there! • Preprocessing • Symmetry breaking • Not arguing the fact that different SAT techniques are helpful to SAT solvers or not! SAT 2011 Ann Arbor Michigan June 22nd
Study Objectives • Identifying major algorithmic features of modern SAT solvers • Dissecting modern SAT solvers and isolating the effect of different SAT techniques • What is the relative contribution of each technique? • Verifying the validity of some known facts • Is the any anomalies? • Gathering statistical data SAT 2011 Ann Arbor Michigan June 22nd
Outline • Brief history of SAT • Analyzing the anatomy of modern solvers • Relative contribution of different SAT techniques • Experimental study • Results • Conclusions SAT 2011 Ann Arbor Michigan June 22nd
SAT History Rsat PicosatSATzilla Clasp Precosat Glucose …. SATO 1993-1994 PSATO 1996 DPLL POSIT 1995 Relsat 1997 DP 1960 DLL 1962 GRASP 1996 CHAFF 2001 MiniSAT 2003 1968: Exp. Low Bound Restarts 1998 1971: NP-Complete Non-DPLL style search Greedy Incomplete local search GSAT 1992 Walk SAT 1993 SAT 2011 Ann Arbor Michigan June 22nd
SAT Techniques DPLL Two-Literal Watching Branching Heuristics Literal Phase Saving Random Restarts Clause Learning Learning Aware Branching Heuristics (VSIDS) Conflict Clause Minimization Random Restarts Two-Literal Watching Literal Phase Saving SAT 2011 Ann Arbor Michigan June 22nd
How did we choose these techniques? • Empirical data: these techniques are critical for scalability and performance [#citations] • Clause learning [1554] • Conflict clause minimization [17] • Boosting combinatorial search through randomization [891] • Luby [117], Adaptive [24], Problem-sensitive [3] • Two-watched literals and VSIDS branching heuristic [2581] • Literal phase saving [96] SAT 2011 Ann Arbor Michigan June 22nd
Empirical Study • 5 features: CL, RST, VSIDS, 2WL, and PHS • Add features one at a time to DPLL • Remove features one at a time from CDCL • Assemble 1000 CNF instances from 12 diverse application areas • Generate 10 different versions of each benchmark using a re-ordering script • Apply each configuration to each instance • Gather statistics by calculating the mean value of run times associated with each benchmark • Use MLE to fit a normal dist. SAT 2011 Ann Arbor Michigan June 22nd
Configurations Variable State Independent Decaying Sum Two-literal Watching Dynamic Largest Individual Sum Counter-based BCP SAT 2011 Ann Arbor Michigan June 22nd
Configurations SAT 2011 Ann Arbor Michigan June 22nd
Configurations SAT 2011 Ann Arbor Michigan June 22nd
Configurations SAT 2011 Ann Arbor Michigan June 22nd
Configurations SAT 2011 Ann Arbor Michigan June 22nd
Remark #1: VSIDS without CL • VSIDS is a learning-aware branching heuristic • What if we want to enable VSIDS but disable CL? Conflict Updates the Activitiesneeded for VSIDS Analyzing the conflict and deriving a learned clause Attaching the learned clause Back-jumping SAT 2011 Ann Arbor Michigan June 22nd
Remark #2: RST on top of DPLL • When CL is enabled: • The number of unresolved clauses associated with each variable changes dynamically • DLIS takes a different path every time searchis restarted • What if CL is disabled but RST is enabled? • DLIS takes the same path over and over again • Remedy: inject 25% of random branching into DLIS SAT 2011 Ann Arbor Michigan June 22nd
Benchmark Families SAT 2011 Ann Arbor Michigan June 22nd
Experimental Evaluation • Instrumented MiniSAT version 2.2.0 • Experiments on a cluster of servers at UCD • 3GHz Intel Xeon CPU • 32GB Memory • 64-bit RedHat Linux SAT 2011 Ann Arbor Michigan June 22nd
DPLL DPLL SAT 2011 Ann Arbor Michigan June 22nd
2WL DPLL/2WL SAT 2011 Ann Arbor Michigan June 22nd
PHS DPLL/2WL PHS SAT 2011 Ann Arbor Michigan June 22nd
RST DPLL/2WL PHS RST SAT 2011 Ann Arbor Michigan June 22nd
VSIDS DPLL/2WL VSIDS PHS RST SAT 2011 Ann Arbor Michigan June 22nd
CL DPLL/2WL VSIDS PHS CL RST SAT 2011 Ann Arbor Michigan June 22nd
CDCL DPLL/2WL VSIDS CDCL PHS CL RST SAT 2011 Ann Arbor Michigan June 22nd
¬ CL DPLL/2WL VSIDS CDCL PHS ¬ CL CL RST
¬ VSIDS ¬ VSIDS DPLL/2WL VSIDS CDCL PHS ¬ CL CL RST SAT 2011 Ann Arbor Michigan June 22nd
¬ 2WL ¬ VSIDS ¬ 2WL DPLL/2WL VSIDS CDCL PHS ¬ CL CL RST SAT 2011 Ann Arbor Michigan June 22nd
¬RST ¬ VSIDS ¬ RST ¬ 2WL DPLL/2WL VSIDS CDCL PHS ¬ CL CL RST SAT 2011 Ann Arbor Michigan June 22nd
¬PHS ¬ VSIDS ¬ RST ¬ 2WL DPLL/2WL ¬ PHS VSIDS CDCL PHS ¬ CL CL RST SAT 2011 Ann Arbor Michigan June 22nd
Summary of the Results • CL > VSIDS > 2WL > RST > PHS • CDCL provides the best overall performance • CL and 2WL showed consistent improvement • Algorithmic optimization • The rest are heuristics • RST is helpful to both SAT and UNS instances • More helpful to SAT instances SAT 2011 Ann Arbor Michigan June 22nd
Additional Options • Level of conflict clause minimization • None, basic, deep • Level of phase saving • None, limited, full • Random restart strategies • Luby, power of 2 function • Random initial variable scoring • Random decisions in branching heuristics SAT 2011 Ann Arbor Michigan June 22nd
Observations • Overall, default setting yields the best performance, however: • Adding randomness to VSIDS & relaxing conflict clause minimization helped solve more instances of the hveriffamily • Relaxing phase saving was modestly helpful to equiv, hverif and termrw families • Applying a power of 2 restart helped solve more instance of the crypto and termrw families SAT 2011 Ann Arbor Michigan June 22nd
Observations • Completely random branching solved more instances (7325) than DLIS (6932) • DLIS solved 477 instances that random branching failed to process • Such mixed results are hard to explain without considering the specific attributes of instances • Inclusion or exclusion of these options has, at best, a modest impact on performance SAT 2011 Ann Arbor Michigan June 22nd
Conclusions • Much effort to improve CDCL algorithms, but little effort to find the relative importance of CDCL features • Our work is a preliminary attempt to understand the impact of CDCL features on performance • Our work helps building theoretical model that relates the performance of CDCL to key attributes of SAT instances SAT 2011 Ann Arbor Michigan June 22nd