Public Member Functions | |
def | __init__ |
def | __eq__ |
def | __cmp__ |
def | is_head |
def | copy |
def | extend |
def | heads |
def | label |
def | history |
def | cache |
def | pending |
def | clean_modifiers_in_cache |
def | as_graph |
def | filter_used_nodes |
def | filter_unmodifier_loops |
Public Attributes | |
cache | |
label | |
Private Member Functions | |
def | _get_modifiers_in_cache |
def | _build_depgraph |
def | _non_modifier_in_loop |
Private Attributes | |
_label | |
_history | |
_pending | |
_cache | |
Static Private Attributes | |
list | __slots__ = ["_label", "_history", "_pending", "_cache"] |
Internal structure for the DependencyGraph algorithm
Definition at line 164 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.__init__ | ( | self, | |
label, | |||
history | |||
) |
Create a DependencyDict @label: asm_label, current IRblock label @history: list of DependencyDict
Definition at line 169 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.__cmp__ | ( | self, | |
depdict | |||
) |
Definition at line 187 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.__eq__ | ( | self, | |
depdict | |||
) |
Definition at line 181 of file depgraph.py.
|
private |
Recursively build the final list of DiGraph, and clean up unmodifier nodes @depnode: starting node
Definition at line 304 of file depgraph.py.
|
private |
Find modifier nodes in cache starting from @nodes_heads. Returns new cache
Definition at line 251 of file depgraph.py.
|
private |
Walk from @depnode until a node with the same nostep_repr is encountered. Returns a set of unmodifier nodes met in the path if no modifier was found. Returns set() if there exist a modifier node on the path.
Definition at line 429 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.as_graph | ( | self, | |
starting_nodes | |||
) |
Return a DiGraph corresponding to computed dependencies, with @starting_nodes as leafs @starting_nodes: set of DependencyNode instance
Definition at line 340 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.cache | ( | self | ) |
Definition at line 241 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.clean_modifiers_in_cache | ( | self, | |
node_heads | |||
) |
Remove intermediary states (non modifier depnodes) in the internal cache values
Definition at line 298 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.copy | ( | self | ) |
Definition at line 200 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.extend | ( | self, | |
label | |||
) |
Return a copy of itself, with itself in history and pending clean @label: asm_label instance for the new DependencyDict's label
Definition at line 214 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.filter_unmodifier_loops | ( | self, | |
implicit, | |||
irdst | |||
) |
Remove unmodifier node creating dependency loops over pending elements in cache. @implicit: boolean @irdst: ExprId instance of IRDst register
Definition at line 385 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.filter_used_nodes | ( | self, | |
node_heads | |||
) |
Keep only depnodes which are in the path of @node_heads in the internal cache @node_heads: set of DependencyNode instance
Definition at line 360 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.heads | ( | self | ) |
Return an iterator on the list of heads as defined in 'is_head'
Definition at line 223 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.history | ( | self | ) |
List of DependencyDict needed to reach the current DependencyDict The first is the oldest
Definition at line 235 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.is_head | ( | self, | |
depnode | |||
) |
Return True iff @depnode is at the head of the current block @depnode: DependencyNode instance
Definition at line 194 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.label | ( | self | ) |
Definition at line 230 of file depgraph.py.
def miasm2.analysis.depgraph.DependencyDict.pending | ( | self | ) |
Dictionnary of DependencyNode and their dependencies, waiting for resolution
Definition at line 246 of file depgraph.py.
|
staticprivate |
Definition at line 167 of file depgraph.py.
|
private |
Definition at line 179 of file depgraph.py.
|
private |
Definition at line 175 of file depgraph.py.
|
private |
Definition at line 174 of file depgraph.py.
|
private |
Definition at line 176 of file depgraph.py.
miasm2.analysis.depgraph.DependencyDict.cache |
Definition at line 185 of file depgraph.py.
miasm2.analysis.depgraph.DependencyDict.label |
Definition at line 197 of file depgraph.py.