Skip to content
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

Translation of Old() syntax #58

Open
DavePearce opened this issue Dec 4, 2021 · 0 comments
Open

Translation of Old() syntax #58

DavePearce opened this issue Dec 4, 2021 · 0 comments

Comments

@DavePearce
Copy link
Member

At this stage, there remain a lot of questions as to how we can safely translate occurrences of old(). Some can be done, such as this (Reference_Valid_1):

method swap(&int x_ptr, &int y_ptr)
ensures *x_ptr == old(*y_ptr)
ensures *y_ptr == old(*x_ptr):
    int tmp = *x_ptr
    *x_ptr = *y_ptr
    *y_ptr = tmp

But others cannot.

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

No branches or pull requests

1 participant