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
newtype Int = natdatatype IntWrapper = Wrap(s: set<Int>)
methodm(x: IntWrapper) {
var iter := x.s;
while iter != {}
decreases |iter|
{
var i: Int :| i in iter;
iter := iter - {i};
}
}
Command to run and resulting output
VSCode verifier shows the following error message:
cannot establish the existence of LHS values that satisfy the such-that predicate
What happened?
The current code fails at the line var i: Int :| i in iter; -- Dafny cannot find an arbitrary witness from the set iter of type set<nat>. However, if I change the newtype definition from newtype Int = nat to newtype Int = int, verification succeeds.
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered:
efl9013
added
the
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
label
Jun 15, 2023
Dafny version
4.1.0.0
Code to produce this issue
Command to run and resulting output
What happened?
The current code fails at the line
var i: Int :| i in iter;
-- Dafny cannot find an arbitrary witness from the setiter
of typeset<nat>
. However, if I change the newtype definition fromnewtype Int = nat
tonewtype Int = int
, verification succeeds.What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: