summaryrefslogtreecommitdiff
path: root/Test/dafny4/Primes.dfy
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-07-13 11:55:06 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-07-13 11:55:06 -0700
commit6dfa82655aa7cb35bae6904e05887cdf960c6319 (patch)
treefcc960db0cce120eccce3fb4be52edf9ff9325c3 /Test/dafny4/Primes.dfy
parent64495ae998749da057b3a717aba6ef53a3e8006e (diff)
Fix multiple tests that relied on z3 triggering on $Box
Found by enabling auto-generated triggers and looking for failing tests
Diffstat (limited to 'Test/dafny4/Primes.dfy')
-rw-r--r--Test/dafny4/Primes.dfy7
1 files changed, 7 insertions, 0 deletions
diff --git a/Test/dafny4/Primes.dfy b/Test/dafny4/Primes.dfy
index 31e3a19b..b0bb7527 100644
--- a/Test/dafny4/Primes.dfy
+++ b/Test/dafny4/Primes.dfy
@@ -110,6 +110,13 @@ lemma RemoveFactor(x: int, s: set<int>)
x * y * product(s - {y} - {x});
{ assert s - {y} - {x} == s - {x} - {y}; }
x * y * product(s - {x} - {y});
+ /* FIXME: This annotation wasn't needed before the introduction
+ * of auto-triggers. It's not needed if one adds {:no_trigger}
+ * to the forall y :: y in s ==> y <= x part of PickLargest, but that
+ * boils down to z3 picking $Box(...) as good trigger
+ */
+ // FIXME: the parens shouldn't be needed around (s - {x})
+ { assert y in (s - {x}); }
{ assert y == PickLargest(s - {x}); }
x * product(s - {x});
}