🤖 AI Summary
To address the high barrier to entry, fragmented solver interfaces, and complex constraint encoding in SAT solving within the Rust ecosystem, this paper introduces the first industrial-grade unified SAT infrastructure. Methodologically, we design a zero-cost abstraction layer providing a uniform API for multiple SAT solvers—including MiniSat and CaDiCaL—and implement efficient CNF encodings for at-most-one, cardinality, and pseudo-Boolean constraints. The infrastructure supports standard CNF I/O and an end-to-end modeling–solving–parsing pipeline. Our contributions are threefold: (1) the first native Rust multi-solver abstraction layer; (2) a high-performance built-in constraint encoding library; and (3) C and Python bindings to facilitate cross-language integration. Experiments demonstrate that our toolchain maintains competitive solving performance while substantially reducing modeling complexity; it has already been adopted as a core dependency in multiple Rust-based formal verification projects.
📝 Abstract
State-of-the-art Boolean satisfiability (SAT) solvers constitute a practical and competitive approach for solving various real-world problems. To encourage their widespread adoption, the relatively high barrier of entry following from the low level syntax of SAT and the expert knowledge required to achieve tight integration with SAT solvers should be further reduced. We present RustSAT, a library with the aim of making SAT solving technology readily available in the Rust programming language. RustSAT provides functionality for helping with generating (Max)SAT instances, writing them to, or reading them from files. Furthermore, RustSAT includes interfaces to various state-of-the-art SAT solvers available with a unified Rust API. Lastly, RustSAT implements several encodings for higher level constraints (at-most-one, cardinality, and pseudo-Boolean), which are also available via a C and Python API.