diff options
author | rustanleino <unknown> | 2010-09-17 01:26:47 +0000 |
---|---|---|
committer | rustanleino <unknown> | 2010-09-17 01:26:47 +0000 |
commit | 4744c729d2fa83f324ffa84dc619ad0a321a9c98 (patch) | |
tree | 20f6e9d48144fc0ca96a2db53ee9f0db81e4861f /Test/vacid0/LazyInitArray.dfy | |
parent | 94087bfa24bd34a5cfcb6c8b361439c6de3135a9 (diff) |
Dafny:
* Added full support for multi-dimensional arrays (except for one issue that still needs to be added in compilation)
* Changed syntax of array length from |a| to a.Length (for one-dimensional arrays). The syntax for either dimensions is, for example, b.Length0 and b.Length1 for 2-dimensional arrays.
* Internally, this meant adding support for built-in classes and readonly fields
Diffstat (limited to 'Test/vacid0/LazyInitArray.dfy')
-rw-r--r-- | Test/vacid0/LazyInitArray.dfy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Test/vacid0/LazyInitArray.dfy b/Test/vacid0/LazyInitArray.dfy index c5a032fe..fc4d687d 100644 --- a/Test/vacid0/LazyInitArray.dfy +++ b/Test/vacid0/LazyInitArray.dfy @@ -11,11 +11,11 @@ class LazyInitArray<T> { reads this, a, b, c;
{
a != null && b != null && c != null &&
- |a| == |Contents| + 1 && // TODO: remove the "+ 1" hack, which currently serves the purpose of distinguishing 'a' from 'b' and 'c'
- |b| == |Contents| &&
- |c| == |Contents| &&
+ a.Length == |Contents| + 1 && // TODO: remove the "+ 1" hack, which currently serves the purpose of distinguishing 'a' from 'b' and 'c'
+ b.Length == |Contents| &&
+ c.Length == |Contents| &&
b != c &&
- 0 <= n && n <= |c| &&
+ 0 <= n && n <= c.Length &&
(forall i :: 0 <= i && i < |Contents| ==>
Contents[i] == (if 0 <= b[i] && b[i] < n && c[b[i]] == i then a[i] else Zero)) &&
(forall i :: 0 <= i && i < |Contents| ==>
|