Add ops classes

pull/23/head
Bernhard Mueller 7 years ago
parent eef332026c
commit 41ac44f82a
  1. 40
      mythril/analysis/ops.py
  2. 6
      mythril/analysis/symbolic.py

@ -1,18 +1,46 @@
class Call: from enum import Enum
def __init__(self, block_uid, addr, call_type, to, value):
class VarType(Enum):
SYMBOLIC = 1
CONCRETE = 2
class Variable:
def __init__(self, value, _type):
self.value = value
self.type = _type
def __str__(self):
return str(self.value)
class Op:
def __init__(self, block_uid, addr):
self.block_uid = block_uid self.block_uid = block_uid
self.addr = addr self.addr = addr
class Call(Op):
def __init__(self, block_uid, addr, call_type, to, value):
super(block_uid, addr)
self.to = to self.to = to
self.call_type = call_type self.call_type = call_type
self.value = value self.call_value = value
class SStore(Op):
class SStore:
def __init__(self, block_uid, addr, index, value): def __init__(self, block_uid, addr, index, value):
super(block_uid, addr)
self.index = index self.index = index
self.value = value self.value = value
class SLoad: class SLoad(Op):
def __init__(self, index, value):
def __init__(self, block_uid, addr, index, value):
super(block_uid, addr)
self.index = index self.index = index
self.value = value self.value = value

@ -28,4 +28,10 @@ class StateSpace:
# Analysis # Analysis
self.calls = []
self.sstores = {}
self.sloads = {}
for node in _svm.nodes:
for instruction in node.instruction_list:
logging.info(instruction)
Loading…
Cancel
Save