-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Optimization bug, introduced in https://github.com/Z3Prover/z3/commit/fd77f0c1116d0fa0a62a804217137ba15ece8b12 #5605
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
Comments
Here's another example of the same; a bit smaller using smaller sizes for exponent and significand. (Semantically the same as above, just fewer lines.)
Correct answer, obtained by August 17, 2021 z3:
Incorrect answer, produced by current master z3:
|
This one will be very hard to debug. There are bugs in the optimization engine, which I am not even a little bit familiar with, so if this still fails after the other FP bugs are fixed, I'll have to ask @NikolajBjorner to take a look at this. In any case, this will take a very long time to resolve. |
Thanks @wintersteiger I've a feeling this doesn't have anything to do with the optimizer, but just manifests that way; but it could also be a weird interaction indeed. I'll see if I can do some git-bisecting to at least determine which exact commit broke it. Perhaps that'll provide some more incentive/guidance as to what the real culprit might be. |
@wintersteiger @NikolajBjorner After git-bisecting, I found that the following commit (by Nikolaj) is the culprit for this bug: And just by looking at the commit itself, looks like this really doesn't have anything to do with floats at all. I can't tell from the changes why, but this is the commit that broke this benchmark. |
I believe the updates now fixed the issue. |
Yes! I can confirm that the benchmark now works as expected. Thanks for the quick fix. |
@wintersteiger
I wish I had a smaller benchmark to report; and I'm working on generating one. The following benchmark results in an incorrect value reported by z3. In particular, this seems to be a regression, since z3 compiled on August 17th of this year produces the following correct answer:
But a freshly compiled z3 produces the incorrect result:
The idea is that
s0
ands1
are floating-point values such thats0+s1
is still a valid float (i.e., not-oo
), but is also minimal.I'm posting this with the hopes that you can replicate and perhaps bisect to find the culprit. I'll continue trying to find a smaller example if I can.
Here's the benchmark:
The text was updated successfully, but these errors were encountered: