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
I expected to see this happen: VERIFICATION:- SUCCESSFUL
Instead, this happened:
SUMMARY:
** 1 of 420 failed (3 unreachable)
Failed Checks: Check assigns clause inclusion for loop simple_while_loops::{closure#2}::{closure#1}.0
File: "multiple_loops.rs", line 39, in simple_while_loops::{closure#2}::{closure#1}
The cause of the failure is that when the function simple_while_loop is wrapped in a closure by function contracts, all user variables are hidden behind a struct in MIR, which fails the loop assigns inference in CBMC. So we need to specify the accurate loop modifies for the loops.
For reference, the following standard harness can be correctly proved:
qinheping
changed the title
Failed to use loop contracts to prove contracts harness
Failed to use loop contracts to prove contracts harness for proofs with nested loops
Nov 5, 2024
I tried this code:
using the following command line invocation:
with Kani version:
I expected to see this happen: VERIFICATION:- SUCCESSFUL
Instead, this happened:
The cause of the failure is that when the function
simple_while_loop
is wrapped in a closure by function contracts, all user variables are hidden behind a struct in MIR, which fails the loop assigns inference in CBMC. So we need to specify the accurate loop modifies for the loops.For reference, the following standard harness can be correctly proved:
The text was updated successfully, but these errors were encountered: