diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-17 14:08:12 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-17 14:08:12 -0700 |
commit | fde628b5153b86f187f353c6f79113932c309abe (patch) | |
tree | 03e32756886eb88ca2596a6812a408de267d785d /Test/dafny0 | |
parent | c450e2718c6c047af95e948f87cad53ade07a1c5 (diff) |
Add /autoTriggers to TriggerInPredicate's RUN specification
Diffstat (limited to 'Test/dafny0')
-rw-r--r-- | Test/dafny0/TriggerInPredicate.dfy | 19 | ||||
-rw-r--r-- | Test/dafny0/TriggerInPredicate.dfy.expect | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Test/dafny0/TriggerInPredicate.dfy b/Test/dafny0/TriggerInPredicate.dfy new file mode 100644 index 00000000..3f2eac2c --- /dev/null +++ b/Test/dafny0/TriggerInPredicate.dfy @@ -0,0 +1,19 @@ +// RUN: %dafny /compile:0 /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+predicate A(x: bool, y: bool) { x }
+
+predicate B(x: bool, z: bool) { forall y {:trigger A(x, y) } :: A(x, y) && z }
+
+// Inlining is disabled here to prevent pollution of the trigger in B
+method C() requires B(true || false, true) {}
+
+// Inlining should work fine here
+method C'() requires B(true, true) {}
+
+// Inlining should work fine here
+method C''() requires B(true, true && false) {}
+
+// Local Variables:
+// dafny-prover-local-args: ("/autoTriggers:1")
+// End:
diff --git a/Test/dafny0/TriggerInPredicate.dfy.expect b/Test/dafny0/TriggerInPredicate.dfy.expect new file mode 100644 index 00000000..47b3bdf9 --- /dev/null +++ b/Test/dafny0/TriggerInPredicate.dfy.expect @@ -0,0 +1,4 @@ +TriggerInPredicate.dfy(9,20): Info: This call cannot be safely inlined.
+TriggerInPredicate.dfy(9,20): Info: This call cannot be safely inlined.
+
+Dafny program verifier finished with 8 verified, 0 errors
|