Expand description
Interfaces to SAT Solvers
This module holds types and functions regarding SAT solvers. The main
element is the Solve trait that every SAT solver in this library
implements.
Available Solvers
Solvers are available through separate crates.
CaDiCaL
CaDiCaL is a fully incremental SAT
solver by Armin Biere implemented in C++. It includes incremental
inprocessing. It is available through the
rustsat-cadical crate.
References
- Armin Biere and Katalin Fazekas and Mathias Fleury and Maximillian Heisinger: CaDiCaL, Kissat, Paracooba, Plingeling and Treengeling Entering the SAT Competition 2020, SAT Competition 2020.
- Original Repository: https://github.com/arminbiere/cadical
- Solver crate: https://crates.io/crates/rustsat-cadical
Kissat
Kissat is a non-incremental SAT
solver by Armin Biere implemented in C. It is available through the
rustsat-kissat crate.
References
- Armin Biere and Katalin Fazekas and Mathias Fleury and Maximillian Heisinger: CaDiCaL, Kissat, Paracooba, Plingeling and Treengeling Entering the SAT Competition 2020, SAT Competition 2020.
- Repository: https://github.com/arminbiere/kissat
- Solver crate: https://github.com/chrjabs/rustsat-kissat
Minisat
Minisat is an incremental SAT solver
by Niklas Een and Niklas Sörensson. It is available through the
rustsat-minisat crate.
References
- Niklas Een and Niklas Sörensson (2003): An Extensible SAT-solver, SAT 2003.
- Repository: https://github.com/niklasso/minisat
- Solver crate: https://crates.io/crates/rustsat-minisat
- Fork used in solver crate: https://github.com/chrjabs/minisat
Glucose
Glucose is a SAT
solver based on Minisat and developed by Gilles Audemard and Laurent Simon.
It is available through the
rustsat-glucose crate.
References
- Gilles Audemard and Laurent Simon: Predicting Learnt Clauses Quality in Modern SAT Solvers, IJCAI 2009.
- More references at the Glucose webpage
- Solver crate: https://crates.io/crates/rustsat-glucose
- Fork used in solver crate: https://github.com/chrjabs/glucose4
IPASIR
IPASIR is a C API for incremental SAT
solvers. RustSAT’s IPASIR interface is disabled by default since linking to
multiple solvers implementing IPASIR at the same time is not possible. The
main reason for including the IPASIR interface in RustSAT is to make it
easier to include solvers that don’t have Rust interface crates. For this,
make sure to not depend on any other SAT solver crate to avoid potential
namespace conflicts. Then enable the ipasir feature and modify the
following lines in the build script build.rs accordingly.
// Link to custom IPASIR solver
// Modify this for linking to your static library
// Uncomment and modify this for linking to your static library
// The name of the library should be _without_ the prefix 'lib' and the suffix '.a'
//println!("cargo:rustc-link-lib=static=<path-to-your-static-lib>");
//println!("cargo:rustc-link-search=<name-of-your-static-lib>");
// If your IPASIR solver links to the C++ stdlib, uncomment the next four lines
//#[cfg(target_os = "macos")]
//println!("cargo:rustc-flags=-l dylib=c++");
//#[cfg(not(target_os = "macos"))]
//println!("cargo:rustc-flags=-l dylib=stdc++");
Structs
- Solver statistics
Enums
- Return type for solver terminator callbacks
- Type representing solver errors
- Return value for solving queries.
- States that the solver can be in.
Traits
- Trait for all solvers that can flip a literal in the current assignment
- Trait for freezing and melting variables in solvers with pre-/inprocessing.
- Trait for all solvers allowing access to internal search statistics
- Trait for all solvers that can be asynchronously interrupt.
- A thread safe interrupter for a solver
- Trait for all solvers that can pass out learned clauses via a callback.
- Trait for all solvers that can limit the number of conflicts
- Trait for all solvers that can limit the number of decisions
- Trait for all solvers that can limit the number of propagations
- Trait for all solvers that can force a face for a literal
- Trait for all SAT solvers in this library. Solvers outside of this library can also implement this trait to be able to use them with this library.
- Trait for all SAT solvers in this library. Solvers outside of this library can also implement this trait to be able to use them with this library.
- Trait for solvers that track certain statistics.
- Trait for all solvers that can be terminated by a termination callback.
Type Aliases
- Return type of solver calls that don’t return but might fail