Move assert result output from base to separate assert analysis#278
Move assert result output from base to separate assert analysis#278
Conversation
|
Looking at the changes, it's a bit ugly that we have so many reg. tests using |
src/analyses/libraryFunctions.ml
Outdated
| | `Calloc of exp * exp | ||
| | `Realloc of exp * exp | ||
| | `Assert of exp | ||
| | `Assert of exp * bool * bool (* exp, should_warn?, change? *) (* TODO: change to non-poly variants to inline record can be used *) |
There was a problem hiding this comment.
Would it not make sense to split this into some sort of GoblintAssert that is e.g. the result of classify __goblint_check, and keep this completely separate from Assert and use Assert only for actual C asserts?
Then one could have a separate analysis for these "regression test" __goblint_check (which is the analysis you started in this PR). For actual assert the default behavior would always be change and there might be a separate analysis that also does the warnings for C-level asserts that do not hold.
There was a problem hiding this comment.
This would also make it easy to warn for programs that contain __goblint_check but are run without this "regression assert" analysis, whereas the behavior changing a lot depending on whether the assert analysis is active or not might be confusing for some.
There was a problem hiding this comment.
Splitting assert from __goblint_* might be a bit cleaner indeed, but I'll postpone those changes also to after GobCon to have decided what's our plan with all these things.
Splitting this analysis itself also in two (C assert() analysis and our __goblint_* assert analysis) might be too much hair splitting. We have the dbg.regression option, so the same assert analysis could also warn if that's disabled but __goblint_* is called.
Indeed and we've come across this countless times in the last year adding numerous default analyses. In some cases we probably deactivate a default analysis for a particular test instead. Previously this required a manual listing but since #171 it's also possible to deactivate one, so that's no longer a restriction. One just needs to go over all these cases and determine, which analyses is the explicit list enabling or disabling compared to the default. Better to leave it as a separate task indeed. |
|
After making the Thus the |
If we improve precision of something that isn't already marked as |
Floats return `Top
|
I have now split and rebased this as discussed at GobCon:
Enjoy reviewing this PR! |
Assume is a more standard name, e.g. used in SV-COMP and Dafny.
Wasn't so bad given that the changes to the tests all were just mechanical! |
Inspired by #271 (comment) and some points in the GobCon agenda.
Currently this PR is opened with #251 as base to work via
EvalInt, but we don't have to merge it there, just wait until #251 is in master and change the base for this.