angr.analyses.decompiler.dephication

class angr.analyses.decompiler.dephication.GraphDephication

Bases: DephicationBase

GraphDephication removes phi expressions from an AIL graph, essentially transforms a partial-SSA form of AIL graph to a normal AIL graph.

__init__(func, ail_graph, vvar_to_vvar_mapping=None, rewrite=False, variable_kb=None)
Parameters:
  • func (Function | str) – The subject of the analysis: a function, or a single basic block

  • ail_graph – The AIL graph to transform.

  • vvar_to_vvar_mapping (dict[int, int] | None)

  • rewrite (bool)

  • variable_kb (KnowledgeBase | None)

class angr.analyses.decompiler.dephication.GraphDephicationVVarMapping

Bases: Analysis

GraphDephicationVVarMapping collects information from an AIL graph regarding how virtual variables should be mapped to each other in order to remove phi variables. This mapping will later be used to transform a partial-SSA form of AIL graph to a conventional AIL graph.

This class largely implements “Translating Out of Static Single Assignment Form” by Sreedhar et al.

__init__(func, ail_graph, ail_manager, entry=None, vvar_id_start=0, arg_vvars=None)
Parameters:
  • func (Function | str) – The subject of the analysis: a function, or a single basic block

  • ail_graph – The AIL graph to transform.

  • ail_manager (Manager)

  • vvar_id_start (int)

  • arg_vvars (list[VirtualVariable] | None)

class angr.analyses.decompiler.dephication.SeqNodeDephication

Bases: DephicationBase

SeqNodeDephication removes phi expressions from a SequenceNode and its children. It also removes redundant variable assignments, e.g., vvar_2 = vvar_1 where both vvar_1 and vvar_2 are mapped to the same variable.

__init__(func, seq_node, vvar_to_vvar_mapping=None, rewrite=False, variable_kb=None)
Parameters:

Submodules