Ejemplo n.º 1
0
def _extract_edges(cfg: ControlFlowGraph) -> List[List[List[str]]]:
    edges = [[edge.source.statements, edge.target.statements]
             for edge in cfg.get_edges()]
    expanded_edges = [[[source.as_string() for source in edge[0]],
                       [target.as_string() for target in edge[1]]]
                      for edge in edges]
    return expanded_edges
Ejemplo n.º 2
0
def _extract_blocks(cfg: ControlFlowGraph) -> List[List[str]]:
    return [[s.as_string() for s in block.statements]
            for block in cfg.get_blocks()]