module greed.state


class SymbolicEVMState

This class represents a symbolic EVM state (SimState).

method __init__

__init__(
    xid,
    project,
    partial_init=False,
    init_ctx=None,
    options=None,
    max_calldatasize=None,
    partial_concrete_storage=False
)

Args:

  • xid: The execution id
  • project: the greed project
  • partial_init: Whether to partially initialize the object or not
  • init_ctx: The initial context of the state (e.g., CALLER, ADDRESS, BALANCE, etc.)
  • options: The options for this state
  • max_calldatasize: The maximum size of the calldata
  • partial_concrete_storage: Whether to use the partial concrete storage or not

property constraints


property curr_stmt


property pc


method add_constraint

add_constraint(constraint)

This method adds a constraint to the state.


method copy

copy()

Deep copy of the SimState.


method get_fallthrough_pc

get_fallthrough_pc()

This method returns the fallthrough pc of the current state


method get_non_fallthrough_pc

get_non_fallthrough_pc(destination_val)

This method returns the non fallthrough pc of the current state.


method register_plugin

register_plugin(name: str, plugin: SimStatePlugin)

This method registers a plugin to the state.


method reset

reset(xid)

This method resets the state.


method set_init_ctx

set_init_ctx(init_ctx=None)

This method applies the initial context to the state.

Args:

  • init_ctx: A dict storing the initial context of the state (e.g., CALLER, ADDRESS, BALANCE, etc.)

method set_next_pc

set_next_pc()

This method sets the next pc to the state.

Raises:

  • VMNoSuccessors: If there are no successors
  • VMUnexpectedSuccessors: If the successor does not match any of the expected successors

This file was automatically generated via lazydocs.