mythril.laser.ethereum.strategy.extensions package

Submodules

mythril.laser.ethereum.strategy.extensions.bounded_loops module

class mythril.laser.ethereum.strategy.extensions.bounded_loops.BoundedLoopsStrategy(super_strategy: BasicSearchStrategy, **kwargs)[source]

Bases: BasicSearchStrategy

Adds loop pruning to the search strategy. Ignores JUMPI instruction if the destination was targeted >JUMPDEST_LIMIT times.

static calculate_hash(i: int, j: int, trace: List[int]) int[source]

calculate hash(trace[i: j]) :param i: :param j: :param trace: :return: hash(trace[i: j])

static count_key(trace: List[int], key: int, start: int, size: int) int[source]

Count continuous loops in the trace. :param trace: :param key: :param size: :return:

static get_loop_count(trace: List[int]) int[source]

Gets the loop count :param trace: annotation trace :return:

get_strategic_global_state() GlobalState[source]

Returns the next state

Returns:

Global state

class mythril.laser.ethereum.strategy.extensions.bounded_loops.JumpdestCountAnnotation[source]

Bases: StateAnnotation

State annotation that counts the number of jumps per destination.

Module contents