summaryrefslogtreecommitdiff
path: root/Test/dafny0/Definedness.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2011-10-26 21:20:44 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2011-10-26 21:20:44 -0700
commit8f0b71a95305b32ccded390ec5117462ffcadef0 (patch)
tree6ff77c11dd94f38811b2a1b00e6c84798d1e1c76 /Test/dafny0/Definedness.dfy
parent2b1732bf84b88b5656a305b781fdb818e5738ea6 (diff)
Dafny: removed Dafny's "foreach" statements (replaced by the new "parallel" statement)
Diffstat (limited to 'Test/dafny0/Definedness.dfy')
-rw-r--r--Test/dafny0/Definedness.dfy25
1 files changed, 0 insertions, 25 deletions
diff --git a/Test/dafny0/Definedness.dfy b/Test/dafny0/Definedness.dfy
index 44b54f3d..f99d1503 100644
--- a/Test/dafny0/Definedness.dfy
+++ b/Test/dafny0/Definedness.dfy
@@ -185,31 +185,6 @@ class StatementTwoShoes {
function G(w: int): int { 5 }
function method H(x: int): int { -x }
- method V(s: set<StatementTwoShoes>, a: int, b: int)
- modifies s;
- {
-
- foreach (m in s | m.x < 200) // s may contain null, but the foreach excludes null
- {
- assume 0 <= m.x;
- assert m.x < 1000;
-
- m.x := m.x + 1;
- }
- foreach (m in s + {F(a)}) // error: collection expression may not be well defined (fn precondition)
- {
- m.x := 5; // error: possible modifies clause violation
- }
- foreach (m in s | F(H(m.x)) == this) // error: range expression may not be well defined
- {
- m.x := H(m.x);
- }
- foreach (m in s)
- {
- m.x := 100 / m.x; // error: RhS may not be well defined
- }
- }
-
method W(x: int)
{
var i := 0;