Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jayelm/satyrs
A DPLL SAT solver written in pure Rust
https://github.com/jayelm/satyrs
rust sat-solver
Last synced: 1 day ago
JSON representation
A DPLL SAT solver written in pure Rust
- Host: GitHub
- URL: https://github.com/jayelm/satyrs
- Owner: jayelm
- License: mit
- Created: 2016-04-22T15:42:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-05-26T20:43:37.000Z (over 8 years ago)
- Last Synced: 2024-05-22T19:32:31.247Z (6 months ago)
- Topics: rust, sat-solver
- Language: Rust
- Homepage:
- Size: 531 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - satyrs - DPLL SAT solver. (Projects / Provers and Solvers)
README
# satyrs
![Satyr Logo](logo.png)
The sexiest SAT solver out there.
## Usage
- Download the ZIP or Clone this repository
- Supply a valid CNF file (DIMACS format)Run `cargo build` with optional `--release` flag and use `cargo run` or the
following command:target/{debug,release}/satyrs
Repository comes many test files of various lengths, poke around for details.
Currently, two heuristics are implemented: one-sided Jeroslow-Wang and random
selection. We don't currently have functionality to switch between these two
using the command-line; instead, just replace the call to `let lit =
jw(&_cnf)` in `dpll.rs` with `random`.## Does it work?
Yes! At least, on the problems that we've tested. If you find something that
doesn't work, do let us know.## Is it fast?
No! In fact, it's slow enough to be absolutely impractical except as an
educational introduction to DPLL and Rust (which this was). There are a couple
of times where, due to our lack of experience, were unable to figure out a fast
way of implementing certain operations that complied with Rust's borrow
checker, and thus settled for ugly and slow workarounds including unnecessary
copying.Here's a table of benchmarks on some selected CNF problems. As you can see, JW is
highly more efficient than random selection, but the runtime of our algorithm
in general blows up very quickly to the point where we lost patience with
random selection on the last problem. For those interested, `timing.py` can
generate these statistics.| CNF | Variables | Clauses | Satisfiable? | Mean JW Runtime (sd) | Mean Rand Runtime (sd) |
|--------------|-----------|---------|--------------|----------------------|------------------------|
| test.cnf | 3 | 3 | Yes | 0.01 (0.02) | 0.00 (0.00) |
| cascade.cnf | 4 | 4 | Yes | 0.00 (0.00) | 0.00 (0.00) |
| quinn.cnf | 16 | 18 | Yes | 0.00 (0.00) | 0.00 (0.00) |
| medium.cnf | 50 | 80 | Yes | 1.40 (1.17) | 3.07 (2.13) |
| hole6.cnf | 42 | 133 | No | 0.12 (0.0) | 0.94 (0.02) |
| hole7.cnf | 56 | 204 | No | 1.16 (0.25) | 6.86 (0.31) |
| uf250-01.cnf | 250 | 1065 | Yes | 10.82 (NA) | DNF |