Skip to content

A curated collection of resources for the Boolean Satisfiability Problem (SAT).

Notifications You must be signed in to change notification settings

urbanophile/awesome-sat-solvers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 

Repository files navigation

Awesome SAT solvers Awesome

This is a curated collection of resources for the Boolean Satisfiability Problem (SAT), one of the most famous problems in computer science. It also cover related problems and software like Satisfiability Modulo Theory (SMT) solvers and Constraint Satisfaction Problem (CSP) solvers

Contents

Introductions and Tutorials

hands-on

surveys

videos

academic tutorials and uni courses

SAT Solvers

SAT has a nice tradition of making solver public and open source. As Yogi Berra said "You can observe a lot by watchin".

important solvers

Three very important whose source code is informative to read are GRASP, Chaff and MiniSAT. These are important or (historical) state of the art solvers.

  • WalkSAT (1994) - local search - code | project page
  • GRASP (1996) - GRASP pioneered the modern approach of CDCL. - code | paper
  • Chaff (2001) - Chaff introduced important data structures and heuristics. - code | paper
  • MiniSAT(2003) - Famous for being good, short (2k LOC), and introducing incremental SAT, MiniSAT is still widely used. Clear and worth reading espcially version 1.12! code | paper
  • CryptoMiniSAT (2009) - Uses XOR primitive - code | paper
  • Glucose (2009) - Introduced different heuristics for SAT and UNSAT - code | paper
  • PicoSAT (2010) - website
  • Lingeling (2010) - version Lingeling aqw won several tracks in 2013 website | 2013 paper
  • MapleSAT (2016) - 2016 winner used machine learning based branching and restarts policies website | paper
  • CaDiCaL (2019) - paper | code
  • Kissat (2020) - - code
  • SBVA-CaDiCaL (2023) - overall winner in SAT competition. Develops heuristic for structured bounded variable addition (SBVA), a preprocessing technique which automatically reencodes formulas by introducing new variables to eliminating clauses which frequently results in reducing formula size. code paper

Other solvers of interest:

  • Slime (2021) - code
  • MergeSAT (2021) - code
  • Satch - expository solver by Armin Biere
  • gopher - solver written in Go
  • varisat - solver written in Rust

Core concepts

  • DPLL - Davis–Putnam–Logemann–Loveland (DPLL) algorithm is the historic basis for modern solvers - wiki
    • original Davis-Putnam 1960 result "A Computing Procedure for Quantification Theory" - paper
    • original DPLL paper 1962 "A machine program for theorem-proving" paper
  • CDCL - Conflict-driven Clause learning the contemporary extension of DPLL - wiki
  • Implication graph - a key construction used to find conflict clauses - wiki
  • Unit propagation - a.k.a. Boolean constraint propagation, a rule for simplifying formulas wiki
  • backjumping - Efficient backtracking is one of the main differences between DPLL and CDCL - wiki
  • SAT heuristics - Heuristics are essential to modern SAT solvers. wiki

Performance Analysis

  • The SAT Museum - paper
  • Assessing Progress in SAT Solvers Through the Lens of Incremental SAT - paper
  • SAT: Disruption, Demise & Resurgence - paper
  • A case for simple SAT solvers - paper

Implementation tips and tricks

Related Solvers

There many theoretical problems which are closely related to SAT. Solvers for the following adjacent problems are worth knowing about:

  • MaxSAT, #SAT and QBF are all progressively harder generalisations of SAT
  • SMT extends the SAT problem with soluble theories.
  • CSP and Integer programming are alternate approaches to solving NP-hard problems

MaxSAT Solvers

MaxSAT is the problem of the finding the maximum number of clauses which can be satisfied for a particular formula. MaxSAT can be seen as an optimisation version of the SAT problem. Minimally Unsatisfiable Subformulas (MUSs) are like duals MaxSAT, they ask for the minimal set of assignments which will show a formula is unsatisfiable. - wiki

Solvers include:

SharpSAT Solvers

The #SAT is the problem of counting all the assignments which satisfy a Boolean formula. - wiki

Solvers include:

QBF solvers

