summaryrefslogtreecommitdiff
path: root/Test/vstte2012
diff options
context:
space:
mode:
authorGravatar leino <unknown>2014-12-12 20:46:48 -0800
committerGravatar leino <unknown>2014-12-12 20:46:48 -0800
commit91c4d57eb84d5d15e011902a1da1b70131e5a222 (patch)
tree6794bafdc71f6bc31c8d09496c3435658bbfc144 /Test/vstte2012
parent62a3e97eb61cbee0d523297ccad1f2d3bcf871c3 (diff)
Language change: All functions and methods declared lexically outside any class are now
automatically static, and fields are no longer allowed to be declared there. Stated differently, all heap state must now be declared inside an explicitly declared class, and functions and methods declared outside any class can be viewed as belonging to the module. The motivating benefit of this change is to no longer need the 'static' keyword when declaring a module of functions and methods.
Diffstat (limited to 'Test/vstte2012')
-rw-r--r--Test/vstte2012/BreadthFirstSearch.dfy6
1 files changed, 3 insertions, 3 deletions
diff --git a/Test/vstte2012/BreadthFirstSearch.dfy b/Test/vstte2012/BreadthFirstSearch.dfy
index 2d724b54..b111a438 100644
--- a/Test/vstte2012/BreadthFirstSearch.dfy
+++ b/Test/vstte2012/BreadthFirstSearch.dfy
@@ -231,21 +231,21 @@ class BreadthFirstSearch<Vertex(==)>
}
}
-static function domain<T, U>(m: map<T, U>): set<T>
+function domain<T, U>(m: map<T, U>): set<T>
{
set t | t in m
}
datatype List<T> = Nil | Cons(head: T, tail: List)
-static function length(list: List): nat
+function length(list: List): nat
{
match list
case Nil => 0
case Cons(_, tail) => 1 + length(tail)
}
-static function elements<T>(list: List<T>): set<T>
+function elements<T>(list: List<T>): set<T>
{
match list
case Nil => {}