-
Notifications
You must be signed in to change notification settings - Fork 32
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
Assumption on array causes malfunctioning checks #173
Comments
I tried another way of doing so, but the assertion on
And again if I comment out the assumptions on |
I feel that this is related to #159. If so, feel free to close this one. Thanks! |
Thanks for the example. Actually the behavior you are seeing is expected: the assumption is false because your bitvectors aren't big enough to fit in the values you are expecting as well as the sign bit, but you are using signed comparison operators which assume the first bit is a sign bit. Thus the values get read as negative values, and the assumption then turns out to be equivalent to "assume false", which means every property will pass. Specifically Try this:
It's unsat as written. If you comment out the distinct assertion, it becomes sat but x and y are both equal to #x8. To fix your file, you either need to use unsigned comparators (e.g., <=_u) or make the bitvectors bigger. (the other issue you linked isn't related, it's about what the counterexamples look like with arrays) |
Thank you so much for the detailed explanation! Once I use unsigned comparators instead, it works! And also am I correct that, for unsigned bitvectors division, I should use |
Yep, |
Hi, I would like to have an arbitrary memory except that, within a fixed range, there are at least two non-zero elements. However, such an assumption makes the checks behave incorrectly. They always pass no matter what I assert.
The code:
In the code above, I assert
false
but all checks pass:But if I comment out those two lines about the range,
Then the checks work again:
I wonder if I am misusing
havoc
and assumptions. Thank you!The text was updated successfully, but these errors were encountered: