diff options
author | leino <unknown> | 2015-06-25 18:12:53 -0700 |
---|---|---|
committer | leino <unknown> | 2015-06-25 18:12:53 -0700 |
commit | 91fa6b7d576a111f39cde20de5d8e612b4d712b5 (patch) | |
tree | 9c05000f7bbaaf37a5cac79c245d995d83d9169a /Test/VSI-Benchmarks | |
parent | 3d6b2b77830f7f2bc4f3e61d4d3c8a163123dd31 (diff) |
Tried to reduce frame-axiom instantiations by saying the earlier heap must be a "heap anchor".
Currently, a heap is an anchor if it produced by a havoc (but not a direct update).
Diffstat (limited to 'Test/VSI-Benchmarks')
-rw-r--r-- | Test/VSI-Benchmarks/b3.dfy | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Test/VSI-Benchmarks/b3.dfy b/Test/VSI-Benchmarks/b3.dfy index f59b0c3e..d47c4d4d 100644 --- a/Test/VSI-Benchmarks/b3.dfy +++ b/Test/VSI-Benchmarks/b3.dfy @@ -96,7 +96,7 @@ class Benchmark3 { if x < m { k := j; m := x; }
j := j+1;
}
-
+
j := 0;
while j < k
invariant j <= k;
@@ -108,10 +108,16 @@ class Benchmark3 { RotationLemma(old(q.contents), j, qc0, q.contents);
j := j+1;
}
-
+
assert j == k;
assert q.contents == old(q.contents)[k..] + old(q.contents)[..k];
+ ghost var qq := q.contents;
m := q.Dequeue();
+ assert q.contents == qq[1..] && m == qq[0];
+ assert [m] + q.contents == qq;
+ assert |old(q.contents)| == |q.contents| + 1;
+
+ assert q.contents == old(q.contents)[k+1..] + old(q.contents)[..k];
}
lemma RotationLemma(O: seq, j: nat, A: seq, C: seq)
|