summaryrefslogtreecommitdiff
path: root/Test/dafny0/DirtyLoops.dfy
diff options
context:
space:
mode:
authorGravatar chmaria <unknown>2014-06-03 16:55:05 -0700
committerGravatar chmaria <unknown>2014-06-03 16:55:05 -0700
commit6d32fe37e3d343f9e310eeea193efc8da5982600 (patch)
tree3a6bcda5eb3ef99b9e2e8fd030f3352ab2296476 /Test/dafny0/DirtyLoops.dfy
parent607ef28aadb281ab61a2be493a637126e967a388 (diff)
Added support for 'dirty' forall statements.
One can now write forall statements without bodies (but with ensures clauses) as follows: forall s | s in S ensures s < 0; where S is set<int>. The ensures clauses are assumed but not checked.
Diffstat (limited to 'Test/dafny0/DirtyLoops.dfy')
-rw-r--r--Test/dafny0/DirtyLoops.dfy6
1 files changed, 6 insertions, 0 deletions
diff --git a/Test/dafny0/DirtyLoops.dfy b/Test/dafny0/DirtyLoops.dfy
new file mode 100644
index 00000000..6a49e733
--- /dev/null
+++ b/Test/dafny0/DirtyLoops.dfy
@@ -0,0 +1,6 @@
+// RUN: %dafny /compile:0 /dprint:"%t.dprint.dfy" "%s" > "%t"; %dafny /noVerify /compile:0 "%t.dprint.dfy" >> "%t"
+// RUN: %diff "%s.expect" "%t"
+
+method M(S: set<int>) {
+ forall s | s in S ensures s < 0;
+}