mythril.laser.plugin.plugins.coverage package¶
Submodules¶
mythril.laser.plugin.plugins.coverage.coverage_plugin module¶
-
class
mythril.laser.plugin.plugins.coverage.coverage_plugin.
CoveragePluginBuilder
[source]¶ Bases:
mythril.laser.plugin.builder.PluginBuilder
-
name
= 'coverage'¶
-
-
class
mythril.laser.plugin.plugins.coverage.coverage_plugin.
InstructionCoveragePlugin
[source]¶ Bases:
mythril.laser.plugin.interface.LaserPlugin
This plugin measures the instruction coverage of mythril. The instruction coverage is the ratio between the instructions that have been executed and the total amount of instructions.
Note that with lazy constraint solving enabled that this metric will be “unsound” as reachability will not be considered for the calculation of instruction coverage.
mythril.laser.plugin.plugins.coverage.coverage_strategy module¶
-
class
mythril.laser.plugin.plugins.coverage.coverage_strategy.
CoverageStrategy
(super_strategy: mythril.laser.ethereum.strategy.BasicSearchStrategy, instruction_coverage_plugin: mythril.laser.plugin.plugins.coverage.coverage_plugin.InstructionCoveragePlugin)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
Implements a instruction coverage based search strategy
This strategy is quite simple and effective, it prioritizes the execution of instructions that have previously been uncovered. Once there is no such global state left in the work list, it will resort to using the super_strategy.
This strategy is intended to be used “on top of” another one