Module Expr Str ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Dict Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr TupleLoad Str NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareIn NameLoad NameLoad CompareNotIn NameLoad NameLoad body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Str NameLoad decorator_list Expr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad body If CompareEq NameLoad Str body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad body If CompareEq NameLoad Str body Delete SubscriptDel NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareLt SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Assign NameStore Dict While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad If CompareEq NameLoad NameLoad body Break Expr Yield NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore ListLoad Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse If CompareIsNot SubscriptLoad NameLoad Index NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice SubscriptLoad NameLoad Index NameLoad decorator_list Expr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body TryExcept body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Num For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad While NameLoad body AugAssignAdd NameStore Num Assign NameStore NameLoad Assign NameStore ListLoad For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareIn NameLoad NameLoad CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore NameLoad Index NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIn NameLoad NameLoad body Raise NameLoad If CompareIn NameLoad NameLoad body Delete SubscriptDel NameLoad Index NameLoad Expr Call NameLoad NameLoad Delete SubscriptDel NameLoad Index NameLoad decorator_list TryExcept body Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore Dict Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Call NameLoad While NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Assign NameStore NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Continue Assign NameStore Dict Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad ListLoad attr Call NameLoad NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad While NameLoad body Assign NameStore Num Assign NameStore NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareGt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Break Expr Yield NameLoad Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TupleLoad For NameStore NameLoad body AugAssignSub SubscriptStore NameLoad Index NameLoad Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Slice Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad Assert Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad While NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Continue Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad ListComp SubscriptLoad NameLoad Index AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body TryExcept body Assign NameStore ListComp TupleLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore NameLoad handlers ExceptHandler type NameLoad body Pass orelse Assign TupleStore NameStore NameStore Call NameLoad NameLoad Delete SubscriptDel NameLoad Index NameLoad Expr Yield NameLoad Assign NameStore NameLoad Assert Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpMod Str NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad keyword Call NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list decorator_list Expr Call AttributeLoad Call NameLoad attr decorator_list
N/A N/A 
Utilities to manipulate graphs (vertices and edges, not control flow graphs).

