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 have a loop for m in r but in the resulting Why3 task there is nothing connecting the loop variable m to the iterable r. I may be missing something because examples in the test suite don't have this problem.
Example:
#[requires(forall <i: Int> 0 <= i && i < [email protected]() ==> r[i]@ < 42)]pubfnf4(r:Vec<usize>){for m in r {proof_assert!{ m@ < 42};}}
In the Why3 task below, field_03 mentioned in the goal is only ever related to other abstract constants that we know nothing about. There is no axiom that relates one of those to the input vector r2.
Unfortunately, this is a tricky limitation, you need to add an invariant, any invariant for the information to be present. For loops are desugared during parsing, so we can't reliably identify them afterwards and instrument them in MIR, so instead we use macros to change their desugaring.
I'm tempted to classify this as wontfix. Maybe we can also have a list of this kind of corner cases in the documentation, so I'll leave this open to remember to write that doc.
I have a loop
for m in r
but in the resulting Why3 task there is nothing connecting the loop variablem
to the iterabler
. I may be missing something because examples in the test suite don't have this problem.Example:
In the Why3 task below,
field_03
mentioned in the goal is only ever related to other abstract constants that we know nothing about. There is no axiom that relates one of those to the input vectorr2
.The text was updated successfully, but these errors were encountered: