-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…en if variable is unchanged Co-authored-by: Viktor Kunčak <vkuncak@users.noreply.github.com>
- Loading branch information
1 parent
7dcfcf6
commit ab2bb07
Showing
2 changed files
with
35 additions
and
7 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
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,26 @@ | ||
import stainless.lang.* | ||
|
||
object i1530 { | ||
case class A(var i: BigInt) | ||
|
||
def outer1(a: A): Unit = { | ||
def inner11(a1: A): Unit = { | ||
() | ||
}.ensuring(_ => a1.i == old(a1).i) | ||
|
||
def inner12(a1: A, a2: A): Unit = { | ||
a2.i += 1 | ||
}.ensuring(_ => a1.i == old(a1).i) | ||
} | ||
|
||
def outer2(a: A): Unit = { | ||
def inner21(): Unit = { | ||
}.ensuring(_ => a.i == old(a).i) | ||
} | ||
|
||
def outer3(a: A): Unit = { | ||
def inner3(a2: A): Unit = { | ||
a.i += 1 | ||
}.ensuring(_ => a.i == old(a).i + 1 && a2.i == old(a2).i) | ||
} | ||
} |