You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with z3, or more precisely something I cannot understand. I am using it to simplify some expressions. However I found one that seems quite obvious to me, but for some reason z3 is not able to simplify it.
If we take a quick glance at the expression, and we know that the result will be 32 bits because of all the masks applied on every computation, the expression is the same as r15d ^ r15d ^ 0x80000001 (with r15d being the lowest 32bits value of r15), so it should be simplified to the following constant: 0x80000001, right?
So that's what I was expecting, z3 saying that the result of the simplification is a constant, however z3 yields some other expression, like this:
Hello,
I have an issue with z3, or more precisely something I cannot understand. I am using it to simplify some expressions. However I found one that seems quite obvious to me, but for some reason z3 is not able to simplify it.
If we take a quick glance at the expression, and we know that the result will be 32 bits because of all the masks applied on every computation, the expression is the same as
r15d ^ r15d ^ 0x80000001
(withr15d
being the lowest 32bits value ofr15
), so it should be simplified to the following constant:0x80000001
, right?So that's what I was expecting, z3 saying that the result of the simplification is a constant, however z3 yields some other expression, like this:
If the result is not obvious, you can try to use any input as the value of r15, it will always be that constant, no matter what.
So I don't really understand why z3 fails to simplify this, and I hope someone can help me clarify this.
Thanks a lot :)
The text was updated successfully, but these errors were encountered: