BSP.rs: survey propagation from Python#

BSP.rs searches for satisfying assignments of Boolean formulas with a native Rust implementation of Backtracking Survey Propagation, followed by WalkSAT completion. The Python package, pybsp_rust, exposes the complete search and the intermediate messages, surveys, partial assignments, and decisions.

Start with an ordinary CPU installation. The same API can select multicore CPU, Apple Metal, or NVIDIA CUDA execution. Every returned SAT assignment is checked against the input formula on the CPU. An unsuccessful search is not an UNSAT proof.

Run and inspect a solver

Install the bindings, solve CNF formulas, and inspect reproducible experiments.

First solve
Understand the physics

Follow factor graphs through belief propagation, surveys, and backtracking.

The problem: satisfiability on a sparse factor graph
Choose parameters and hardware

Find exact defaults, stopping rules, numerical contracts, and batch settings.

Parameters and stopping rules
Python API reference

Constructors, methods, snapshots, exceptions, and result records.

Python API reference

The theory chapters distinguish the cavity approximation from implementation choices. The API pages document this repository’s behavior, including numerical recovery and explicit failure states. The cited research papers motivate the algorithm; their reported thresholds and running times are not guarantees for this implementation or for arbitrary SAT instances.