screwsat
A very simple CDCL(Conflict-Driven-Clause-Learning) SAT Solver in Rust. The total line of solver is around 400 lines.
I wrote it very simple to help people(including me) understating the inside of SAT Solver.
I have implemented the core SAT Solver algorithms and techinques in screwsat.
Algorithms and Techniques
- CDCL(Conflict-Driven-Clause-Learning)
- Back Jump
- Two-Literal-Watching
The performance of screwsat isn't as good as other modern sat solvers.
But you can grasp some important points of SAT Solver from screwsat(I hope).
screwsat is written in only one file and std libraries. You can use it for competitive programming problems.
Accepted by screwsat
You need to pull all SAT problems under the cnf directory that are stored by git-lfs to run cargo test.
% git lfs pull
How to use
screwsat can be used as a library and a command line tool.
Command
Install
Usage(cmd)
Library
You need to add screwsat to Cargo.toml.
="*"
OR
Copy src/lib.rs and Paste it.(Competitive Programming Style)
Usage(lib)
use vec;
use Solver;
use util;
Appreciation
This code is really inspired by his simple good code not522's SAT Solver
Contribution
Contributions and feedbacks are welcome.(e.g. fix typo and tedious code and my English, report bugs/issues, GIVE ME GITHUB STARS)