angr/analyses/cfg/cfg_utils.py
def reverse_post_order_sort_nodes(graph, nodes=None):
        """
        Sort a given set of nodes in reverse post ordering.

        :param networkx.DiGraph graph: A local transition graph of a function.
        :param iterable nodes: A collection of nodes to sort.
        :return: A list of sorted nodes.
        :rtype: list
        """

        post_order = networkx.dfs_postorder_nodes(graph)

        if nodes is None:
            return reversed(list(post_order))

        addrs_to_index = {}
        for i, n in enumerate(post_order):
            addrs_to_index[n.addr] = i
        return sorted(nodes, key=lambda n: addrs_to_index[n.addr], reverse=True)

        Sort a given set of nodes in reverse post ordering.

        :param networkx.DiGraph graph: A local transition graph of a function.
        :param iterable nodes: A collection of nodes to sort.
        :return: A list of sorted nodes.
        :rtype: list
        
Sort a given set of nodes in reverse post ordering.
Sort a given set of nodes in reverse post ordering .
def reverse_post_order_sort_nodes(graph, nodes=None):
        post_order = networkx.dfs_postorder_nodes(graph)
        if nodes is None:
            return reversed(list(post_order))
        addrs_to_index = {}
        for i, n in enumerate(post_order):
            addrs_to_index[n.addr] = i
        return sorted(nodes, key=lambda n: addrs_to_index[n.addr], reverse=True)
def reverse_post_order_sort_nodes ( graph , nodes = None ) : post_order = networkx . dfs_postorder_nodes ( graph ) if nodes is None : return reversed ( list ( post_order ) ) addrs_to_index = { } for i , n in enumerate ( post_order ) : addrs_to_index [ n . addr ] = i return sorted ( nodes , key = lambda n : addrs_to_index [ n . addr ] , reverse = True )
Sort a given set of nodes in reverse post ordering.
Sort a given set of nodes in reverse post ordering .
"""
        Sort a given set of nodes in reverse post ordering.

        :param networkx.DiGraph graph: A local transition graph of a function.
        :param iterable nodes: A collection of nodes to sort.
        :return: A list of sorted nodes.
        :rtype: list
        """
A list of sorted nodes.
A list of sorted nodes .
list
graph
A local transition graph of a function.
A local transition graph of a function .
nodes
A collection of nodes to sort.
A collection of nodes to sort .