Skip to content

Instantly share code, notes, and snippets.

@hrkrshnn
Last active September 24, 2020 14:49
Show Gist options
  • Save hrkrshnn/e61bbf349a931fb32bb6a4cb5afa3bc9 to your computer and use it in GitHub Desktop.
Save hrkrshnn/e61bbf349a931fb32bb6a4cb5afa3bc9 to your computer and use it in GitHub Desktop.
from rule import Rule
from opcodes import *
rule = Rule()
for i in range(1, 25):
X = BitVec('X', 8*i)
Y = BitVec('Y', 8*i)
max = 2**(8*i) - 1
rule.check(
SUB(AND(X, max), AND(Y, max)),
AND(SUB(X, Y), max)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment