(self, ail_graph: networkx.DiGraph, remove_dead_memdefs=False, stack_pointer_tracker=None)
return ail_graph
Simplify all blocks in self._blocks.

        :param ail_graph:               The AIL function graph.
        :param stack_pointer_tracker:   The RegisterDeltaTracker analysis instance.
        :return:                        None
Simplify all blocks in self._blocks.
Simplify all blocks in self . _blocks .
def _simplify_blocks(self, ail_graph: networkx.DiGraph, remove_dead_memdefs=False, stack_pointer_tracker=None):
        """
        Simplify all blocks in self._blocks.

        :param ail_graph:               The AIL function graph.
        :param stack_pointer_tracker:   The RegisterDeltaTracker analysis instance.
        :return:                        None
        """

        blocks_by_addr_and_idx: Dict[Tuple[int,Optional[int]],ailment.Block] = { }

        for ail_block in ail_graph.nodes():
            simplified = self._simplify_block(ail_block, remove_dead_memdefs=remove_dead_memdefs,
                                              stack_pointer_tracker=stack_pointer_tracker)
            key = ail_block.addr, ail_block.idx
            blocks_by_addr_and_idx[key] = simplified

        # update blocks_map to allow node_addr to node lookup
        def _replace_node_handler(node):
            key = node.addr, node.idx
            if key in blocks_by_addr_and_idx:
                return blocks_by_addr_and_idx[key]
            return None

        AILGraphWalker(ail_graph, _replace_node_handler, replace_nodes=True).walk()

        return ail_graph
def _simplify_blocks ( self , ail_graph : networkx . DiGraph , remove_dead_memdefs = False , stack_pointer_tracker = None ) : blocks_by_addr_and_idx : Dict [ Tuple [ int , Optional [ int ] ] , ailment . Block ] = { } for ail_block in ail_graph . nodes ( ) : simplified = self . _simplify_block ( ail_block , remove_dead_memdefs = remove_dead_memdefs , stack_pointer_tracker = stack_pointer_tracker ) key = ail_block . addr , ail_block . idx blocks_by_addr_and_idx [ key ] = simplified # update blocks_map to allow node_addr to node lookup def _replace_node_handler ( node ) : key = node . addr , node . idx if key in blocks_by_addr_and_idx : return blocks_by_addr_and_idx [ key ] return None AILGraphWalker ( ail_graph , _replace_node_handler , replace_nodes = True ) . walk ( ) return ail_graph