-
Notifications
You must be signed in to change notification settings - Fork 122
Constant evaluates to false when calling Model::eval #29
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
I'm not sure why but it works if you use the |
#2 is related. |
I'd really like to see this sorted out before I make a new release. Any volunteers? |
So... this appears to be working on master. I'd close this as fixed unless anyone can still repro
|
Nevermind! Updated my z3 from 4.5 to 4.8 and now it's broken again. Seems like something changed in the API. I'll do some digging. |
I can repro: the test in the above comment fails on current |
See Z3 issue: Z3Prover/z3#2489 (fixed in: Z3Prover/z3@fcc7bd3) @waywardmonkeys: This is a Z3 bug, that is now fixed in master and affects versions 4.8.1 - 4.8.5, so I don't think it should be a blocker for releasing an update. |
@djrenren Thanks for taking this up! |
z3 4.8.6 is out now and this is fixed. |
I have an issue where a constant is evaluated to false when calling
Model::eval
, even though the solver says that the constant istrue
in the model.Code
Expected behavior
After calling
solver.check
,solver.to_string
returns:I have no prior experience with Z3, but I read this as: a solution was found where
b!0
istrue
. Therefore, I expectmodel.eval(&b).unwrap().as_bool().unwrap()
to betrue
Actual behavior
model.eval(&b).unwrap().as_bool().unwrap()
returnsfalse
The text was updated successfully, but these errors were encountered: