We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bv_decide
The following example fails, but it should work.
import Std.Tactic.BVDecide theorem bv_decide_split_if_example (x0 : BitVec 64) : BitVec.zeroExtend 32 (BitVec.zeroExtend 33 (BitVec.zeroExtend 32 x0) + (BitVec.zeroExtend 33 (BitVec.replicate 32 (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0))) &&& 0xfffffffe#33 ||| BitVec.zeroExtend 33 ((BitVec.zeroExtend 32 x0).rotateRight 31) &&& 0xffffffff#33 &&& 0x1#33)) ^^^ (BitVec.replicate 32 (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0)) &&& 0xfffffffe#32 ||| (BitVec.zeroExtend 32 x0).rotateRight 31 &&& 0xffffffff#32 &&& 0x1#32) = if (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0) == 0x0#1) = true then BitVec.zeroExtend 32 x0 else 0x0#32 - BitVec.zeroExtend 32 x0 := by bv_decide
Users are forced to manually split the if-then-else. That is, the following one works.
if-then-else
import Std.Tactic.BVDecide theorem bv_decide_split_if_example (x0 : BitVec 64) : BitVec.zeroExtend 32 (BitVec.zeroExtend 33 (BitVec.zeroExtend 32 x0) + (BitVec.zeroExtend 33 (BitVec.replicate 32 (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0))) &&& 0xfffffffe#33 ||| BitVec.zeroExtend 33 ((BitVec.zeroExtend 32 x0).rotateRight 31) &&& 0xffffffff#33 &&& 0x1#33)) ^^^ (BitVec.replicate 32 (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0)) &&& 0xfffffffe#32 ||| (BitVec.zeroExtend 32 x0).rotateRight 31 &&& 0xffffffff#32 &&& 0x1#32) = if (BitVec.extractLsb 31 31 (BitVec.zeroExtend 32 x0) == 0x0#1) = true then BitVec.zeroExtend 32 x0 else 0x0#32 - BitVec.zeroExtend 32 x0 := by split <;> bv_decide
The text was updated successfully, but these errors were encountered:
Totally forgot about this particular issue, this feature has been implemented a while back.
Sorry, something went wrong.
No branches or pull requests
The following example fails, but it should work.
Users are forced to manually split the
if-then-else
. That is, the following one works.The text was updated successfully, but these errors were encountered: