-
Notifications
You must be signed in to change notification settings - Fork 25
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
Boolean comparison in z3 #146
Comments
It goes a bit further even, including (a & b) <= (a | b) as well as (a & 1) or (a & 0) etc, it is simply much stricter on the Booleanness... So, to fix in next release... (it can be avoided by writing the constraints more carefully as a user, for now) |
introduced helper intvar when comparing boolean expressions
We have a fix for this in pull request #189 |
(a & 1), a | 0, etc will also crash linearize.py when using other solvers as an integer is not an expression. Will open a separate issue for that |
I tried to replicate this issue, and I saw that this is resolved, as pull request #189 was merged. I am closing this. |
In CPMpy, a user can write something like this:
But this is not supported by the z3 API. Currently, the interface raises the following error:
TypeError: '<=' not supported between instances of 'BoolRef' and 'int'
. We should catch these cases and translate to the proper boolean expression.The text was updated successfully, but these errors were encountered: