Skip to content

Conversation

@atomb
Copy link
Contributor

@atomb atomb commented Nov 17, 2025

Note: I don't think this is quite done yet. Let's merge #213 first, at the very least.

Now each Boogie procedure includes one additional local variable for every global variable in its modifies clause, initialized to the initial value of the global at procedure entry. For each such variable g, all instances of old(g) in the procedure body are replaced with a reference to the new local that stores the old value of g. Postconditions still can contain old(x) sub-expressions, but they will always be normalized (i.e., old will be applied only to variables).

Code that interprets postconditions will need to do the appropriate substitution to replace old expressions with something else.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Now each Boogie procedure includes one additional local variable for
every global variable in its `modifies` clause, initialized to the
initial value of the global at procedure entry. For each such variable
`g`, all instances of `old(g)` in the procedure body are replaced with a
reference to the new local that stores the old value of `g`.
Postconditions still can contain `old(x)` sub-expressions, but they will
always be normalized (i.e., `old` will be applied only to variables).

Code that interprets postconditions will need to do the appropriate
substitution to replace `old` expressions with something else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant