use plugin loader and factory

This removes the dependency between the actual implementations of plugins
and other parts of mythril
pull/983/head
Joran Honig 6 years ago
parent e7cc359de2
commit dca04b11ac
  1. 10
      mythril/analysis/symbolic.py

@ -12,9 +12,9 @@ from mythril.laser.ethereum.strategy.basic import (
ReturnWeightedRandomStrategy,
)
from mythril.laser.ethereum.plugins.implementations.mutation_pruner import (
MutationPruner,
)
from mythril.laser.ethereum.plugins.plugin_factory import PluginFactory
from mythril.laser.ethereum.plugins.plugin_loader import LaserPluginLoader
from mythril.solidity.soliditycontract import EVMContract, SolidityContract
from .ops import Call, SStore, VarType, get_variable
@ -86,9 +86,9 @@ class SymExecWrapper:
requires_statespace=requires_statespace,
enable_iprof=enable_iprof,
)
mutation_plugin = MutationPruner()
mutation_plugin.initialize(self.laser)
plugin_loader = LaserPluginLoader(self.laser)
plugin_loader.load(PluginFactory.build_mutation_pruner_plugin())
self.laser.register_hooks(
hook_type="pre",

Loading…
Cancel
Save