-
Hello everybody, given the following z3 expression, is it possible to simplify it to from z3 import *
x = BitVec("x", 8)
expr = ULE(63, Concat(Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
x)) |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
By the way, it seems this is the result of Given the fact that the z3 simplifier probably has this sign ext info before simplifying, I guess it would mean checking if a sign-extended value gets used as unsigned? |
Beta Was this translation helpful? Give feedback.
-
Would be great if this simplification could be looked into, since this is slowing my high-performance application down drastically (it will not solve larger equations containing these within at least 60 seconds, whilst everything else is solved within 500ms). Considering |
Beta Was this translation helpful? Give feedback.
-
No, because |
Beta Was this translation helpful? Give feedback.
-
Thanks for reaching out. I think I may have worded my question in a misleading way, because this I find it odd that >>> simplify(ULT(BitVecVal(53, 32), SignExt(24, BitVec('x', 8))))
Not(And(Extract(7, 6, x) == 0,
Extract(7, 7, x) == 0,
ULE(Extract(5, 0, x), 53)))
>>> simplify(ULE(BitVecVal(53, 32), SignExt(24, BitVec('x', 8))))
ULE(53,
Concat(Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
Extract(7, 7, x),
x)) |
Beta Was this translation helpful? Give feedback.
-
This discussion has been linked in #7389. |
Beta Was this translation helpful? Give feedback.
This discussion has been linked in #7389.