Expand description
Propositional SAT-discharge of a ProofExpr obligation — the engine behind in-browser,
Z3-free hardware proving.
A bounded hardware property (an SVA assertion unrolled to discrete timesteps, or a
Kripke-lowered FOL spec) reduces to a quantifier-free propositional formula over
signal@t atoms. This module discharges two questions over that fragment, reusing the
existing trust tiers (crate::cnf Tseitin → crate::cdcl CDCL → crate::rup RUP
certification) so the answers are certified, not merely asserted:
find_model— is the obligation satisfiable, and if so, a distinguishing assignment. This is∃trace. φ, the core of bounded model checking and counterexample extraction.prove_equivalence— do two formulas denote the same Boolean function?F ≡ SiffF ↔ Sis a tautology, certified via RUP; otherwise a concrete counterexample trace.
Everything here is pure Rust with no Z3 dependency, so it runs unchanged in the browser (wasm32) and in native tests where its verdicts are checked against Z3 as the oracle.
Enums§
- Equiv
Outcome - The result of an equivalence query between two formulas.
- Model
Outcome - The result of a satisfiability query over a propositional obligation.
- Unsat
Outcome - The result of an unsatisfiability query — the shared primitive behind equivalence, bounded model checking, k-induction, and vacuity.
Functions§
- decode_
model - Decode a SAT
modelback to(atom, value)bindings for every source atom appearing inexprs(Tseitin auxiliaries carry no source meaning and are skipped), sorted by name. - decode_
model_ from - Decode a SAT
modelfrom a pre-extracted atom→variable map (the tableCnfalready holds), so a solve need not clone the whole clause database just to read its model back. Equivalent todecode_modelfor the propositional atomscollect_atomsgathers. - find_
model - Is
esatisfiable? Returns a witnessing model over its atoms if so. - prove_
equivalence - Are
aandbequivalent?F ≡ SiffF ↔ Sis valid, i.e.¬(F ↔ S)is UNSAT. - prove_
unsat - core for equivalence, bounded model checking, k-induction, and vacuity.
- prove_
unsat_ certified - Refute
ewith the certified recursive symmetry breaker and return the proof. Each round re-detects the residual automorphism group, certifies ONE lex-leader lead clause as a PR step (its generator a fresh automorphism of the current database), and re-detects — looping to a fixpoint that breaks the COMPLETE group, not just the adjacent positive-row swapscrate::symmetry::break_symmetriessees. The returned stream is the certified PR breaks followed by the closing RUP learned clauses, and it is alreadycheck_pr_refutation-verified againste’s CNF.Noneifeis not CNF-assertable, is satisfiable, or the breaker did not certify a refutation — the wired, checkable companion ofprove_unsat’s coarse verdict.