summaryrefslogtreecommitdiff
path: root/Test/vstte2012
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2013-03-27 13:51:16 -0700
committerGravatar Rustan Leino <unknown>2013-03-27 13:51:16 -0700
commit5296b17758c3e27bf551e9a322323a37983d7abb (patch)
treea7c818eedf1608eec0e59ff73ac3ee8356939751 /Test/vstte2012
parent5f05e3a1c194dcda48115d7b6a1c5777bd2d5287 (diff)
The "choose" statement, hacky and specialized as it was, is now gone. Use the assign-such-that statement instead. For example: x :| x in S;
Diffstat (limited to 'Test/vstte2012')
-rw-r--r--Test/vstte2012/BreadthFirstSearch.dfy4
1 files changed, 2 insertions, 2 deletions
diff --git a/Test/vstte2012/BreadthFirstSearch.dfy b/Test/vstte2012/BreadthFirstSearch.dfy
index e1a93730..ac070ac6 100644
--- a/Test/vstte2012/BreadthFirstSearch.dfy
+++ b/Test/vstte2012/BreadthFirstSearch.dfy
@@ -80,7 +80,7 @@ class BreadthFirstSearch<Vertex(==)>
decreases AllVertices - Processed;
{
// remove a vertex "v" from "C"
- var v := choose C;
+ var v :| v in C;
C, Processed := C - {v}, Processed + {v};
ghost var pathToV := Find(source, v, paths);
@@ -264,7 +264,7 @@ class BreadthFirstSearch<Vertex(==)>
if (vSuccs == {}) {
newPaths := paths;
} else {
- var succ := choose vSuccs;
+ var succ :| succ in vSuccs;
newPaths := Maplet(Domain(paths) + {succ}, succ, pathToV + [v], paths);
newPaths := UpdatePaths(vSuccs - {succ}, source, newPaths, v, pathToV);
}