Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/UncombedCoconut/cat_solver
Rust bindings for the Kissat SAT Solver
https://github.com/UncombedCoconut/cat_solver
Last synced: 1 day ago
JSON representation
Rust bindings for the Kissat SAT Solver
- Host: GitHub
- URL: https://github.com/UncombedCoconut/cat_solver
- Owner: UncombedCoconut
- License: mit
- Fork: true (mmaroti/cadical-rs)
- Created: 2022-11-16T12:38:45.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-13T01:57:14.000Z (about 1 year ago)
- Last Synced: 2024-08-04T10:53:34.295Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - cat_solver - bindings for the Kissat SAT solver. (Projects / Libraries)
README
Kissat SAT solver
==================
[![Crate](https://img.shields.io/crates/v/cat_solver)](https://crates.io/crates/cat_solver)
[![Documentation](https://docs.rs/cat_solver/badge.svg)](https://docs.rs/cat_solver)
[![GitHub](https://img.shields.io/github/license/UncombedCoconut/cat_solver)](LICENSE)This is a stand alone crate that contains both the C source code of the
Kissat SAT solver together with its Rust binding. The C files are compiled
and statically linked during the build process.Kissat variants dominated the main track of the Sat Competition 2022.
Author Armin Biere describes Kissat as follows:Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
It is a port of CaDiCaL back to C with improved data structures,
better scheduling of inprocessing and optimized algorithms and implementation.
Coincidentally "kissat" also means "cats" in Finnish.This crate is based on the "cadical" crate, and is as API-compatible as possible.
This enables a switch back to `cadical::Solver` (which has extra features like file I/O)
as a debugging strategy.
Beware: this also means the API will let you try to modify the problem after solving,
but Kissat will abort if you do. Incremental solving is not yet implemented.The literals are unwrapped positive and negative integers, exactly as in the
DIMACS format. The common IPASIR operations are presented in a safe Rust
interface.```
let mut sat: cat_solver::Solver::new();
sat.add_clause([1, 2]);
sat.add_clause([-1, 2]);
assert_eq!(sat.solve(), Some(true));
assert_eq!(sat.value(2), Some(true));
```