-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Module Tweaks: Allow for fine grain editing of existing modules.
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 *) } ```
- Loading branch information
1 parent
1f33371
commit e335db0
Showing
10 changed files
with
479 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.