-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR refactors `CheckAtt` to more clearly separate the checks on different attributes. Most of the change here is just shuffling code between functions, but we additionally - Implemented `HasAtt` and `HasLocation` for `Module` so we can use the same `checkUnrecognizedAtts` and `checkRestrictedAtts` functions for both modules and sentences - In doing so, fixed a bug where we failed to check restricted attributes on modules at all - Corrected the whitelist to allow `one-path` and `all-path` on `Module` as well as `Claim` - Slightly changed a few error messages - Removed a manual check for attribute values on `binder`, as this is now covered by the general check
- Loading branch information
1 parent
4ad914f
commit 46665b0
Showing
9 changed files
with
170 additions
and
159 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
10 changes: 8 additions & 2 deletions
10
k-distribution/tests/regression-new/checks/checkModuleAtts.k.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
[Error] Compiler: Had 1 structural errors. | ||
[Error] Compiler: Unrecognized attributes on module CHECKMODULEATTS: [baz, foo] | ||
[Error] Compiler: Unrecognized attributes: [baz, foo] | ||
Hint: User-defined groups can be added with the group(_) attribute. | ||
Source(checkModuleAtts.k) | ||
Location(2,1,3,10) | ||
. v~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
2 | module CHECKMODULEATTS [foo, group(bar), baz] | ||
3 | endmodule | ||
. ~~~~~~~~^ | ||
[Error] Compiler: Had 1 structural errors. |
6 changes: 3 additions & 3 deletions
6
k-distribution/tests/regression-new/checks/invalidLabel.k.out
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
4 changes: 2 additions & 2 deletions
4
k-distribution/tests/regression-new/checks/restrictedAtts.k.out
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.