#sat-solver #rustsat #debug-mode #debugging

rustsat-cadical

Interface to the SAT solver CaDiCaL for the RustSAT library

11 unstable releases (3 breaking)

0.4.1 Oct 16, 2024
0.3.1 Jun 12, 2024
0.2.4 Feb 23, 2024
0.2.1 Dec 18, 2023
0.2.0 Oct 30, 2023

#1304 in Algorithms

Download history 16/week @ 2024-09-21 13/week @ 2024-09-28 283/week @ 2024-10-12 67/week @ 2024-10-19 9/week @ 2024-10-26 10/week @ 2024-11-02 2/week @ 2024-11-09 5/week @ 2024-11-16 1/week @ 2024-11-23 126/week @ 2024-11-30

135 downloads per month
Used in 2 crates

MIT license

6.5MB
17K SLoC

Check & Test crates.io docs.rs License

rustsat-cadical - Interface to the CaDiCaL SAT Solver for RustSAT

Armin Biere's SAT solver CaDiCaL to be used with the RustSAT library.

Note: at the moment this crate is known to not work on Windows since CaDiCaL is non-trivial to get to work on Windows.

Features

  • debug: if this feature is enables, the C++ library will be built with debug and check functionality if the Rust project is built in debug mode
  • safe: disable writing through 'popen' for more safe usage of the library in applications
  • quiet: exclude message and profiling code (logging too)
  • logging: include logging code (but disabled by default)

CaDiCaL Versions

CaDiCaL versions can be selected via cargo crate features. All CaDiCaL versions up to Version 2.1.0 are available. For the full list of versions and the changelog see the CaDiCaL releases.

Without any features selected, the newest version will be used. If conflicting CaDiCaL versions are requested, the newest requested version will be selected.

Customization

In order to build a custom version of CaDiCaL, this crate supports two environment variables to customize the C++ source code that CaDiCaL is built from.

  • CADICAL_PATCHES allows to specify a list of colon-separated paths to patch files that will be applied to the CaDiCaL source repository before building it. These patches are applied in order of appearance after the patches of this crate have been applied.
  • CADICAL_SRC_DIR allows for overriding where the C++ library is built from. By default this crate fetches the appropriate code from the GitHub repo. If this variable is set, the directory specified there is used instead. Note that when using this variable, the crate will not apply any patches, the user is responsible for applying the appropriate and necessary patches from the patches/ directory.

Dependencies

~3–15MB
~224K SLoC