-
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
Quantified FPA formula incorrectly marked as SAT #2596
Comments
@NikolajBjorner Christoph found out that just changing the seed makes the first query flip from sat (smt.random_seed=2) to unsat (smt.random_seed=1). |
bv2fpa_converter inserts an interpretation for fp.to_sbv. Under that interpretation, the negation of the formula under the quantifier becomes unsat in the current model. |
No, it probably isn't, thanks for the pointer! |
@wintersteiger: it would be good to address this.
The "to_ieee" function seems to be internal, not part of the smtlib2 formalism on The to_sbv function is said to be under-specified among certain arguments in the notes
Thus, it may be required to do something along option 2. introduces 5 new operators with identical rewriting and bit-blasting |
ref ce06cd0 |
alas, a simpler solution seems available: pass in the expression built around the uninterpreted function to the model converter, use this for defining the original function and also include the uninterpreted helper function. |
FWIW, my understanding of "to_ieee" is that it returns the internal BV representation as-is. This is so that we can have the round-trip of a float->BV->float to be a no-op. None of the other functions allows this. |
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Even the simpler fix requires some extensive work. The function to_fp functions assume that its arguments are of a special form, something like (fp.to_sbv (rm xx) (fp sgn exp sig)). |
Yes, I'll fix this, but I have zero time at the moment, so this will take a while.
The initial idea for quantified formulas was to just translate all (quantified) floats to (quantified) bit-vectors and then run the |
This query is UNSAT with E-matching (correct) and SAT with MBQI (wrong):
Output:
|
@NikolajBjorner: |
Aside: I don't seem to be able to disable MBQI, e.g. with
it still runs it instead of returning unknown. |
also need to disable smt.auto_config to disable mbqi. |
Only an indirect purpose: we can define functions f(x,y) when the arguments are variables,
The idea would be to synthesize the model for f(x,y) using this definition. The current conversion code is written such that every ground instance of f(rm(t1), fp(t2, t3, t4)) is translated to an extended definition. The function f_fresh is cached so that it is recycled across different t1, t2, t3, t4 arguments. Model construction for f would somehow need to reflect |
Fix is now merged! @NikolajBjorner: Your |
See this:
Prints:
The first check gives
sat
, while the second givesunsat
. The value assertedfor%fb
is its model, which shouldn't change the satisfiability of the formula.The text was updated successfully, but these errors were encountered: