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
$ verus a.rsnote: verifying root modulenote: automatically chose triggers for this expression: --> a.rs:6:12 |6 | requires forall |x| f.requires((x,)) | ^^^^^^note: trigger 1 of 1: --> a.rs:6:34 |6 | requires forall |x| f.requires((x,)) | ^^^^note: Verus printed one or more automatically chosen quantifier triggers because it had low confidence in the chosen triggers. To suppress these messages, do one of the following: (1) manually annotate a single desired trigger using #[trigger] (example: forall|i: int, j: int| f(i) && #[trigger] g(i) && #[trigger] h(j)), (2) manually annotate multiple desired triggers using #![trigger ...] (example: forall|i: int| #![trigger f(i)] #![trigger g(i)] f(i) && g(i)), (3) accept the automatically chosen trigger using #![auto] (example: forall|i: int, j: int| #![auto] f(i) && g(i) && h(j)) (4) use the --triggers-silent command-line option to suppress all printing of triggers. (Note: triggers are used by the underlying SMT theorem prover to instantiate quantifiers; the theorem prover instantiates a quantifier whenever some expression matches the pattern specified by one of the quantifier's triggers.) --> a.rs:6:12 |6 | requires forall |x| f.requires((x,)) | ^^^^^^verification results:: verified: 2 errors: 0
Notice that running Verus appears to have chosen (x,) as a trigger, but this is not a valid point to annotate as a #[trigger] (and trying to manually put that as a trigger point won't work). Indeed, looking at the smt2 file (after #![auto] to silence the warning), Verus has chosen f.requires((x,) as the full trigger, rather than (x,) as it claims.
Also, this f.requires((x,)) is the only valid point that a trigger can be placed for this expression. In fact, Verus is even kinda aware of this, since it doesn't report a warning if you instead have this (notice rather than (x,), it is just x):
Consider the following:
Running Verus on this prints the warning:
Notice that running Verus appears to have chosen
(x,)
as a trigger, but this is not a valid point to annotate as a#[trigger]
(and trying to manually put that as a trigger point won't work). Indeed, looking at the smt2 file (after#![auto]
to silence the warning), Verus has chosenf.requires((x,)
as the full trigger, rather than(x,)
as it claims.Also, this
f.requires((x,))
is the only valid point that a trigger can be placed for this expression. In fact, Verus is even kinda aware of this, since it doesn't report a warning if you instead have this (notice rather than(x,)
, it is justx
):This succeeds without any warning:
If we ask if for triggers, it even prints the right thing:
Tested on:
The text was updated successfully, but these errors were encountered: