-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0218e5
commit 0fbdd7c
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
field f1: Int | ||
ghost field g1: Int | ||
|
||
inv inv1() { true } | ||
|
||
proc p1(x: Ref) | ||
requires inv1() | ||
requires exists nn:Int :: own(x, f1, nn, 1.0) | ||
{ | ||
unfold inv1(); | ||
var f: Int := x.f1; | ||
|
||
// ######## | ||
// Neither of the following succeed: | ||
// a.) | ||
x.g1 := 4; | ||
// | ||
// b.) | ||
// {! x.g1 := 4; !} | ||
// | ||
// for similar reasons. | ||
// ######## | ||
|
||
fold inv1(); | ||
} |