https://github.com/pindakaashq/pindakaas
A Rust library to transform integer and pseudo Boolean constraints into conjunctive normal form
https://github.com/pindakaashq/pindakaas
cnf pseudo-boolean sat sat-encodings
Last synced: 4 months ago
JSON representation
A Rust library to transform integer and pseudo Boolean constraints into conjunctive normal form
- Host: GitHub
- URL: https://github.com/pindakaashq/pindakaas
- Owner: pindakaashq
- License: mpl-2.0
- Created: 2021-03-28T06:39:06.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2025-08-01T10:20:08.000Z (4 months ago)
- Last Synced: 2025-08-01T10:52:36.427Z (4 months ago)
- Topics: cnf, pseudo-boolean, sat, sat-encodings
- Language: Rust
- Homepage:
- Size: 809 MB
- Stars: 4
- Watchers: 4
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - pindakaas - cadical)[:package:](https://crates.io/crates/pindakaas-derive)[:package:](https://crates.io/crates/pindakaas-intel-sat)[:package:](https://crates.io/crates/pindakaas-kissat)[:package:](https://crates.io/crates/pyndakaas) - transform integer and pseudo Boolean constraints into conjunctive normal form. (Projects / Libraries)
README

A library to transform pseudo-Boolean and integer constraints into conjunctive normal form.
## Supported Constraints
- At most one (AMO)
- Bitwise encoding
- Ladder encoding
- Pairwise encoding
- Cardinality constraints
- Sorting Network encoding
- Boolean linear
- Adder encoding
- BDD encoding
- Sequential Weight Counter encoding
- Totalizer encoding
- Integer (linear)
- Direct / Domain / Unary encoding
- Order encoding
- Binary encoding
## Installation and usage
Although the main pindakaas library is written in rust, it is also available from Python. (A C(++) interface is also under consideration).
### Rust
```bash
cargo add pindakaas
```
### Python
```bash
pip install pindakaas
```
## Acknowledgements
The encoding algorithms implemented in this library are based partially on the following academic research.
- **TODO**
This library is also heavily inspired by PBLib, an earlier library containing different encoding algorithms for pseudo-Boolean constraints. More information about PBLib can be found in its [accompanying publication](https://doi.org/10.1007/978-3-319-24318-4_2), and the source code for the library can be found on [GitHub](https://github.com/RealPete/PBLib)
This research was partially funded by the Australian Government through the Australian Research Council Industrial Transformation Training Centre in Optimisation Technologies, Integrated Methodologies, and Applications ([OPTIMA](https://optima.org.au)), Project ID IC200100009
## License
This library is made available under the [MPL-2.0](https://choosealicense.com/licenses/mpl-2.0/) license.