-
Notifications
You must be signed in to change notification settings - Fork 277
[CONTRACTS] Allow loop contracts annotated to goto statement #8281
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
[CONTRACTS] Allow loop contracts annotated to goto statement #8281
Conversation
8462c9f
to
7de1747
Compare
warning().source_location = code.find_source_location(); | ||
warning() << "Loop invariants is not side-effect-free." << eom; |
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.
Nobody reads warnings. Can you describe the scenario where side effects would be ok?
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.
According to the offline discussion. I will move all the checks and throw to contracts component. They should not be in the converter.
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 PR now only allow loop contracts annotated to GOTO. Check for side effect will be in another PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8281 +/- ##
===========================================
- Coverage 78.37% 78.37% -0.01%
===========================================
Files 1726 1726
Lines 188322 188324 +2
Branches 18460 18484 +24
===========================================
+ Hits 147606 147607 +1
- Misses 40716 40717 +1 ☔ View full report in Codecov by Sentry. |
75ceb8b
to
a9ab3af
Compare
a9ab3af
to
0a1bb6f
Compare
0a1bb6f
to
d2f185f
Compare
This PR enable loop contracts annotated to goto statement, which is we we do in Kani generated GOTO program.