SolveResult#

class pybsp_rust.SolveResult[source]#

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

status#

sat, contradiction, non_converged, negative_complexity, numerical_failure, step_limit, flip_limit, cancelled, or timeout. Only sat certifies a solution; none is an UNSAT proof.

Type:

str

assignment#

Verified complete assignment of shape (n,) and dtype int8 on success, containing only 0/1. None for every other outcome.

Type:

numpy.ndarray or None

partial_assignment#

BSP state of shape (n,), dtype int8, using -1/0/1. WalkSAT may complete free variables without fixing them in this partial state.

Type:

numpy.ndarray

seed#

Solver seed, independent of the formula-generation seed.

Type:

int

wall_seconds#

Elapsed wall time since this solver was constructed, including setup.

Type:

float

sp_sweeps, flips

Cumulative completed SP sweeps and local-search flips.

Type:

int

decimations, releases, unit_assignments

Cumulative variable events; a variable can be fixed and released again.

Type:

int

steps#

Action records with index, action, free_variables, active_clauses, cumulative sp_sweeps, residual, complexity, and changed variable count.

Type:

list of dict

execution#

Actual backend, precision, device, worker count, counters, memory, fallback reasons, device/profile errors, and optional phase timings.

Type:

dict

Notes

Records are produced by the solver; applications normally do not construct this class directly. Arrays own their data and remain valid independently of the solver.

__init__(data)[source]#

Convert a native result record into owned Python arrays.

Parameters:

data (dict) – Decoded native result containing status, assignments, counters, action history, and execution metadata.

classmethod __new__(*args, **kwargs)#

See Results, failures, and diagnostics for every status, history field, execution diagnostic, and the distinction between a verified assignment and an incomplete partial state.