Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arata-nvm/lutrix
🧠SAT/SMT Solver Written in Rust
https://github.com/arata-nvm/lutrix
sat-solver smt-solver
Last synced: 5 days ago
JSON representation
🧠SAT/SMT Solver Written in Rust
- Host: GitHub
- URL: https://github.com/arata-nvm/lutrix
- Owner: arata-nvm
- License: mit
- Created: 2021-10-21T12:44:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T04:58:23.000Z (about 3 years ago)
- Last Synced: 2024-05-22T19:31:59.552Z (8 months ago)
- Topics: sat-solver, smt-solver
- Language: Rust
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - lutrix - SAT/SMT Solver. (Projects / Provers and Solvers)
README
# lutrix
SAT/SMT solver written in Rust
## Example
solve `x^2 - 6*x + 9 = 0`
```rust
use lutrix::smt;
use lutrix::{int, op};fn main() {
let mut s = smt::Solver::new();
let x = s.new_variable("x", 8);let expr = op!(+ op!(- op!(* x, x), op!(* x, int!(6, 8))), int!(9, 8));
s.assert(op!(= expr, int!(0, 8)));
s.assert(op!(< x, int!(0xf, 8)));
assert!(s.check());let model = s.model();
assert_eq!(model["x"], 3);
}
```