Python API reference#

The public wrapper is intentionally small. Formula and cancellation objects are native PyO3 classes. Solver entry points expose explicit keyword settings; configuration dataclasses are optional compatibility records, created lazily when requested. Snapshots and structured results wrap the same Rust solver.

Formula

Immutable normalized CNF formula with one-based signed literals.

Options

Optional immutable compatibility record for algorithm parameters.

ExecutionOptions

Optional compatibility record for hardware and profiling settings.

Solver

Independent mutable BSP state with inspectable message passing.

SolveResult

Owned result record returned by solve() or Solver.solve().

CancellationToken

Thread-safe, one-way cancellation handle obtained from a Solver.

solve

Construct a fresh solver and return one terminal result.

solve_many

Solve independent jobs with bounded workers and stable input order.

from_file

Read a DIMACS CNF file into a normalized Formula.