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

fix: For attributes, add missing resolution and fix pointless parsing #1900

Merged

Conversation

RustanLeino
Copy link
Collaborator

@RustanLeino RustanLeino commented Mar 12, 2022

  • fix: Resolve attributes on requires and ensures clauses for functions (previously, these were never resolved)
  • fix: Resolve attributes on all specification components of iterators (previously, these were never resolved)
  • fix: Previously, attributes on reads clauses were parsed and then ignored. Now, they are not parsed at all. (There is no place in the AST where these are stored.)
  • fix: Previously, attributes on requires clauses of lambda expressions were parsed and then ignored. Now, they are not parsed at all. (There is no place in the AST where these are stored.)
  • fix: Previously, attributes on decreases clauses of functions were parsed and then ignored. Now, they are parsed and stored in the AST. (These had a place in the AST, but were previously not stored there--or anywhere.)
  • Add test cases that make sure attributes on modify statements and module declarations are resolved

Note for reviewers: Review of AttributeChecks.dfy and AttributeChecks.dfy.expect are probably best done commit by commit. The first commit just adds white space to the test file, and the second commit wraps a module declaration around the contents of the file.

Copy link
Member

@cpitclaudel cpitclaudel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any call left to ResolveAttributes that are not of the form ResolveAttributes(X, X.attributes)? If not then maybe it's worth changing the signature of that function to take one fewer parameter

@RustanLeino
Copy link
Collaborator Author

Are there any call left to ResolveAttributes that are not of the form ResolveAttributes(X, X.attributes)? If not then maybe it's worth changing the signature of that function to take one fewer parameter

@cpitclaudel Good call! This simplified all 39 call sites.

@RustanLeino RustanLeino enabled auto-merge (squash) March 15, 2022 17:27
@RustanLeino RustanLeino merged commit 4c99032 into dafny-lang:master Mar 15, 2022
@RustanLeino RustanLeino deleted the fix-missing-attribute-checks branch March 15, 2022 18:29
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

Successfully merging this pull request may close these issues.

None yet

2 participants