Skip to content

Commit

Permalink
fix: broken references to mk_add and mk_mul (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
karmacoma-eth committed Jul 24, 2023
1 parent 0b0a3c0 commit a740005
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def arith(self, ex: Exec, op: int, w1: Word, w2: Word) -> Word:
if is_bv_value(w1) and is_bv_value(w2):
return w1 + w2
else:
return mk_add(w1, w2)
return self.mk_add(w1, w2)
elif op == EVM.SUB:
if self.options.get("sub"):
return w1 - w2
Expand All @@ -1117,17 +1117,17 @@ def arith(self, ex: Exec, op: int, w1: Word, w2: Word) -> Word:
elif is_power_of_two(i1):
return w2 << int(math.log(i1, 2))
else:
return mk_mul(w1, w2)
return self.mk_mul(w1, w2)
elif is_bv_value(w2):
i2: int = int(str(w2)) # must be concrete
if i2 == 0:
return w2
elif is_power_of_two(i2):
return w1 << int(math.log(i2, 2))
else:
return mk_mul(w1, w2)
return self.mk_mul(w1, w2)
else:
return mk_mul(w1, w2)
return self.mk_mul(w1, w2)
elif op == EVM.DIV:
div_for_overflow_check = self.div_xy_y(w1, w2)
if div_for_overflow_check is not None: # xy/x or xy/y
Expand Down

0 comments on commit a740005

Please sign in to comment.