-
Notifications
You must be signed in to change notification settings - Fork 277
Properly checks struct members in alias expression #6265
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
Properly checks struct members in alias expression #6265
Conversation
feliperodri
commented
Aug 3, 2021
- Each commit message has a non-empty body, explaining why the change was made.
- Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
- The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
- Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
- My commit message includes data points confirming performance improvements (if claimed).
- My PR is restricted to a single feature or bugfix.
- White-space or formatting changes outside the feature-related changed lines are in commits of their own.
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.
The code looks fairly good but I am worried about the tests and about disabling so many of them in a PR claiming to fix things.
regression/contracts/assigns_type_checking_valid_cases/test.desc
Outdated
Show resolved
Hide resolved
5e6a202
to
7c2617a
Compare
@martin-cs could you take another look? I fixed the bug when dealing with arrays. |
993d5a5
to
ce9f270
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6265 +/- ##
========================================
Coverage 75.90% 75.90%
========================================
Files 1492 1492
Lines 162724 162731 +7
========================================
+ Hits 123513 123522 +9
+ Misses 39211 39209 -2
Continue to review full report at Codecov.
|
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.
Thank you; that is a massive improvement on the previous version.
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.
I am still thinking about the new conditions we have added, but my main comment for now is to add enough test cases that cover this new change.
- We are missing test cases for replacement context. We should check that during replacement, we don't havoc more than (the struct field) we are supposed to havoc
- Both test cases assign to the first field of the struct. Since we look at the offsets etc, could we make one of the test assign to the second field? I'd suggest changing
regression/contracts/assigns_enforce_structs_04/main.c
to assign top->y
instead.
ce9f270
to
25feb4f
Compare
This PR is only for enforcement. We should add test cases for replacement once we update the havoc method.
I added two new test cases, could you take another look? @SaswatPadhi |
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.
Thanks, LGTM. If you rebase on to develop
, you could remove some repeated code. Commented below:
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
5daa210
to
9e8dd91
Compare