diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-05-30 17:58:02 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-05-30 17:58:02 -0400 |
commit | e67c951ad9c5c637e36a6f025ba3d6e3ad945416 (patch) | |
tree | 0cfb5c339602e4bdebf4bf97f3f0ccc3923c14d1 /Test/dafny0/LitTriggers.dfy | |
parent | 000aa762e1fee4b9bd83ec3d7c8b61fd203e2c9d (diff) | |
parent | df5c5f547990c1f80ab7594a1f9287ee03a61754 (diff) |
Merge commit 'df5c5f5'
Diffstat (limited to 'Test/dafny0/LitTriggers.dfy')
-rw-r--r-- | Test/dafny0/LitTriggers.dfy | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Test/dafny0/LitTriggers.dfy b/Test/dafny0/LitTriggers.dfy new file mode 100644 index 00000000..93e65643 --- /dev/null +++ b/Test/dafny0/LitTriggers.dfy @@ -0,0 +1,39 @@ +// RUN: %dafny /compile:0 /dprint:"%t.dprint" /autoTriggers:1 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+// Imported from bug 76. LitInt would be triggered on, causing matching failures.
+
+predicate P(x:int, y:int)
+
+lemma L1(x:int, y:int)
+ requires y == 2;
+ requires forall i :: P(i, 3);
+{
+ assert P(x, y + 1);
+}
+
+lemma L2(x:int, y:int)
+ requires y == 2;
+ requires forall i {:trigger P(i, 3)} :: P(i, 3);
+{
+ assert P(x, y + 1);
+}
+
+lemma L3(x:int, y:int)
+ requires y == 2;
+ requires forall i :: P(i, 3);
+{
+ var dummy := 3;
+ assert P(x, y + 1);
+}
+
+lemma L4(x:int, y:int)
+ requires y == 2;
+ requires forall i, j :: j == 3 ==> P(i, j);
+{
+ assert P(x, y + 1);
+}
+
+// Local Variables:
+// dafny-prover-local-args: ("/autoTriggers:1")
+// End:
|