implement summary entry function

feature/summary
Joran Honig 5 years ago
parent 677d2eff9f
commit 2b22c4447b
  1. 19
      mythril/laser/ethereum/plugins/implementations/summary/core.py

@ -61,7 +61,24 @@ class SymbolicSummaryPlugin(LaserPlugin):
:param global_state: The state at the entry of the symbolic summary :param global_state: The state at the entry of the symbolic summary
""" """
pass storage_pairs = []
storage_constraints = []
for index, account in global_state.world_state.accounts.items():
actual_storage = account.storage._standard_storage
symbolic_storage = Array(f"{index}_symbolic_storage", 256, 256)
account.storage._standard_storage = symbolic_storage
storage_pairs.append((actual_storage, symbolic_storage))
storage_constraints.append(actual_storage == symbolic_storage)
summary_annotation = SummaryTrackingAnnotation(
global_state,
storage_pairs,
storage_constraints
)
for constraint in storage_constraints:
global_state.mstate.constraints.append(constraint)
global_state.annotate(summary_annotation)
def summary_exit(self, global_state: GlobalState): def summary_exit(self, global_state: GlobalState):
""" Handles logic for when the analysis reaches the summary exit """ Handles logic for when the analysis reaches the summary exit

Loading…
Cancel
Save