Convention:
  'vertices' is a set of vertices (or a dict with vertices as keys);
  'edges' is a dict mapping vertices to a list of edges with its source.
  Note that we can usually use 'edges' as the set of 'vertices' too.
 Edge N/A N/A __init__ N/A N/A self source target N/A N/A N/A N/A self source source N/A N/A self target target N/A __repr__ N/A N/A self N/A N/A N/A N/A %r -> %r N/A N/A self source N/A self target N/A N/A make_edge_dict N/A N/A edge_list N/A N/A N/A Put a list of edges in the official dict format. N/A edges N/A N/A edge edge_list N/A N/A N/A N/A N/A N/A edges setdefault N/A edge source N/A append edge N/A N/A N/A edges setdefault N/A edge target N/A N/A edges N/A depth_first_search N/A N/A root vertices edges N/A N/A N/A seen N/A N/A result N/A visit N/A N/A vertex N/A N/A N/A N/A N/A result append N/A start vertex N/A N/A seen N/A vertex True N/A edge N/A edges N/A vertex N/A N/A w N/A edge target N/A N/A N/A w vertices N/A w seen N/A N/A N/A visit w N/A N/A N/A result append N/A stop vertex N/A N/A N/A visit root N/A result N/A vertices_reachable_from N/A N/A root vertices edges N/A N/A N/A N/A event v N/A depth_first_search root vertices edges N/A N/A N/A event start N/A N/A N/A v N/A strong_components N/A N/A vertices edges N/A N/A N/A Enumerates the strongly connected components of a graph.  Each one is
    a set of vertices where any vertex can be reached from any other vertex by
    following the edges.  In a tree, all strongly connected components are
    sets of size 1; larger sets are unions of cycles.
     N/A component_root N/A N/A discovery_time N/A N/A remaining N/A N/A vertices copy N/A stack N/A N/A root vertices N/A N/A N/A root remaining N/A N/A N/A event v N/A depth_first_search root remaining edges N/A N/A N/A event start N/A N/A N/A remaining N/A v N/A N/A discovery_time N/A v N/A len discovery_time N/A N/A component_root N/A v v N/A N/A N/A stack append v N/A N/A vroot v N/A edge N/A edges N/A v N/A N/A w N/A edge target N/A N/A w component_root N/A N/A wroot N/A component_root N/A w N/A N/A N/A discovery_time N/A wroot N/A discovery_time N/A vroot N/A N/A vroot wroot N/A N/A vroot v N/A N/A component N/A N/A True N/A N/A w N/A N/A stack pop N/A N/A component_root N/A w N/A N/A component N/A w True N/A N/A w v N/A N/A N/A N/A component N/A N/A N/A component_root N/A v vroot N/A all_cycles N/A N/A root vertices edges N/A N/A N/A Enumerates cycles.  Each cycle is a list of edges.
    This may not give stricly all cycles if they are many intermixed cycles.
     N/A stackpos N/A N/A edgestack N/A N/A result N/A visit N/A N/A v N/A N/A N/A N/A v stackpos N/A N/A N/A stackpos N/A v N/A len edgestack N/A edge N/A edges N/A v N/A N/A N/A N/A edge target vertices N/A N/A N/A N/A edgestack append edge N/A N/A visit N/A edge target N/A N/A N/A edgestack pop N/A N/A stackpos N/A v None N/A N/A N/A N/A stackpos N/A v None N/A N/A N/A N/A result append N/A edgestack N/A N/A stackpos N/A v N/A N/A N/A visit root N/A result N/A find_roots N/A N/A vertices edges N/A N/A N/A Find roots, i.e. a minimal set of vertices such that all other
    vertices are reachable from them. N/A rep N/A N/A component N/A strong_components vertices edges N/A N/A N/A random_vertex _ N/A N/A component popitem N/A N/A rep N/A random_vertex random_vertex N/A v component N/A N/A N/A rep N/A v random_vertex N/A roots N/A set N/A N/A rep values N/A v vertices N/A N/A v1 N/A rep N/A v N/A edge N/A edges N/A v N/A N/A N/A N/A v2 N/A rep N/A N/A edge target N/A N/A v1 v2 N/A N/A N/A N/A roots remove v2 N/A N/A N/A KeyError N/A N/A N/A roots N/A compute_depths N/A N/A roots vertices edges N/A N/A N/A The 'depth' of a vertex is its minimal distance from any root. N/A depths N/A N/A curdepth 0 N/A v roots N/A N/A N/A depths N/A v 0 N/A pending N/A list roots N/A pending N/A N/A curdepth 1 N/A prev_generation pending N/A pending N/A N/A v prev_generation N/A N/A edge N/A edges N/A v N/A N/A v2 N/A edge target N/A N/A N/A v2 vertices N/A v2 depths N/A N/A N/A depths N/A v2 curdepth N/A N/A N/A pending append v2 N/A depths N/A is_acyclic N/A N/A vertices edges N/A N/A CycleFound N/A Exception N/A N/A N/A visit N/A N/A vertex N/A N/A N/A N/A visiting N/A vertex True N/A edge N/A edges N/A vertex N/A N/A w N/A edge target N/A N/A w visiting N/A N/A CycleFound N/A N/A w unvisited N/A N/A N/A unvisited N/A w N/A N/A visit w N/A N/A visiting N/A vertex N/A N/A N/A N/A unvisited N/A N/A vertices copy N/A unvisited N/A N/A visiting N/A N/A root N/A N/A N/A unvisited popitem N/A 0 N/A N/A visit root N/A N/A N/A CycleFound N/A N/A False N/A N/A True N/A break_cycles N/A N/A vertices edges N/A N/A N/A Enumerates a reasonably minimal set of edges that must be removed to
    make the graph acyclic. N/A remaining_edges N/A N/A edges copy N/A progress True N/A roots_finished N/A set N/A progress N/A N/A roots N/A list N/A find_roots vertices remaining_edges N/A progress False N/A root roots N/A N/A N/A root roots_finished N/A N/A N/A cycles N/A all_cycles root vertices remaining_edges N/A N/A cycles N/A N/A N/A N/A roots_finished add root N/A N/A allcycles N/A N/A edge2cycles N/A N/A cycle cycles N/A N/A N/A allcycles N/A N/A id cycle cycle N/A edge cycle N/A N/A N/A N/A N/A N/A edge2cycles setdefault edge N/A append N/A id cycle N/A edge_weights N/A N/A N/A edge cycle N/A N/A edge2cycles iteritems N/A N/A N/A edge_weights N/A edge N/A len cycle N/A allcycles N/A N/A max_weight 0 N/A max_edge None N/A N/A edge weight N/A N/A edge_weights iteritems N/A N/A N/A weight max_weight N/A N/A max_edge edge N/A max_weight weight N/A N/A max_edge None N/A N/A N/A N/A max_edge N/A progress True N/A broken_cycle_id N/A edge2cycles N/A max_edge N/A N/A broken_cycle N/A N/A allcycles pop broken_cycle_id N/A N/A edge broken_cycle N/A N/A N/A edge_weights N/A edge 1 N/A lst N/A N/A remaining_edges N/A N/A max_edge source N/A N/A N/A N/A lst remove max_edge N/A N/A remaining_edges N/A N/A max_edge source lst N/A N/A is_acyclic vertices remaining_edges N/A break_cycles_v N/A N/A vertices edges N/A N/A N/A Enumerates a reasonably minimal set of vertices that must be removed to
    make the graph acyclic. N/A v_depths vertices N/A progress True N/A roots_finished N/A set N/A progress N/A N/A roots N/A list N/A find_roots v_depths edges N/A N/A v_depths vertices N/A N/A v_depths N/A compute_depths roots vertices edges N/A N/A N/A len v_depths N/A len vertices N/A progress False N/A root roots N/A N/A N/A root roots_finished N/A N/A N/A cycles N/A all_cycles root v_depths edges N/A N/A cycles N/A N/A N/A N/A roots_finished add root N/A N/A allcycles N/A N/A cycle cycles N/A N/A cycledepth N/A max N/A N/A v_depths N/A N/A edge source N/A edge cycle N/A N/A N/A allcycles append N/A cycledepth cycle N/A N/A N/A allcycles sort N/A N/A _ cycle allcycles N/A N/A N/A N/A choices N/A N/A N/A v_depths N/A N/A edge source N/A edge source N/A edge cycle N/A N/A N/A KeyError N/A N/A N/A N/A N/A max_depth max_vertex N/A max choices N/A N/A v_depths N/A max_vertex N/A N/A max_vertex N/A progress True N/A N/A is_acyclic v_depths edges N/A show_graph N/A N/A vertices edges N/A N/A pypy.translator.tool.graphpage GraphPage DotGen MathGraphPage N/A GraphPage N/A compute N/A N/A self N/A N/A N/A dotgen N/A DotGen mathgraph N/A names N/A N/A N/A i v N/A enumerate vertices N/A N/A N/A names N/A v N/A node%d i N/A N/A i v N/A enumerate vertices N/A N/A N/A N/A dotgen emit_node N/A names N/A v label N/A str v N/A edge N/A edges N/A v N/A N/A N/A N/A dotgen emit_edge N/A names N/A N/A edge source N/A names N/A N/A edge target N/A N/A self source N/A N/A dotgen generate target None N/A N/A N/A N/A N/A N/A MathGraphPage display N/A