Fix type stuff

pull/1121/head
Bernhard Mueller 5 years ago
parent 5c4c1e7ca3
commit 36ccfac6cb
  1. 4
      mythril/laser/ethereum/instructions.py
  2. 4
      mythril/laser/smt/__init__.py

@ -553,7 +553,7 @@ class Instruction:
+ str(hash(simplify(exponent))) + str(hash(simplify(exponent)))
+ ")", + ")",
256, 256,
base.annotations + exponent.annotations, base.annotations.union(exponent.annotations),
) )
) # Hash is used because str(symbol) takes a long time to be converted to a string ) # Hash is used because str(symbol) takes a long time to be converted to a string
else: else:
@ -925,7 +925,7 @@ class Instruction:
if data.symbolic: if data.symbolic:
annotations = set() annotations = set() # Type: Set
for b in state.memory[index : index + length]: for b in state.memory[index : index + length]:
if isinstance(b, BitVec): if isinstance(b, BitVec):

@ -22,11 +22,11 @@ from mythril.laser.smt.array import K, Array, BaseArray
from mythril.laser.smt.solver import Solver, Optimize, SolverStatistics from mythril.laser.smt.solver import Solver, Optimize, SolverStatistics
from mythril.laser.smt.model import Model from mythril.laser.smt.model import Model
from typing import Union, Any, Optional, List, TypeVar, Generic from typing import Union, Any, Optional, Set, TypeVar, Generic
import z3 import z3
Annotations = Optional[List[Any]] Annotations = Optional[Set[Any]]
T = TypeVar("T", bound=Union[bool.Bool, z3.BoolRef]) T = TypeVar("T", bound=Union[bool.Bool, z3.BoolRef])
U = TypeVar("U", bound=Union[BitVec, z3.BitVecRef]) U = TypeVar("U", bound=Union[BitVec, z3.BitVecRef])

Loading…
Cancel
Save