CNF Representation
xlog-solve::GpuCnf stores DIMACS-style CNF in CSR form:
var_cap,clause_cap, andlit_capare host-known allocation capacities;num_vars,num_clauses, andnum_litsare device-resident scalar buffers;clause_offsetsandliteralsare device-resident CSR buffers;- provider-memory checks reject CNF buffers owned by a different CUDA provider.
GpuCnf::from_host exists for tests and tooling. Production GPU-native paths can
construct CNF directly on device and pass the same solver-facing structure
forward.
CDCL Workspace
GpuCdclSolver owns a CUDA provider and GpuCdclConfig. The config controls:
- learned-clause arena capacity;
- learned-literal capacity;
- proof-trace capacity;
- deterministic restart and reduction intervals;
- optional conflict budget.
GpuCdclWorkspace pre-allocates the device buffers needed for repeated solves:
assignments, levels, reasons, variable activity, trail, watch lists, learned
clauses, proof data, and scalar status outputs. The workspace does not own the
input CNF buffers.
Status And Validation
The solver has raw and expected-status paths:- raw solve APIs return device-resident assignment/status/error buffers for debugging and research;
solve_expect_satexpects SAT, validates the result, and returns a device-resident assignment;solve_expect_unsatexpects UNSAT and returnsOk(())only when the expected result is observed.
Fail-Closed Budgets
On main, unreleased beyond 0.9.2, the CDCL config includesmax_conflicts. A
nonzero value bounds hard verification instances. If the kernel reaches the
budget before SAT or UNSAT is established, it reports a budget-exhausted status.
The Rust API surfaces that as a typed VerifyBudgetExceeded error.
A budget-exhausted result is indeterminate. It is never a proof.
Consumers
Solver services are used by higher-level engines:| Consumer | Use |
|---|---|
xlog-prob | Verification around probabilistic circuit and knowledge-compilation paths. |
xlog-gpu | Epistemic GPU planning and split-execution certification surfaces. |
xlog-cli | Diagnostic plan dumps and release validation flows. |
Documentation Boundaries
Do not describe every solver-backed path as zero host reads. The stricter no-host-transfer contract belongs only to the integrations that track and expose it. The general solver contract is:- CNF and solver workspaces are device-resident;
- status handling is explicit and typed;
- capacity or budget failures decline fail-closed;
- SAT/UNSAT claims must come from an expected-status path or a caller-specific verifier contract.