sig
  module type INDEX =
    sig
      type t
      type gen
      module Set :
        sig
          type elt = t
          type t
          val empty : t
          val is_empty : t -> bool
          val mem : elt -> t -> bool
          val add : elt -> t -> t
          val singleton : elt -> t
          val remove : elt -> t -> t
          val union : t -> t -> t
          val inter : t -> t -> t
          val diff : t -> t -> t
          val compare : t -> t -> int
          val equal : t -> t -> bool
          val subset : t -> t -> bool
          val iter : (elt -> unit) -> t -> unit
          val fold : (elt -> '-> 'a) -> t -> '-> 'a
          val for_all : (elt -> bool) -> t -> bool
          val exists : (elt -> bool) -> t -> bool
          val filter : (elt -> bool) -> t -> t
          val partition : (elt -> bool) -> t -> t * t
          val cardinal : t -> int
          val elements : t -> elt list
          val min_elt : t -> elt
          val max_elt : t -> elt
          val choose : t -> elt
          val split : elt -> t -> t * bool * t
        end
      module Map :
        sig
          type key = t
          type +'a t
          val empty : 'a t
          val is_empty : 'a t -> bool
          val mem : key -> 'a t -> bool
          val add : key -> '-> 'a t -> 'a t
          val singleton : key -> '-> 'a t
          val remove : key -> 'a t -> 'a t
          val merge :
            (key -> 'a option -> 'b option -> 'c option) ->
            'a t -> 'b t -> 'c t
          val compare : ('-> '-> int) -> 'a t -> 'a t -> int
          val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val for_all : (key -> '-> bool) -> 'a t -> bool
          val exists : (key -> '-> bool) -> 'a t -> bool
          val filter : (key -> '-> bool) -> 'a t -> 'a t
          val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
          val cardinal : 'a t -> int
          val bindings : 'a t -> (key * 'a) list
          val min_binding : 'a t -> key * 'a
          val max_binding : 'a t -> key * 'a
          val choose : 'a t -> key * 'a
          val split : key -> 'a t -> 'a t * 'a option * 'a t
          val find : key -> 'a t -> 'a
          val map : ('-> 'b) -> 'a t -> 'b t
          val mapi : (key -> '-> 'b) -> 'a t -> 'b t
        end
      val start : Store_intf.INDEX.gen
      val next_ix : Store_intf.INDEX.gen -> Store_intf.INDEX.t
      val next :
        Store_intf.INDEX.gen -> Store_intf.INDEX.t * Store_intf.INDEX.gen
      val remove_ix :
        Store_intf.INDEX.gen -> Store_intf.INDEX.t -> Store_intf.INDEX.gen
      val int_of_ix : Store_intf.INDEX.t -> int
    end
  module type STORE =
    sig
      module Ix : INDEX
      type +'a t
      val empty : 'Store_intf.STORE.t
      val is_empty : 'Store_intf.STORE.t -> bool
      val cardinal : 'Store_intf.STORE.t -> int
      val next_ix : 'Store_intf.STORE.t -> Ix.t
      val singleton : '-> Ix.t * 'Store_intf.STORE.t
      val add : '-> 'Store_intf.STORE.t -> Ix.t * 'Store_intf.STORE.t
      val find : Ix.t -> 'Store_intf.STORE.t -> 'a
      val update :
        Ix.t -> '-> 'Store_intf.STORE.t -> 'Store_intf.STORE.t
      val remove : Ix.t -> 'Store_intf.STORE.t -> 'Store_intf.STORE.t
      val iter : ('-> unit) -> 'Store_intf.STORE.t -> unit
      val iteri : (Ix.t -> '-> unit) -> 'Store_intf.STORE.t -> unit
      val map : ('-> 'b) -> 'Store_intf.STORE.t -> 'Store_intf.STORE.t
      val mapi :
        (Ix.t -> '-> 'b) -> 'Store_intf.STORE.t -> 'Store_intf.STORE.t
      val fold : ('-> '-> 'b) -> 'Store_intf.STORE.t -> '-> 'b
      val foldi :
        (Ix.t -> '-> '-> 'b) -> 'Store_intf.STORE.t -> '-> 'b
      val to_list : 'Store_intf.STORE.t -> (Ix.t * 'a) list
      val choose : 'Store_intf.STORE.t -> Ix.t * 'a
      val filter :
        (Ix.t -> '-> bool) ->
        'Store_intf.STORE.t -> 'Store_intf.STORE.t
      val partition :
        (Ix.t -> '-> bool) ->
        'Store_intf.STORE.t ->
        'Store_intf.STORE.t * 'Store_intf.STORE.t
      val eq_classes :
        ('-> '-> bool) ->
        'Store_intf.STORE.t -> ('a * 'Store_intf.STORE.t) list
      val get_ix_map : 'Store_intf.STORE.t -> 'Ix.Map.t
    end
end