-
Notifications
You must be signed in to change notification settings - Fork 273
Quantifier test: The second assertion does not hold [blocks: #2574, #3725, #3924] #3724
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
Conversation
90784fa
to
1550bdb
Compare
I am now wondering what the expectations for a statement like
are. I believe this is actually equivalent to Edit: I think the assumption one would want is
|
931762c
to
13bb72b
Compare
This PR now only has fixes to regression tests as well as additional tests. The actual code fixes will follow in separate PRs. |
13bb72b
to
fae55f8
Compare
All follow-up PRs actually fixing bugs have now been created. |
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 failed Diffblue compatibility checks (cbmc commit: fae55f8).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98544461
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
Several of them use implication (==>), which clang-format does not know how to deal with as is isn't a native C/C++ operator. Line numbers in the test.desc files are updated given the comment lines have been inserted.
The assertion requires, among other things, that (i>=0 && i<2) be true for all values of i, and thus i>=0 (or i<2) for all values of i.
Test for the absence of warnings about failed conversion. Two regression tests fail with this added check.
In some cases the assume is trivially true or trivially false.
Use appropriate Boolean connectives to actually make assertions hold.
fae55f8
to
52794ca
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 52794ca).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98714017
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 recall @theyoucheng being the original author of these tests, maybe he can provide some input on the original intent. I think they were written as part of the work on AutoSAC.
@theyoucheng Input would certainly be appreciated! Merging this for now to unblock other PRs, but comments and fixes will surely be addressed in follow-up work. |
This test is designed to stress if the quantification back-end handles correctly the input code of the format
encodes the following
|
@theyoucheng This suggests that
Is "for all i in [0, 2) ...", which I'd write as |
No,
means |
Hmm, ok, but that's how it's encoded at expression level and that is also what the simplifier assumes and transforms. That said, the example you've just given is perfectly sound with |
The assertion requires, among other things, that (i>=0 && i<2) be true for all
values of i, and thus i>=0 (or i<2) for all values of i.