Skip to main content

find_counterexample_incremental

Function find_counterexample_incremental 

Source
pub fn find_counterexample_incremental(
    init: &ProofExpr,
    trans: &dyn Fn(u32) -> ProofExpr,
    property: &dyn Fn(u32) -> ProofExpr,
    max_k: u32,
) -> BmcOutcome
Expand description

Bounded model checking, incrementally: the unrolling is clausified ONCE into a single persistent solver, and each depth’s violation ¬property(k) is checked by crate::cdcl::Solver::solve_under_assumptions. Every clause learned while ruling out a shallow depth is reused at the next — the IPASIR amortisation that makes deep BMC fast.

All transitions are asserted up front, so this is sound for total transition relations — every hardware next-state function is total (a prefix always extends to a full path), so the result matches the one-clause-per-call find_counterexample. For a partial / over-constrained transition relation, prefer find_counterexample.