Created
November 11, 2018 22:58
-
-
Save regehr/9b00856ff3fe1c0f4716c04c61047a9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from z3 import * | |
def make_lhs(x): | |
lhs = UDiv(x, BitVecVal(4532, 32)) | |
return lhs | |
def make_rhs(x, c): | |
t1 = ZeroExt(32, x) | |
tc = ZeroExt(32, c) | |
t2 = t1 * tc | |
t3 = LShR(t2, 42) | |
rhs = Extract(31, 0, t3) | |
return rhs | |
x = BitVec('x', 32) | |
q = make_lhs(x) == make_rhs(x, BitVecVal(970442743, 32)) | |
prove(q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment