miasm
Reverse engineering framework
miasm.analysis.data_flow.PropagateExpressions Class Reference
Inheritance diagram for miasm.analysis.data_flow.PropagateExpressions:
Collaboration diagram for miasm.analysis.data_flow.PropagateExpressions:

Public Member Functions

def merge_prev_states (self, ircfg, states, loc_key)
 
def update_state (self, irblock, state)
 
def propagate (self, ssa, head, max_expr_depth=None)
 

Static Public Member Functions

def new_state ()
 

Public Attributes

 loc_db
 

Detailed Description

Propagate expressions

The algorithm propagates equivalence classes expressions from the entry
point. During the analyse, we replace source nodes by its equivalence
classes representative. Equivalence classes can be modified during analyse
due to memory aliasing.

For example:
B = A+1
C = A
A = 6
D = [B]

Will result in:
B = A+1
C = A
A = 6
D = [C+1]

Member Function Documentation

◆ merge_prev_states()

def miasm.analysis.data_flow.PropagateExpressions.merge_prev_states (   self,
  ircfg,
  states,
  loc_key 
)
Merge predecessors states of irblock at location @loc_key
@ircfg: IRCfg instance
@sates: Dictionary linking locations to state
@loc_key: location of the current irblock
Here is the call graph for this function:

◆ new_state()

def miasm.analysis.data_flow.PropagateExpressions.new_state ( )
static
Here is the caller graph for this function:

◆ propagate()

def miasm.analysis.data_flow.PropagateExpressions.propagate (   self,
  ssa,
  head,
  max_expr_depth = None 
)
Apply algorithm on the @ssa graph

◆ update_state()

def miasm.analysis.data_flow.PropagateExpressions.update_state (   self,
  irblock,
  state 
)
Propagate the @state through the @irblock
@irblock: IRBlock instance
@state: State instance

Member Data Documentation

◆ loc_db

miasm.analysis.data_flow.PropagateExpressions.loc_db

The documentation for this class was generated from the following file: