-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unfolding
should return the return value of the function so that it is a hint for verification, and has the behaviour of the unfolded function at runtime
#1550
Comments
Summary
|
Also, the potential side effects of the unfolded function are visible: case class C(var x: BigInt):
def update(v: BigInt): BigInt = {
x += v
x
}
def t(): BigInt = {
val c = C(0)
unfold(c.update(1))
assert(c.x == 1)
42
} gives this tree:
And we can see that the assertion is valid, so the side effect is visible |
So we decided (discussion 14.08.2024):
|
(old issue name: |
unfold
should take ghost parameter to not need to be wrapped in ghostExprunfolding
should return the return value of the function so that it is a hint for verification, and has the behaviour of the unfolded function at runtime
And maybe can be
inline def
The text was updated successfully, but these errors were encountered: