diff options
author | rustanleino <unknown> | 2010-03-11 07:08:51 +0000 |
---|---|---|
committer | rustanleino <unknown> | 2010-03-11 07:08:51 +0000 |
commit | a406d2b8a42355a1924c00b67d8b08962efd9de1 (patch) | |
tree | 388962d66888984aed09f7d33def92639c29a617 /Test | |
parent | 2bfb81bd10f969ad2834be5b6604606ad9c14dab (diff) |
Dafny:
* Enforce ghost vs. non-ghost separation
* Allow ghost parameters and ghost locals
* Functions are ghost, but allow the non-ghost "function method"
Diffstat (limited to 'Test')
-rw-r--r-- | Test/VSI-Benchmarks/b2.dfy | 4 | ||||
-rw-r--r-- | Test/VSI-Benchmarks/b3.dfy | 4 | ||||
-rw-r--r-- | Test/dafny0/TypeParameters.dfy | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Test/VSI-Benchmarks/b2.dfy b/Test/VSI-Benchmarks/b2.dfy index 53eb49a8..6c0cfe81 100644 --- a/Test/VSI-Benchmarks/b2.dfy +++ b/Test/VSI-Benchmarks/b2.dfy @@ -44,10 +44,10 @@ class Array { requires 0 <= n;
modifies this;
ensures |contents| == n;
- function Length(): int
+ function method Length(): int
reads this;
{ |contents| }
- function Get(i: int): int
+ function method Get(i: int): int
requires 0 <= i && i < |contents|;
reads this;
{ contents[i] }
diff --git a/Test/VSI-Benchmarks/b3.dfy b/Test/VSI-Benchmarks/b3.dfy index ed121ba0..e3a91ab2 100644 --- a/Test/VSI-Benchmarks/b3.dfy +++ b/Test/VSI-Benchmarks/b3.dfy @@ -24,11 +24,11 @@ class Queue<T> { requires 0 < |contents|;
modifies this;
ensures contents == old(contents)[1..] && x == old(contents)[0];
- function Head(): T
+ function method Head(): T
requires 0 < |contents|;
reads this;
{ contents[0] }
- function Get(i: int): T
+ function method Get(i: int): T
requires 0 <= i && i < |contents|;
reads this;
{ contents[i] }
diff --git a/Test/dafny0/TypeParameters.dfy b/Test/dafny0/TypeParameters.dfy index 680679d4..614c2185 100644 --- a/Test/dafny0/TypeParameters.dfy +++ b/Test/dafny0/TypeParameters.dfy @@ -5,7 +5,7 @@ class C<U> { y := x;
}
- function F<X>(x: X, u: U): bool
+ function method F<X>(x: X, u: U): bool
{
x == x && u == u
}
|