Skip to main content

This library aims to provide implementations of elements commonly used in the development on software in the area of satisfiability solving. The focus of the library is to provide as much ease of use without giving up on performance.

Project description

rustsat - A Comprehensive SAT Library for Rust

rustsat is a collection of interfaces and utilities for working with the boolean satisfiability problem in Rust. This library aims to provide implementations of elements commonly used in the development on software in the area of satisfiability solving. The focus of the library is to provide as much ease of use without giving up on performance.

Crates

The RustSAT project is split up into multiple crates that are all contained in this repository. These are the crates the project consists of:

Crate Description
rustsat The main library, containing basic types, traits, encodings, parsers, and more.
rustsat-tools A collection of small helpful tools based on RustSAT that can be installed as binaries. For a list of available tools, see this directory with short descriptions of the tools in the headers of the files.
rustsat-<satsolver> Interfaces to SAT solvers that can be used alongside rustsat. Currently interfaces are available for cadical, kissat, glucose, and minisat.

Installation

To use the RustSAT library as a dependency in your project, simply run cargo add rustsat. To use an SAT solver interface in your project, run cargo add rustsat-<satsolver>. Typically, the version of the SAT solver can be selected via crate features, refer to the documentation of the respective SAT solver crate for details.

To install the binary tools in rustsat-tools run cargo install rustsat-tools.

Features

Feature name Description
internals Make some internal data structures for e.g. encodings public. This is useful when basing a more complex encoding on the rustsat implementation of another encoding. Note that the internal API might change between releases.
fxhash Use the faster firefox hash function from rustc-hash in rustsat.
ipasir Include and link the IPASIR solver interface.
optimization Include optimization (MaxSAT) data structures etc.
multiopt Include data structures etc. for multi-objective optimization.
compression Enable parsing and writing compressed input.
bench Enable benchmark tests. Behind feature flag since it requires unstable Rust.
rand Enable randomization features. (Shuffling clauses etc.)

Examples

For example useage refer to the small example tools in the rustsat-tools crate at tools/src/bin. For a bigger example you can look at this multi-objective optimization solver.

For an example of how to use the C-API, see rustsat/examples/capi*.cpp.

Versions

Note that at the current state of development, releases of RustSAT are not following semantic versioning, meaning the API can change between minor releases. For a more detailed changelog including all patch versions, see GitHub Releases.

Version 0.3.x

  • Alternative totalizer implementation based on a totalizer database
  • Dynamic polynomial watchdog encoing
  • Changes to public API: changed some vectores to slices
  • Changed internal variable/literal representation from usize to u32

Version 0.2.x

Solver interfaces factored out into seperate crates. See detailed changes in GitHub Releases.

Version 0.1.2

Updated initial version with working dependencies

Version 0.1.0 and 0.1.1

Yanked because of dependencies that don't exist anymore

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustsat-0.4.0.tar.gz (114.6 kB view hashes)

Uploaded Source

Built Distributions

rustsat-0.4.0-cp37-abi3-win_amd64.whl (236.6 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

rustsat-0.4.0-cp37-abi3-win32.whl (220.5 kB view hashes)

Uploaded CPython 3.7+ Windows x86

rustsat-0.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

rustsat-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.5 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

rustsat-0.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

rustsat-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

rustsat-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

rustsat-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

rustsat-0.4.0-cp37-abi3-macosx_11_0_arm64.whl (374.5 kB view hashes)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

rustsat-0.4.0-cp37-abi3-macosx_10_7_x86_64.whl (393.1 kB view hashes)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page