Base.replace cannot work on Bool
francis0407 opened this issue · 0 comments
francis0407 commented
Description
import claripy
b = claripy.BoolS("b")
expr = claripy.If(b, claripy.BVV(2, 32), claripy.BVV(3, 32))
new_expr = expr.replace(b, claripy.BoolV(True))
Error:
@staticmethod
41 def _check_replaceability(old, new):
---> 42 if old.size() != new.size():
43 raise ClaripyOperationError('replacements must have matching sizes')
AttributeError: size
Current workaround:
new_expr = expr.replace_dict({b.cache_key: claripy.BoolV(True)})
Steps to reproduce the bug
No response
Environment
No response
Additional context
No response