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:
PluginBuilder
- name = 'coverage'
- class mythril.laser.plugin.plugins.coverage.coverage_plugin.InstructionCoveragePlugin[source]
Bases:
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: BasicSearchStrategy, instruction_coverage_plugin: InstructionCoveragePlugin)[source]
Bases:
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
- get_strategic_global_state() GlobalState [source]
Returns the first uncovered global state in the work list if it exists, otherwise super_strategy.get_strategic_global_state() is returned.