fdg.preprocessing package
Submodules
fdg.preprocessing.address_collection module
fdg.preprocessing.instruction_coverage module
- class fdg.preprocessing.instruction_coverage.InstructionCoverage(functions: list)[source]
Bases:
object
- collect_function_instructions(global_state: GlobalState)[source]
- print_state_info(global_state: GlobalState, opcode: str, given_opcode: str | None = None, target_function: str | None = None)[source]
- update_coverage(global_state: GlobalState, opcode: str)[source]
fdg.preprocessing.preprocess module
- class fdg.preprocessing.preprocess.Preprocessing(method_identifiers: dict, state, contract_address)[source]
Bases:
object
- fdg.preprocessing.preprocess.log = <Logger fdg.preprocessing.preprocess (WARNING)>[source]
- For each function:
need to collect conditions instruction indices read/write slots
expression to slot map (can not simplify expression, because the slot information can be lost if the expression can simplified to a concrete value.
concrete addresses used in the contract, which may be used to check against msg.sender which is implemented an array of three concrete addresses by default
fdg.preprocessing.read_in_conditions module
- class fdg.preprocessing.read_in_conditions.ReadInCondition(functions: list)[source]
Bases:
object
- collect_conditions(state: GlobalState)[source]
extract the location(slot) of the storage read in conditions :param state: :return:
fdg.preprocessing.write_read_info module
- class fdg.preprocessing.write_read_info.Function_Write_Read_Info(all_functions: list)[source]
Bases:
object
- update_sload(state: GlobalState)[source]
read locations from address note: from an address (instruction) different state variables can be read at differnt loops :param state: :return:
- update_sstore(state: GlobalState)[source]
get write location note: from an address (instruction), different state variables can be written in different loops.
- Parameters:
state
- Returns: