generic
    type Graph is limited private;
    type Vertex is private;
    type Iterator is limited private;
    with procedure Initialize_Vertices (The_Iterator : in out Iterator;
                                        With_The_Graph : in Graph);
    with procedure Initialize_Arcs (The_Iterator : in out Iterator;
                                    With_The_Vertex : in Vertex);
    with procedure Get_Next (The_Iterator : in out Iterator);
    with function Number_Of_Vertices_In (The_Graph : in Graph) return Natural;
    with function Value_Of (The_Iterator : in Iterator) return Vertex;
    with function Is_Done (The_Iterator : in Iterator) return Boolean;
package Topological_Sort_Unbounded_Controlled is

    generic
        Ignore_Self_Loops : in Boolean;
        Process_Cycles : in Boolean;
        with procedure Process_Acyclic
                          (The_Vertex : in Vertex; Continue : out Boolean);
        with procedure Process_Cyclic
                          (The_Vertex : in Vertex; Continue : out Boolean);
    procedure Sort (The_Graph : in Graph);

end Topological_Sort_Unbounded_Controlled;