-
Notifications
You must be signed in to change notification settings - Fork 97
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
Support private functions and old
expressions in Motoko-to-Viper translation
#3675
Conversation
(I'm off tomorrow, @ggreif can you take a look if on duty?) |
…finity/motoko into arshavir--viper--support-private-funcs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A few nits noted. Also test/viper/ok/private.silicon.ok is an empty file, make -C test/viper accept
should get rid of it.
Maybe also update the src/viper/README.md
regarding the new features?
old
expressions in Motoko-to-Viper translation
As you see I am not a fan of redundant parentheses :-> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to set the automerge-squash
label
This PR adds support for translating private Motoko functions into Viper. The translation is mostly analogous to that for public
async
functions. However, a private function does not have to be called from a state that satisfies the canister invariant (i.e., it may be called even in intermediate states), and a private function does not have to preserve the canister invariant (i.e., it may result in an intermediate state).Additionally, we add
old
expressions to enable useful specs in private actor functions, e.g.: