let binding/multiple update patterns #1103
Unanswered
mira-alford
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi!!
In my work using boogie, we are experimenting with multiple different models of memory, and are hiding it all behind a black box memory model variable/type and functions that operate on it. Unfortunately, some procedures need to ensure multiple updates to the memory model, which would ideally look something like:
Obviously the above wont work as it is introducing temporary variables, ideally there would be some equivalent to let bindings or temporary variables in the ensures clause?
Regardless the solution right now looks something like this:
However it quite quickly becomes unreadable when we specify complex procedures that ensure lots of updates to the memory model.
I'm just curious if there are any good patterns for this kind of scenario that keep the boogie code readable? Assuming I don't want to reason about/modify the internals of the update functions or memory model.
All reactions