Add a basic custom strategy

pull/1060/head
Bernhard Mueller 6 years ago
parent 317f647b50
commit 0f260ddb6c
  1. 1
      mythril/analysis/symbolic.py
  2. 19
      mythril/laser/ethereum/strategy/custom.py

@ -15,6 +15,7 @@ from mythril.laser.ethereum.strategy.basic import (
ReturnRandomNaivelyStrategy,
ReturnWeightedRandomStrategy,
BasicSearchStrategy,
)
from mythril.laser.smt import symbol_factory, BitVec
from typing import Union, List, Dict, Type

@ -0,0 +1,19 @@
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.ethereum.strategy.basic import BreadthFirstSearchStrategy
class BFSBoundedLoopsStrategy(BreadthFirstSearchStrategy):
"""Implements a breadth first search strategy that prunes loops.
"""
def __init__(self):
pass
def get_strategic_global_state(self) -> GlobalState:
"""
:return:
"""
state = self.work_list.pop(0)
return state
Loading…
Cancel
Save