-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
A strange behavior: Only text replacement causes divergence #5560
Comments
You can get the solver to produce solutions by setting the random seed differently on stuck.txt.
Generally this can happen: the solver is trapped in some sequence of bad decisions without escaping. It might be fixable and help with overall performance, but requires investigation to tell. @levnach - it could be the case that the nla solver uses the same branch and misses some diversity or restart opportunities and therefore gets stuck. |
A first peek suggests there is a divergence bug. Printing lemmas in nla_core::check we see a sequence:
It should point to a bug, most likely in bounds propagation,
that produces a succession of bounds with larger numerals. |
@NikolajBjorner Thank you for telling me this information. I set Then I read the It says that
Therefore, can I think that this issue is not relevant to the symbol names? In my current understanding, because the default value of Thanks again! |
…pagate-value lemmas Signed-off-by: Nikolaj Bjorner <[email protected]>
…m's transcript with `gc-assumption-threshold` = 25. Note that if we don't set `smt.random_seed=1`, then `24-puzzle-i` will diverge. It won’t diverge if you just run `24-puzzle-i` alone. It will diverge when you run the whole tests. The difference between "running alone" and "running the whole tests" is that they will generate different unique logic variable names even if we run the same test (faster-miniKanren's variable counter is global and never reset). However, different logic variable names may cause z3's behavior different, see Z3Prover/z3#5560 . PS. The previous performance transcript may become meaningless because at the time I didn't set `smt.random_seed=1` and z3 may use that seed to do heuristic. I will re-test them later.
Hi,
I encountered a very strange problem. It might be a z3 bug, but I'm not sure yet (I am a beginner of z3).
The reproduction steps as follows:
I have a smtlib file ok.txt which can run normally.
Open
ok.txt
, replace_w
with_v
.Note that there is no
_v
appeared inok.txt
, so I believe we can do the replacement safely.The file before replacement and file after replacement are something like:
Run the replaced file stuck.txt.
Then z3 stuck (seems to diverge when solving nonlinear arithmetic).
The question is that why
ok.txt
could run normally, butstuck.txt
diverged? Is it a bug of z3?Thanks.
PS. You could replace
_v
back to_w
then it OK again (give you the same file asok.txt
), so I think there is no naming substitution problem.My test environment:
z3-4.8.12-x64-win on windows 7.
The text was updated successfully, but these errors were encountered: