From 91c4d57eb84d5d15e011902a1da1b70131e5a222 Mon Sep 17 00:00:00 2001 From: leino Date: Fri, 12 Dec 2014 20:46:48 -0800 Subject: 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. --- Test/vstte2012/BreadthFirstSearch.dfy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Test/vstte2012') 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 } } -static function domain(m: map): set +function domain(m: map): set { set t | t in m } datatype List = 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(list: List): set +function elements(list: List): set { match list case Nil => {} -- cgit v1.2.3