-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fine Grained Module Definitions #661
Conversation
Can you please edit the message above to add syntax for each of the transformations? This will help in reviewing, independently of also creating a wiki page. |
84ab24d
to
b588f39
Compare
This is now ready for review. I've made a wiki page to document the features present. |
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.
This looks good to me. It does affect the non-interactive readability of scripts, so kind of increases the priority of proof documentation features.
As it stands, nothing forces usage, so this is fine to merge in order to allow engagement with the tool and user communities.
I only have minor comments (see above). Also, squash your commits. But overall, we are good to go. |
bd7f71b
to
c6fc91a
Compare
161c2ec
to
b96d5b0
Compare
This commit introduces a new mechanism that permits the user to create a new module by slightly tweaking an existing module definition. It has the following operations: - Introduce new module variables. - Introduce new local variables. - Delete/Modify/Add statements at particular code positions - Delete branches (match support is not currently working fully) - Modify branch conditions - Insert new branches around a chunk of code - Modify the return expression Syntax: ``` module N = M with { var x : t (* add new module variable *) proc f [ var y : s (* add new local variable *) cp +/-/~ { s } (* insert after/insert before/modify a statement *) cp - (* delete a statement *) cp + ( e ) (* insert new if statement with condition `e` surrounding the suffix code block *) cp - ./?/#cstr (* delete all other branches except true/false/cstr *) ] res ~ ( e ) (* change the return expression *) } ```
b96d5b0
to
db10952
Compare
The goal of this PR is to introduce a new mechanism that permits the user to create a new module by slightly tweaking an existing module definition.
At present the draft has the following features:
Syntax (needs work) :