You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T-CBMCIssue related to an existing CBMC issueZ-QuantifiersIssues related to quantifiers[C] BugThis is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.
#[kani::proof]fnmain(){let a:[usize;60] = kani::any();
kani::assume(kani::forall!(|i in (0,60)| a[i] <= 20));letmut b:[usize;60] = a.clone();letmut i = 0;#[kani::loop_invariant( i<= 60 && kani::forall!(|j in (0, i)| b[j] == a[j]+ 1))]while i < 60{
b[i] = a[i] + 1;
i += 1;}}
using the following command line invocation:
kani main.rs -Z loop-contracts -Z quantifiers
with Kani version: 0.64.0
I expected to see this happen: VERIFICATION:- SUCCESSFUL
Instead, this happened:
warning: ignoring forall
* type: bool
0: tuple
... (very long)
Failed Checks: Check invariant after step for loop main2.0
When I try to add #[kani::solver(cvc5)]
The output is:
Running SMT2 ALL (with FPA) using CVC5
SMT2 solver returned "unknown"
Runtime Solver: 0.216097s
Runtime decision procedure: 0.222155s
thread '<unnamed>' panicked at kani-driver/src/cbmc_output_parser.rs:470:25:
called `Result::unwrap()` on an `Err` value: Error("unknown variant `ERROR`, expected one of `FAILURE`, `COVERED`, `SATISFIED`, `SUCCESS`, `UNDETERMINED`, `UNKNOWN`, `UNREACHABLE`, `UNCOVERED`, `UNSATISFIABLE`", line: 12, column: 25)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
We'll need a Z3 release that includes the fix for Z3Prover/z3#7743 or the workaround in CBMC in diffblue/cbmc#8703 to be merged. Bitwuzla usually works fine in such situations, but it might take a lot longer to complete.
T-CBMCIssue related to an existing CBMC issueZ-QuantifiersIssues related to quantifiers[C] BugThis is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.
Activity
tautschnig commentedon Aug 8, 2025
What about Z3 instead of cvc5?
thanhnguyen-aws commentedon Aug 8, 2025
Here is Z3's result:
tautschnig commentedon Aug 12, 2025
We'll need a Z3 release that includes the fix for Z3Prover/z3#7743 or the workaround in CBMC in diffblue/cbmc#8703 to be merged. Bitwuzla usually works fine in such situations, but it might take a lot longer to complete.