diff options
author | kyessenov <unknown> | 2010-07-02 20:50:35 +0000 |
---|---|---|
committer | kyessenov <unknown> | 2010-07-02 20:50:35 +0000 |
commit | 13d875ed9643230a36f1a34651987d286af3284a (patch) | |
tree | 69b231e773512a1596c55209a2d3059eb9102937 /Test | |
parent | 8f60fee050c6f7912135327d1dc99b3da4c0ecc4 (diff) |
Dafny: support input/output parameters in refined methods.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/dafny0/Answer | 2 | ||||
-rw-r--r-- | Test/dafny0/Counter.dfy | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Test/dafny0/Answer b/Test/dafny0/Answer index 2577557a..15986246 100644 --- a/Test/dafny0/Answer +++ b/Test/dafny0/Answer @@ -450,4 +450,4 @@ Dafny program verifier finished with 5 verified, 0 errors -------------------- Counter.dfy --------------------
-Dafny program verifier finished with 19 verified, 0 errors
+Dafny program verifier finished with 22 verified, 0 errors
diff --git a/Test/dafny0/Counter.dfy b/Test/dafny0/Counter.dfy index c38b28dc..63f2fc3c 100644 --- a/Test/dafny0/Counter.dfy +++ b/Test/dafny0/Counter.dfy @@ -15,8 +15,10 @@ class A { requires n > 0; { n := n - 1;} - method Test1() returns (i: int) - { i := 0;} + method Test1(p: int) returns (i: int) + { + assume true; + } method Test2() returns (o: object) { o := this; } @@ -38,6 +40,11 @@ class B refines A { modifies this; requires inc > dec; { dec := dec + 1; } + + refines Test1(p: int) returns (i: int) + { + i := p; + } } |