Splr is a pure Rustic modern SAT solver, based on Glucose 4.1. It adopts various research results on SAT solvers:
Many thanks to SAT researchers.
Please check ChangeLog about recent updates.
Though Splr comes with ABSOLUTELY NO WARRANTY, I'd like to show some results.
Just run cargo install splr
after installing the latest cargo.
Two executables will be installed:
splr
-- the solverdmcr
-- a model checker to verify an assignment set which was generated by splr
.Splr is a standalone program, taking a CNF file. The result will be saved to a file.
```plain $ splr tests/sample.cnf sample.cnf 250,1065 |time: 1.27 #conflict: 38892, #decision: 47095, #propagate: 85990 Assignment|#rem: 243, #fix: 1, #elm: 6, prg%: 2.8000 Clause|Remv: 19886, LBD2: 114, Binc: 0, Perm: 1056 Stabilize|#BLK: 257, #RST: 512, tASG: 1.3309, tLBD: 0.9605 Conflict|eLBD: 9.27, cnfl: 12.84, bjmp: 11.83, rpc%: 1.3165 misc|#rdc: 7, #smp: 1, 2smp: 36681, vdcy: 0.9800 Strategy|mode: Initial search phase before a main strategy Result|file: ./.ans_sample.cnf s SATISFIABLE: tests/sample.cnf
$ cat .ans_sample.cnf c An assignment set generated by splr-0.4.0 for tests/sample.cnf c c CNF file(sample.cnf), #var: 250, #cls: 1065 c #conflict: 38892, #decision: 47095, #propagate: 85990 c Assignment|#rem: 243, #fix: 1, #elm: 6, prg%: 2.8000 c Clause|Remv: 19886, LBD2: 114, Binc: 0, Perm: 1056 c Restart|#BLK: 257, #RST: 512, eASG: 1.3309, eLBD: 0.9605 c Conflict|eLBD: 9.27, cnfl: 12.84, bjmp: 11.83, rpc%: 1.3190 c misc|#rdc: 7, #smp: 1, 2smp: 36681, vdcy: 0.9800 c Strategy|mode: Initial, time: 1.27 c s SATISFIABLE v 1 2 3 4 -5 6 7 -8 -9 10 11 -12 -13 -14 15 16 -17 18 ... 0
$ dmcr tests/sample.cnf A valid assignment set for tests/sample.cnf is found in .ans_sample.cnf. ```
Since 0.4.0, you can use Splr in your programs.
```rust use splr::*; use std::convert::TryFrom;
fn main() {
let v: Vec
| mnemonic | meaning |
| --------- |------- |
| v
| the number of variables used in the given CNF file |
| c
| the number of clauses used in the given CNF file |
| time
| elapsed CPU time in seconds (or wall-clock time if CPU time is not available) |
| #conflict
| the number of conflicts |
| #decision
| the number of decisions |
| #propagate
| the number of propagates (its unit is literal) |
| #rem
| the number of remaining variables |
| #fix
| the number of solved variables (which has been assigned a value at decision level zero) |
| #elm
| the number of eliminated variables |
| prg%
| the percentage of remaining variables / total variables
|
| Remv
| the number of learnt clauses which are not biclauses |
| LBD2
| the number of learnt clauses which LBDs are 2 |
| Binc
| the number of binary learnt clauses |
| Perm
| the number of given clauses and binary learnt clauses |
| #BLK
| the number of blocking restart |
| #RST
| the number of restart |
| tASG
| the trend rate of the number of assigned variables |
| tLBD
| the trend rate of learn clause's LBD |
| eLBD
| the EMA, Exponential Moving Average, of learn clauses' LBDs |
| cnfl
| the EMA of decision levels to which backjumps go |
| bjmp
| the EMA of decision levels at which conflicts occur |
| rpc%
| a percentage of restart per conflict |
| #rdc
| the number of clause reduction
invocations |
| #smp
| the number of clause and var simplification
invocations |
| 2smp
| the number of literals to invoke the simplifier again |
| vdcy
| var activity decay rate |
| mode
| Selected strategy's id |
| time
| the elapsed CPU time in seconds |
Please check help message.
```plain $ splr --help splr 0.4.0 Narazaki Shuji shujinarazaki@protonmail.com A modern CDCL SAT solver in Rust
USAGE:
splr [FLAGS] [OPTIONS]
FLAGS: -h, --help Prints help information -C, --no-color Disable coloring -q, --quiet Disable any progress message -c, --certify Writes a DRAT UNSAT certification file -l, --log Uses Glucose-like progress report -V, --version Prints version information
OPTIONS:
--ADP
ARGS:
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
2020, Narazaki Shuji