class documentation

class SSA: (source)

Constructor: SSA(src)

View In Hierarchy

Build SSA graph from a given AST node based on the CFG.

Method __init__ No summary
Method backward_query_new Undocumented
Method compute_dom_old Undocumented
Method compute_idom Undocumented
Method compute_undefined_names generate undefined names from given cfg
Method flatten_tuple input: ast tuple object return a list of elements in the given tuple
Method get_attribute_stmts Undocumented
Method get_global_live_vars Undocumented
Method get_identifiers Extract all identifiers from the given AST node.
Method get_stmt_idents_ctx Undocumented
Method hit_scope Undocumented
Method is_undefined Undocumented
Method print_block Undocumented
Method RD Undocumented
Method to_json Undocumented
Instance Variable block_ident_gen Undocumented
Instance Variable block_ident_use Undocumented
Instance Variable dom Undocumented
Instance Variable error_paths Undocumented
Instance Variable global_live_idents Undocumented
Instance Variable global_names Undocumented
Instance Variable m_node Undocumented
Instance Variable module_ast Undocumented
Instance Variable numbering Undocumented
Instance Variable reachable_table Undocumented
Instance Variable src Undocumented
Instance Variable ssa_blocks Undocumented
Instance Variable undefined_names_from Undocumented
Instance Variable unreachable_names Undocumented
Instance Variable var_values Undocumented
def __init__(self, src): (source)
Parameters
srcthe source code as input.
def backward_query_new(self, block, ident_name, visited, path=[], dom={}, idom={}, dom_stmt_res=[], block_ident_gen={}, block_ident_del={}, condition_cons=None, entry_id=1): (source)

Undocumented

def compute_dom_old(self, ssa_blocks): (source)

Undocumented

def compute_idom(self, ssa_blocks): (source)

Undocumented

def compute_undefined_names(self, cfg, scope=['mod']): (source)

generate undefined names from given cfg

def flatten_tuple(ast_tuple): (source)

input: ast tuple object return a list of elements in the given tuple

def get_attribute_stmts(self, stmts): (source)

Undocumented

def get_global_live_vars(self): (source)

Undocumented

def get_identifiers(self, ast_node): (source)

Extract all identifiers from the given AST node.

Parameters
ast_nodeAST node.
def get_stmt_idents_ctx(self, stmt, del_set=[]): (source)

Undocumented

def hit_scope(self, ident_name, block_ident_gen, block_ident_unorder): (source)

Undocumented

def is_undefined(self, load_idents): (source)

Undocumented

def print_block(self, block): (source)

Undocumented

def RD(self, cfg_blocks): (source)

Undocumented

def to_json(self): (source)

Undocumented

block_ident_gen: dict = (source)

Undocumented

block_ident_use: dict = (source)

Undocumented

Undocumented

error_paths: dict = (source)

Undocumented

global_live_idents: list = (source)

Undocumented

global_names: list = (source)

Undocumented

Undocumented

module_ast = (source)

Undocumented

numbering: dict = (source)

Undocumented

reachable_table: dict = (source)

Undocumented

Undocumented

ssa_blocks: list = (source)

Undocumented

undefined_names_from: dict = (source)

Undocumented

unreachable_names: dict = (source)

Undocumented

var_values: dict = (source)

Undocumented