Reporting labels that declare invariants but aren't loop heads#920
Merged
Conversation
Member
|
The PRs LGTM, though I would be in favour of making this an error rather than a warning. I can't imagine a case where an invariant is emitted on a non-loop-head label where this is not the result of something going very wrong in the frontend. |
Contributor
Author
|
I'll merge the warning code for now. We should put it on the agenda for the next Viper meeting and decide whether it should be an error. I'm in no way against that, I just think it warrants a short discussion. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Returns additional information s.t. the caller (Carbon) has the needed information to emit warnings when the verified program contains labels with invariants that aren't loop heads.
These invariants are ignored, currently completely silently, which can be surprising for users.
The corresponding Silicon and Carbon PRs viperproject/carbon#587 and viperproject/silicon#988 should be merged first.