-
Notifications
You must be signed in to change notification settings - Fork 5
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
Typing allows the invalid expression Int + Bool #21
Comments
Do other solvers support this? If so, then maybe we might want the API to allow it, but for the solver to raise an exception if it is not supported by that particular solver. |
This is a good point. I see how the bug arose -- I implemented the comparison operators first and didn't catch the different typing. |
PLOT TWIST The bug-ness of this is up for debate because as @mykelk said, other solvers support it -- specifically Z3, where I did most of my testing, allows mixed arithmetic/bool statements (while CVC5 does not). Minimal example:
Z3 outputs
Internally, Z3 is replacing The same behavior is apparent for mixing Real, Int, and Bool.
yields I think for user convenience, the resolution of this "bug" should be to do the Z3 thing:
The current behavior of Satisfiability.jl yields SMT-LIB statements like the above ( |
It's possible to construct an expression of the form
BoolExpr + IntExpr
which is not valid in Z3, thus it should not be constructable in Satisfiability.jlThe text was updated successfully, but these errors were encountered: