diff options
Diffstat (limited to 'example/expression/simplification_tools.py')
| -rw-r--r-- | example/expression/simplification_tools.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/example/expression/simplification_tools.py b/example/expression/simplification_tools.py index 9b8aeed5..6a4ff715 100644 --- a/example/expression/simplification_tools.py +++ b/example/expression/simplification_tools.py @@ -21,8 +21,8 @@ e = ExprId('e') m = ExprMem(a) s = a[:8] -i1 = ExprInt(uint32(0x1)) -i2 = ExprInt(uint32(0x2)) +i1 = ExprInt(0x1, 32) +i2 = ExprInt(0x2, 32) cc = ExprCond(a, b, c) o = ExprCompose(a[8:16], a[:8]) @@ -33,12 +33,12 @@ l = [a[:8], b[:8], c[:8], m[:8], s, i1[:8], i2[:8], o[:8]] l2 = l[::-1] -x = ExprMem(a + b + ExprInt32(0x42)) +x = ExprMem(a + b + ExprInt(0x42, 32)) def replace_expr(e): # print 'visit', e - dct = {c + ExprInt32(0x42): d, + dct = {c + ExprInt(0x42, 32): d, a + b: c, } if e in dct: return dct[e] @@ -60,9 +60,9 @@ print z.copy() print z[:31].copy().visit(replace_expr) print 'replace' -print x.replace_expr({c + ExprInt32(0x42): d, +print x.replace_expr({c + ExprInt(0x42, 32): d, a + b: c, }) -print z.replace_expr({c + ExprInt32(0x42): d, +print z.replace_expr({c + ExprInt(0x42, 32): d, a + b: c, }) |