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

Public Member Functions

def __init__ (self, reaching_defs, deref_mem=False, apply_simp=False, *args, **kwargs)
 
def edge_attr (self, src, dst)
 
def del_edge (self, src, dst)
 
def add_uniq_labeled_edge (self, src, dst, edge_label)
 
def add_data_edge (self, src, dst)
 
def node2lines (self, node)
 
- Public Member Functions inherited from miasm.core.graph.DiGraph
def __init__ (self)
 
def __repr__ (self)
 
def nodes (self)
 
def edges (self)
 
def merge (self, graph)
 
def __add__ (self, graph)
 
def copy (self)
 
def __eq__ (self, graph)
 
def __ne__ (self, other)
 
def add_node (self, node)
 
def del_node (self, node)
 
def add_edge (self, src, dst)
 
def add_uniq_edge (self, src, dst)
 
def discard_edge (self, src, dst)
 
def predecessors_iter (self, node)
 
def predecessors (self, node)
 
def successors_iter (self, node)
 
def successors (self, node)
 
def leaves_iter (self)
 
def leaves (self)
 
def heads_iter (self)
 
def heads (self)
 
def find_path (self, src, dst, cycles_count=0, done=None)
 
def find_path_from_src (self, src, dst, cycles_count=0, done=None)
 
def nodeid (self, node)
 
def node_attr (self, node)
 
def dot (self)
 
def predecessors_stop_node_iter (self, node, head)
 
def reachable_sons (self, head)
 
def reachable_parents (self, leaf)
 
def reachable_parents_stop_node (self, leaf, head)
 
def compute_dominators (self, head)
 
def compute_postdominators (self, leaf)
 
def compute_dominator_tree (self, head)
 
def walk_dominators (self, node, dominators)
 
def walk_postdominators (self, node, postdominators)
 
def compute_immediate_dominators (self, head)
 
def compute_immediate_postdominators (self, tail)
 
def compute_dominance_frontier (self, head)
 
def walk_breadth_first_forward (self, head)
 
def walk_depth_first_forward (self, head)
 
def walk_breadth_first_backward (self, head)
 
def walk_depth_first_backward (self, head)
 
def has_loop (self)
 
def compute_natural_loops (self, head)
 
def compute_back_edges (self, head)
 
def compute_strongly_connected_components (self)
 
def compute_weakly_connected_components (self)
 
def replace_node (self, node, new_node)
 

Additional Inherited Members

- Static Public Attributes inherited from miasm.core.graph.DiGraph
 DotCellDescription
 

Detailed Description

Representation of a Use-Definition graph as defined by
Kennedy, K. (1979). A survey of data flow analysis techniques.
IBM Thomas J. Watson Research Division.
Example:
IR block:
lbl0:
   0 A = 1
     B = 3
   1 B = 2
   2 A = A + B + 4

Def use analysis:
(lbl0, 0, A) => {(lbl0, 2, A)}
(lbl0, 0, B) => {}
(lbl0, 1, B) => {(lbl0, 2, A)}
(lbl0, 2, A) => {}

Constructor & Destructor Documentation

◆ __init__()

def miasm.analysis.data_flow.DiGraphDefUse.__init__ (   self,
  reaching_defs,
  deref_mem = False,
  apply_simp = False,
args,
**  kwargs 
)
Instantiate a DiGraph
@blocks: IR blocks
Here is the call graph for this function:

Member Function Documentation

◆ add_data_edge()

def miasm.analysis.data_flow.DiGraphDefUse.add_data_edge (   self,
  src,
  dst 
)
Adds an edge representing a data dependency
and sets the label accordingly
Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_uniq_labeled_edge()

def miasm.analysis.data_flow.DiGraphDefUse.add_uniq_labeled_edge (   self,
  src,
  dst,
  edge_label 
)
Adds the edge (@src, @dst) with label @edge_label.
if edge (@src, @dst) already exists, the previous label is overridden
Here is the call graph for this function:
Here is the caller graph for this function:

◆ del_edge()

def miasm.analysis.data_flow.DiGraphDefUse.del_edge (   self,
  src,
  dst 
)

Reimplemented from miasm.core.graph.DiGraph.

Here is the caller graph for this function:

◆ edge_attr()

def miasm.analysis.data_flow.DiGraphDefUse.edge_attr (   self,
  src,
  dst 
)
Return a dictionary of attributes for the edge between @src and @dst
@src: the source node of the edge
@dst: the destination node of the edge

Reimplemented from miasm.core.graph.DiGraph.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ node2lines()

def miasm.analysis.data_flow.DiGraphDefUse.node2lines (   self,
  node 
)
Returns an iterator on cells of the dot @node.
A DotCellDescription or a list of DotCellDescription are accepted
@node: a node of the graph

Reimplemented from miasm.core.graph.DiGraph.

Here is the caller graph for this function:

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