mythril.laser.ethereum.strategy package¶
Subpackages¶
Submodules¶
mythril.laser.ethereum.strategy.basic module¶
This module implements basic symbolic execution search strategies.
-
class
mythril.laser.ethereum.strategy.basic.
BreadthFirstSearchStrategy
(work_list, max_depth, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
Implements a breadth first search strategy I.E.
Execute all states of a “level” before continuing
-
class
mythril.laser.ethereum.strategy.basic.
DepthFirstSearchStrategy
(work_list, max_depth, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
Implements a depth first search strategy I.E.
Follow one path to a leaf, and then continue to the next one
-
class
mythril.laser.ethereum.strategy.basic.
ReturnRandomNaivelyStrategy
(work_list, max_depth, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
chooses a random state from the worklist with equal likelihood.
-
class
mythril.laser.ethereum.strategy.basic.
ReturnWeightedRandomStrategy
(work_list, max_depth, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
chooses a random state from the worklist with likelihood based on inverse proportion to depth.
mythril.laser.ethereum.strategy.beam module¶
-
class
mythril.laser.ethereum.strategy.beam.
BeamSearch
(work_list, max_depth, beam_width, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
chooses a random state from the worklist with equal likelihood.
mythril.laser.ethereum.strategy.concolic module¶
-
class
mythril.laser.ethereum.strategy.concolic.
ConcolicStrategy
(work_list: List[mythril.laser.ethereum.state.global_state.GlobalState], max_depth: int, trace: List[List[Tuple[int, str]]], flip_branch_addresses: List[str])[source]¶ Bases:
mythril.laser.ethereum.strategy.CriterionSearchStrategy
Executes program concolically using the input trace till a specific branch
-
class
mythril.laser.ethereum.strategy.concolic.
TraceAnnotation
(trace=None)[source]¶ Bases:
mythril.laser.ethereum.state.annotation.StateAnnotation
This is the annotation used by the ConcolicStrategy to store concolic traces.
-
persist_over_calls
¶ If this function returns true then laser will propagate the annotation between calls
The default is set to False
-