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/VSComp2010/Problem2-Invert.dfy | 2 +- Test/VSComp2010/Problem3-FindZero.dfy | 2 +- Test/VSComp2010/Problem4-Queens.dfy | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Test/VSComp2010') diff --git a/Test/VSComp2010/Problem2-Invert.dfy b/Test/VSComp2010/Problem2-Invert.dfy index 23c25733..274d86de 100644 --- a/Test/VSComp2010/Problem2-Invert.dfy +++ b/Test/VSComp2010/Problem2-Invert.dfy @@ -49,7 +49,7 @@ method M(N: int, A: array, B: array) assert forall j,k :: 0 <= j < k < N ==> B[j] != B[k]; } -static function inImage(i: int): bool { true } // this function is used to trigger the surjective quantification +function inImage(i: int): bool { true } // this function is used to trigger the surjective quantification method Main() { diff --git a/Test/VSComp2010/Problem3-FindZero.dfy b/Test/VSComp2010/Problem3-FindZero.dfy index 61bb2e3a..814e9067 100644 --- a/Test/VSComp2010/Problem3-FindZero.dfy +++ b/Test/VSComp2010/Problem3-FindZero.dfy @@ -56,7 +56,7 @@ class Node { } } -static method Search(ll: Node) returns (r: int) +method Search(ll: Node) returns (r: int) requires ll == null || ll.Valid(); ensures ll == null ==> r == 0; ensures ll != null ==> diff --git a/Test/VSComp2010/Problem4-Queens.dfy b/Test/VSComp2010/Problem4-Queens.dfy index 21fcc053..487dfdf2 100644 --- a/Test/VSComp2010/Problem4-Queens.dfy +++ b/Test/VSComp2010/Problem4-Queens.dfy @@ -47,7 +47,7 @@ method Search(N: int) returns (success: bool, board: seq) // Given a board, this function says whether or not the queen placed in column 'pos' // is consistent with the queens placed in columns to its left. -static function method IsConsistent(board: seq, pos: int): bool +function method IsConsistent(board: seq, pos: int): bool { 0 <= pos && pos < |board| && (forall q :: 0 <= q && q < pos ==> -- cgit v1.2.3