sig
  module type G =
    sig
      type t
      module V :
        sig
          type t
          val compare : Sig.G.V.t -> Sig.G.V.t -> int
          val hash : Sig.G.V.t -> int
          val equal : Sig.G.V.t -> Sig.G.V.t -> bool
          type label
          val create : Sig.G.V.label -> Sig.G.V.t
          val label : Sig.G.V.t -> Sig.G.V.label
        end
      type vertex = Sig.G.V.t
      module E :
        sig
          type t
          val compare : Sig.G.E.t -> Sig.G.E.t -> int
          val src : Sig.G.E.t -> Sig.G.V.t
          val dst : Sig.G.E.t -> Sig.G.V.t
          type label
          val create : Sig.G.V.t -> Sig.G.E.label -> Sig.G.V.t -> Sig.G.E.t
          val label : Sig.G.E.t -> Sig.G.E.label
        end
      type edge = Sig.G.E.t
      val is_directed : bool
      val is_empty : Sig.G.t -> bool
      val nb_vertex : Sig.G.t -> int
      val nb_edges : Sig.G.t -> int
      val out_degree : Sig.G.t -> Sig.G.V.t -> int
      val in_degree : Sig.G.t -> Sig.G.V.t -> int
      val mem_vertex : Sig.G.t -> Sig.G.V.t -> bool
      val mem_edge : Sig.G.t -> Sig.G.V.t -> Sig.G.V.t -> bool
      val mem_edge_e : Sig.G.t -> Sig.G.E.t -> bool
      val succ : Sig.G.t -> Sig.G.V.t -> Sig.G.V.t list
      val pred : Sig.G.t -> Sig.G.V.t -> Sig.G.V.t list
      val succ_e : Sig.G.t -> Sig.G.V.t -> Sig.G.E.t list
      val pred_e : Sig.G.t -> Sig.G.V.t -> Sig.G.E.t list
      val iter_vertex : (Sig.G.V.t -> unit) -> Sig.G.t -> unit
      val iter_edges : (Sig.G.V.t -> Sig.G.V.t -> unit) -> Sig.G.t -> unit
      val fold_vertex : (Sig.G.V.t -> '-> 'a) -> Sig.G.t -> '-> 'a
      val fold_edges :
        (Sig.G.V.t -> Sig.G.V.t -> '-> 'a) -> Sig.G.t -> '-> 'a
      val map_vertex : (Sig.G.V.t -> Sig.G.V.t) -> Sig.G.t -> Sig.G.t
      val iter_edges_e : (Sig.G.E.t -> unit) -> Sig.G.t -> unit
      val fold_edges_e : (Sig.G.E.t -> '-> 'a) -> Sig.G.t -> '-> 'a
      val iter_succ : (Sig.G.V.t -> unit) -> Sig.G.t -> Sig.G.V.t -> unit
      val iter_pred : (Sig.G.V.t -> unit) -> Sig.G.t -> Sig.G.V.t -> unit
      val fold_succ :
        (Sig.G.V.t -> '-> 'a) -> Sig.G.t -> Sig.G.V.t -> '-> 'a
      val fold_pred :
        (Sig.G.V.t -> '-> 'a) -> Sig.G.t -> Sig.G.V.t -> '-> 'a
      val iter_succ_e : (Sig.G.E.t -> unit) -> Sig.G.t -> Sig.G.V.t -> unit
      val fold_succ_e :
        (Sig.G.E.t -> '-> 'a) -> Sig.G.t -> Sig.G.V.t -> '-> 'a
      val iter_pred_e : (Sig.G.E.t -> unit) -> Sig.G.t -> Sig.G.V.t -> unit
      val fold_pred_e :
        (Sig.G.E.t -> '-> 'a) -> Sig.G.t -> Sig.G.V.t -> '-> 'a
    end
  module type P =
    sig
      type t
      module V :
        sig
          type t
          val compare : t -> t -> int
          val hash : t -> int
          val equal : t -> t -> bool
          type label
          val create : label -> t
          val label : t -> label
        end
      type vertex = V.t
      module E :
        sig
          type t
          val compare : t -> t -> int
          val src : t -> V.t
          val dst : t -> V.t
          type label
          val create : V.t -> label -> V.t -> t
          val label : t -> label
        end
      type edge = E.t
      val is_directed : bool
      val is_empty : t -> bool
      val nb_vertex : t -> int
      val nb_edges : t -> int
      val out_degree : t -> V.t -> int
      val in_degree : t -> V.t -> int
      val mem_vertex : t -> V.t -> bool
      val mem_edge : t -> V.t -> V.t -> bool
      val mem_edge_e : t -> E.t -> bool
      val succ : t -> V.t -> V.t list
      val pred : t -> V.t -> V.t list
      val succ_e : t -> V.t -> E.t list
      val pred_e : t -> V.t -> E.t list
      val iter_vertex : (V.t -> unit) -> t -> unit
      val iter_edges : (V.t -> V.t -> unit) -> t -> unit
      val fold_vertex : (V.t -> '-> 'a) -> t -> '-> 'a
      val fold_edges : (V.t -> V.t -> '-> 'a) -> t -> '-> 'a
      val map_vertex : (V.t -> V.t) -> t -> t
      val iter_edges_e : (E.t -> unit) -> t -> unit
      val fold_edges_e : (E.t -> '-> 'a) -> t -> '-> 'a
      val iter_succ : (V.t -> unit) -> t -> V.t -> unit
      val iter_pred : (V.t -> unit) -> t -> V.t -> unit
      val fold_succ : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val fold_pred : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_succ_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_succ_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_pred_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_pred_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val empty : t
      val add_vertex : t -> V.t -> t
      val remove_vertex : t -> V.t -> t
      val add_edge : t -> V.t -> V.t -> t
      val add_edge_e : t -> E.t -> t
      val remove_edge : t -> V.t -> V.t -> t
      val remove_edge_e : t -> E.t -> t
    end
  module type I =
    sig
      type t
      module V :
        sig
          type t
          val compare : t -> t -> int
          val hash : t -> int
          val equal : t -> t -> bool
          type label
          val create : label -> t
          val label : t -> label
        end
      type vertex = V.t
      module E :
        sig
          type t
          val compare : t -> t -> int
          val src : t -> V.t
          val dst : t -> V.t
          type label
          val create : V.t -> label -> V.t -> t
          val label : t -> label
        end
      type edge = E.t
      val is_directed : bool
      val is_empty : t -> bool
      val nb_vertex : t -> int
      val nb_edges : t -> int
      val out_degree : t -> V.t -> int
      val in_degree : t -> V.t -> int
      val mem_vertex : t -> V.t -> bool
      val mem_edge : t -> V.t -> V.t -> bool
      val mem_edge_e : t -> E.t -> bool
      val succ : t -> V.t -> V.t list
      val pred : t -> V.t -> V.t list
      val succ_e : t -> V.t -> E.t list
      val pred_e : t -> V.t -> E.t list
      val iter_vertex : (V.t -> unit) -> t -> unit
      val iter_edges : (V.t -> V.t -> unit) -> t -> unit
      val fold_vertex : (V.t -> '-> 'a) -> t -> '-> 'a
      val fold_edges : (V.t -> V.t -> '-> 'a) -> t -> '-> 'a
      val map_vertex : (V.t -> V.t) -> t -> t
      val iter_edges_e : (E.t -> unit) -> t -> unit
      val fold_edges_e : (E.t -> '-> 'a) -> t -> '-> 'a
      val iter_succ : (V.t -> unit) -> t -> V.t -> unit
      val iter_pred : (V.t -> unit) -> t -> V.t -> unit
      val fold_succ : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val fold_pred : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_succ_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_succ_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_pred_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_pred_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val create : unit -> t
      val copy : t -> t
      val add_vertex : t -> V.t -> unit
      val remove_vertex : t -> V.t -> unit
      val add_edge : t -> V.t -> V.t -> unit
      val add_edge_e : t -> E.t -> unit
      val remove_edge : t -> V.t -> V.t -> unit
      val remove_edge_e : t -> E.t -> unit
    end
  module type IA =
    sig
      type t
      module V :
        sig
          type t
          val compare : t -> t -> int
          val hash : t -> int
          val equal : t -> t -> bool
          type label
          val create : label -> t
          val label : t -> label
        end
      type vertex = V.t
      module E :
        sig
          type t
          val compare : t -> t -> int
          val src : t -> V.t
          val dst : t -> V.t
          type label
          val create : V.t -> label -> V.t -> t
          val label : t -> label
        end
      type edge = E.t
      val is_directed : bool
      val is_empty : t -> bool
      val nb_vertex : t -> int
      val nb_edges : t -> int
      val out_degree : t -> V.t -> int
      val in_degree : t -> V.t -> int
      val mem_vertex : t -> V.t -> bool
      val mem_edge : t -> V.t -> V.t -> bool
      val mem_edge_e : t -> E.t -> bool
      val succ : t -> V.t -> V.t list
      val pred : t -> V.t -> V.t list
      val succ_e : t -> V.t -> E.t list
      val pred_e : t -> V.t -> E.t list
      val iter_vertex : (V.t -> unit) -> t -> unit
      val iter_edges : (V.t -> V.t -> unit) -> t -> unit
      val fold_vertex : (V.t -> '-> 'a) -> t -> '-> 'a
      val fold_edges : (V.t -> V.t -> '-> 'a) -> t -> '-> 'a
      val map_vertex : (V.t -> V.t) -> t -> t
      val iter_edges_e : (E.t -> unit) -> t -> unit
      val fold_edges_e : (E.t -> '-> 'a) -> t -> '-> 'a
      val iter_succ : (V.t -> unit) -> t -> V.t -> unit
      val iter_pred : (V.t -> unit) -> t -> V.t -> unit
      val fold_succ : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val fold_pred : (V.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_succ_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_succ_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val iter_pred_e : (E.t -> unit) -> t -> V.t -> unit
      val fold_pred_e : (E.t -> '-> 'a) -> t -> V.t -> '-> 'a
      val create : unit -> t
      val copy : t -> t
      val add_vertex : t -> V.t -> unit
      val remove_vertex : t -> V.t -> unit
      val add_edge : t -> V.t -> V.t -> unit
      val add_edge_e : t -> E.t -> unit
      val remove_edge : t -> V.t -> V.t -> unit
      val remove_edge_e : t -> E.t -> unit
      module Mark :
        sig
          val clear : t -> unit
          val get : V.t -> int
          val set : V.t -> int -> unit
        end
    end
  module type ORDERED_TYPE =
    sig
      type t
      val compare : Sig.ORDERED_TYPE.t -> Sig.ORDERED_TYPE.t -> int
    end
  module type ORDERED_TYPE_DFT =
    sig type t val compare : t -> t -> int val default : t end
  module type HASHABLE =
    sig
      type t
      val hash : Sig.HASHABLE.t -> int
      val equal : Sig.HASHABLE.t -> Sig.HASHABLE.t -> bool
    end
  module type COMPARABLE =
    sig
      type t
      val compare : Sig.COMPARABLE.t -> Sig.COMPARABLE.t -> int
      val hash : Sig.COMPARABLE.t -> int
      val equal : Sig.COMPARABLE.t -> Sig.COMPARABLE.t -> bool
    end
end