Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmaroti/cadical-rs
Rust bindings for the CaDiCaL SAT solver
https://github.com/mmaroti/cadical-rs
Last synced: 1 day ago
JSON representation
Rust bindings for the CaDiCaL SAT solver
- Host: GitHub
- URL: https://github.com/mmaroti/cadical-rs
- Owner: mmaroti
- License: mit
- Created: 2020-06-06T00:18:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T09:32:52.000Z (8 months ago)
- Last Synced: 2024-05-22T20:34:42.147Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 7
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - cadical-rs - bindings for the CaDiCaL SAT solver. (Projects / Libraries)
README
CaDiCaL SAT solver
==================
[![Build Status](https://app.travis-ci.com/mmaroti/cadical-rs.svg?branch=master)](https://app.travis-ci.com/github/mmaroti/cadical-rs)
[![Crate](https://img.shields.io/crates/v/cadical)](https://crates.io/crates/cadical)
[![Documentation](https://docs.rs/cadical/badge.svg)](https://docs.rs/cadical)
[![GitHub](https://img.shields.io/github/license/mmaroti/cadical-rs)](LICENSE)This is a stand alone crate that contains both the C++ source code of the
CaDiCaL incremental SAT solver together with its Rust binding. The C++
files are compiled and statically linked during the build process. This
crate works on Linux, Apple OSX, Windows, Android, iOS, Raspberry Pi,
NetBSD and FreeBSD.CaDiCaL won first place in the SAT track of the SAT Race 2019 and second
overall place. It was written by Armin Biere, and it is available under the
MIT license.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: cadical::Solver = Default::default();
sat.add_clause([1, 2]);
sat.add_clause([-1, 2]);
assert_eq!(sat.solve(), Some(true));
assert_eq!(sat.value(2), Some(true));
```The C++ library is build with assertions disabled and with optimization level
3 by default. C++ assertions are enabled only when cargo is building a debug
version and the `cpp-debug` feature of the library is enabled.