-
Notifications
You must be signed in to change notification settings - Fork 274
Split goto_check #6497
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
Split goto_check #6497
Conversation
74bd597
to
f4748df
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6497 +/- ##
===========================================
+ Coverage 76.06% 76.07% +0.01%
===========================================
Files 1546 1548 +2
Lines 165584 166359 +775
===========================================
+ Hits 125951 126563 +612
- Misses 39633 39796 +163
Continue to review full report at Codecov.
|
f4748df
to
9055c77
Compare
goto_check inserts assertions that check for suspect bugs in both C/C++ and Java programs. The criteria differ vastly given that Java has basically no instances of undefined behavior. This commit splits the file, separating it into a checker for C/C++ and one for Java. The long-term plan is to move these checkers into the directory of the corresponding language frontend.
This commit applies clang-format; the commit is separate to faciliate review.
9055c77
to
99078c6
Compare
This replaces two uses of the assert() macro by DATA_INVARIANT.
This removes Java-specific code from goto_check_ct.
This removes C/C++-specific code from goto_check_javat.
99078c6
to
e286cd2
Compare
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'm fine with that, but I note that we have several other PRs in flight that also affect this code. We need to co-ordinate at least with:
- Make pointer-primitive-check a no-op when behaviour is always defined #6491
- Prevent multiple instrumentation of a same check and instrumentation of instrumentation assertions #6471
- __CPROVER_r/w_ok does not require null or a valid pointer #6416
- Allow checks to be performed inside quantifier statements. #6399
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.
Looks like a reasonable intermediate step.
These all affect the checks for C, and should rebase easily since this PR renames goto_check.cpp to goto_check_c.cpp. |
I'll try that on mine, but the mix of file renaming and clang-formatting could still spell trouble. |
Add the renaming of the class into the mix. So, no, unfortunately it's not exactly fun. I've taken care of #6491, and will work with @remi-delmas-3000 on #6471. |
goto_check inserts assertions that check for suspect bugs in both C/C++ and
Java programs. The criteria differ vastly given that Java has basically no
instances of undefined behavior.
This PR splits the file, separating it into a checker for C/C++ and one
for Java. The long-term plan is to move these checkers into the directory
of the corresponding language frontend.