Open
Description
Dafny version
4.1.0
Code to produce this issue
method Main() {
var s := seq(100_000, x => x);
var m := map k <- s :: k := k;
var m2 := map k <- m.Keys :: k + 10 := k;
}
Command to run and resulting output
% dafny run -t:java src/Scratch.dfy
What happened?
Command takes about 2 minutes to complete. Replacing m.Keys
with m
makes it take 10 seconds.
Root cause appears to be translating m.Keys
to DafnyMap.keySet()
, which makes a defensive copy of the underlying map's key set.
What type of operating system are you experiencing the problem on?
Mac