Quantified boolean formula (QBF) is generalisation boolean formula which allows existential and universal quanitifiers. The SAT problem for QBF formula (QSAT) is the canonical PSPACE problem. In addition to CDCL, a standard QBF solver algorithm is CounterExample-Guided Abstraction Refinement (CEGAR) - wiki

Solvers include:

  • CAQE - Solver is based on CEGAR not CDCL - code
  • DepQBF - Based on an extension of CDCL - code

SMT Solvers

Satisfiable Modulo Theory (SMT) solvers are generally built on top of SAT solvers and make use of expressive theories such as bit-vectors and or uninterpreted functions. SMT solvers generally use an extension of the DPLL algorithm called DPLL(T) (T is for Theory) | wiki

Solvers include:

CSP Solvers

Constraint Satisfaction Problems (CSP) solvers differ from SAT solvers but the communities overlap, and techniques from CSP have proven very important in SAT e.g. Boolean Constraint Propagation. wiki | recent book on CSP modelling | recent book on CSP theory

CSP solvers include:

  • GeCode - C++ based - good documentation and overview of the code
  • Sugar - Solving by reduction to SAT -
  • Picat - logic programming-based
  • Choco - Java-based
  • OptaPlanner - Java-based

IP Solvers

0-1 integer programming was the first in Karp's list of 21 NP-complete problems which was reducible to SAT. Pseudo-boolean constraints are another term for 0-1 integer linear programming (ILP). While ILP solvers also use exhaustive search (e.g. branch and bound) they make heavy use of relaxations of the problem. - wiki | IP solvers from the SAT perspective | Academic survey of Branch-and-bound algorithms

Solvers include:

Other Software and Libraries

Besides solvers, there are many other pieces of helpful software for solving SAT and related problems.

Many complex problems can be solved by compiling the problem into a SAT encoding. Examples of domain problems which can be solved by reduction include planning problems (SATPLAN), automated theorem proving (via SMT), and formal verification (by bounded model checking).

Libraries

  • PySAT (Python) - wrapper library website
  • Sat4j (Java) - modelling and wrapper for Java - website
  • ORTools (Python) - general purpose modelling library for optimisation problems but very good as CSP - website

High Level Modelling Languages

  • MiniZinc (Optimisation) project
  • Alloy (Software verification) project

Verification of proofs

  • DRAT-Trim - verifier of proofs of unsatisfiability (UNSAT)

Research

There is a vast literature on SAT.

Data structures

Lazy data structures have proven to be very important in SAT solvers.

  • M. Iser and T. Balyo, ‘Unit Propagation with Stable Watches’, 2021. link
  • I. P. Gent, ‘Optimal Implementation of Watched Literals and More General Techniques’, Journal of Artificial Intelligence Research, vol. 48, pp. 231–252, Oct. 2013, doi: 10.1613/jair.4016. link
  • more info

Encoding Problems in SAT

Heuristics

Heuristics around choosing variables which variables and which assignments to make are an extremely improtant part of SAT Solvers Important heuristics include:

  • Variable State Independent Decaying Sum (VSAID) introduced in Chaff
  • Clause-move-to-front introduced by HAIFASAT

Theoretical Complexity

SAT raises some interesting questions because even though it is the canonical NP-complete problem, practical problems can often be solved in close to linear time.

Parallelisation

SAT is tricky to parallelise, but the cube-and-conquer method has been very popular.

  • Cube and Conquer: Guiding CDCL SAT Solvers by Lookaheads paper

Machine Learning

Machine learning is a related branch of AI and theorem proving. The overlap is mostly in the direction of applying machine learning methods to help SAT solvers e.g.

  • SATzilla: Portfolio-based Algorithm Selection for SAT. Journal of Artificial Intelligence Research 32 (2008) 565-606. paper
  • Machine Learning for Automated Theorem Proving - A survey of recent work paper

Other Resources

Handbook

The handbook of SAT is an excellent and comprehensive resources.

Books

Competitions

  • SAT Competition link
  • MiniZinc Competition link
  • LP/CP programming contest link
  • MaxSAT competition link
  • Model count competition link
  • QBF competition (more irregular) link
  • Other research competitions link

Benchmark Problems

Releases

No releases published

Packages

No packages published