-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Discrepancy between Java/SMTlib interface #2667
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
It is taking bandwidth to set up appropriate Java environment and remember how to operate Java.
Then upload z3.log Another thing to play with, when quantifiers are involved is the random seed. Sometimes behavior changes according to order of declarations and the random seed (smt.random_seed=NN) can shed some light on this case |
Since I now found out, that the problem of the message "cannot process" when trying to in Java and in the SMT-file did not make any difference. z3-allthreeaxioms.log |
Always the same problem: github does not like using less/greater |
This helps a lot. It times out on the first file z3-allthreeaxioms.log, but finishes quickly on the other two. There are some built-in throttles to avoid instantiation loops, but it could be that these happen in a special case where assumptions are used. So something to investigate. |
I can understand if the pattern used in the second axiom causes an |
it is pretty subtle: the quantifiers created over the API have weight 0, the default weight from the parsed files is 1. This makes a difference in how it schedules quantifier instantiation. I will try to make this easier out of the box even though some workarounds are available, such as setting the weights to 1. I will push an update to Z3 later that ensures that even on 0 weight quantifier, the instance generation tracking is increased. In this way it will automatically throttle quantifier instantiation for this case. |
Signed-off-by: Nikolaj Bjorner <[email protected]>
Signed-off-by: Nikolaj Bjorner <[email protected]>
Ah, I understand now. The default I used in java for the weight of mkForall was indeed 0. |
I am going to close this as I pushed a change that ensures that even if you assign weight = 0, the quantifier instantiation will back off appropriately and avoid the loop that this bug exposes. |
…-0. It modifies a change made for the fix of #2667. That fix caused a regression in F*. Reported @mtzguido Signed-off-by: Nikolaj Bjorner <[email protected]>
Attached is a zip file with one file in SMTlib syntax and another file with java code. Both should
have the same 3 axioms and same goal, and the same settings. Only the
second axiom (named "Pot-pos") is relevant for the proof. Calling Z3 on
command line with the SMTlib-file a proof is found, while running the Java program
does not find one. After removing the "assertandTrack"-line for the first or third (irrelevant)
axiom in the Java code the goal is proved.
Changing the settings to auto=true does not change the result.
I'm working under Ubuntu 18.04 with a checkout of Z3 several months old, but
also just tested with a checkout from this morning (30.10.19).
configure was standard with --java and --prefix.
The output printed by the Java program shows no difference between the axioms
and the goal compared to what's in the SMTlib file (except that some let's are pretty-printed).
So my question is: What is different?
smtlib_vs_java.zip
The text was updated successfully, but these errors were encountered: