Skip to content

Instantly share code, notes, and snippets.

@agustingianni
Created April 19, 2016 20:07
Show Gist options
  • Select an option

  • Save agustingianni/a9e992d9b03f95fd7b111c7b53633d91 to your computer and use it in GitHub Desktop.

Select an option

Save agustingianni/a9e992d9b03f95fd7b111c7b53633d91 to your computer and use it in GitHub Desktop.
from z3 import *
input_size = BitVec('input_size', 32)
t1 = BitVecVal(0xAAAAAAAAAAAAAAAB, 128) * ZeroExt(128 - 32, input_size)
t2 = LShR(t1, 64)
t3 = LShR(t2, 3)
t4 = Extract(31, 0, t3)
expr1 = t4
expr2 = UDiv(input_size, 12)
solve(expr1 != expr2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment