diff options
author | Rustan Leino <unknown> | 2014-04-04 22:04:48 -0700 |
---|---|---|
committer | Rustan Leino <unknown> | 2014-04-04 22:04:48 -0700 |
commit | 104580b738eaeb22ab6b2120a5d08c211bfee9e0 (patch) | |
tree | 2aac15ff09b685f480193bb0772ecdd60ad453b8 /Test/dafny4 | |
parent | 3345f55fab43efb9bf2e584e14f6d9c90cf3dec7 (diff) |
Fixed refinement of modify statements
Diffstat (limited to 'Test/dafny4')
-rw-r--r-- | Test/dafny4/ClassRefinement.dfy | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Test/dafny4/ClassRefinement.dfy b/Test/dafny4/ClassRefinement.dfy index 5c444120..e2c5906b 100644 --- a/Test/dafny4/ClassRefinement.dfy +++ b/Test/dafny4/ClassRefinement.dfy @@ -1,4 +1,4 @@ -module M0 {
+abstract module M0 {
class Cell {
var data: int;
constructor (d: int)
@@ -32,6 +32,7 @@ module M0 { ensures Valid() && fresh(Repr - old(Repr));
{
N := N + 1;
+ modify Repr - {this};
}
method Get() returns (n: int)
@@ -65,7 +66,10 @@ module M1 refines M0 { method Inc...
{
- c.data := c.data + 1;
+ ...;
+ modify ... {
+ c.data := c.data + 1;
+ }
}
method Get...
|