sig
  module EdosSolver :
    sig
      module type S = sig type reason end
      module type T =
        sig
          module X : S
          type state
          type var = int
          type value = True | False | Unknown
          type lit
          val lit_of_var :
            Common.EdosSolver.T.var -> bool -> Common.EdosSolver.T.lit
          val initialize_problem :
            ?print_var:(Stdlib.Format.formatter -> int -> unit) ->
            ?buffer:bool -> int -> Common.EdosSolver.T.state
          val copy : Common.EdosSolver.T.state -> Common.EdosSolver.T.state
          val propagate : Common.EdosSolver.T.state -> unit
          val protect : Common.EdosSolver.T.state -> unit
          val reset : Common.EdosSolver.T.state -> unit
          val assignment :
            Common.EdosSolver.T.state -> Common.EdosSolver.T.value array
          val assignment_true :
            Common.EdosSolver.T.state -> Common.EdosSolver.T.var list
          val add_rule :
            Common.EdosSolver.T.state ->
            Common.EdosSolver.T.lit array -> X.reason list -> unit
          val associate_vars :
            Common.EdosSolver.T.state ->
            Common.EdosSolver.T.lit -> Common.EdosSolver.T.var list -> unit
          val solve_all :
            (Common.EdosSolver.T.state -> unit) ->
            Common.EdosSolver.T.state -> Common.EdosSolver.T.var -> bool
          val solve :
            Common.EdosSolver.T.state -> Common.EdosSolver.T.var -> bool
          val solve_lst :
            Common.EdosSolver.T.state -> Common.EdosSolver.T.var list -> bool
          val collect_reasons :
            Common.EdosSolver.T.state ->
            Common.EdosSolver.T.var -> X.reason list
          val collect_reasons_lst :
            Common.EdosSolver.T.state ->
            Common.EdosSolver.T.var list -> X.reason list
          val dump : Common.EdosSolver.T.state -> (int * bool) list list
          val debug : bool -> unit
          val stats : Common.EdosSolver.T.state -> unit
        end
      module M :
        functor (X : S->
          sig
            module X : sig type reason = X.reason end
            type state
            type var = int
            type value = True | False | Unknown
            type lit
            val lit_of_var : var -> bool -> lit
            val initialize_problem :
              ?print_var:(Format.formatter -> int -> unit) ->
              ?buffer:bool -> int -> state
            val copy : state -> state
            val propagate : state -> unit
            val protect : state -> unit
            val reset : state -> unit
            val assignment : state -> value array
            val assignment_true : state -> var list
            val add_rule : state -> lit array -> X.reason list -> unit
            val associate_vars : state -> lit -> var list -> unit
            val solve_all : (state -> unit) -> state -> var -> bool
            val solve : state -> var -> bool
            val solve_lst : state -> var list -> bool
            val collect_reasons : state -> var -> X.reason list
            val collect_reasons_lst : state -> var list -> X.reason list
            val dump : state -> (int * bool) list list
            val debug : bool -> unit
            val stats : state -> unit
          end
    end
  module CudfSolver :
    sig
      exception Error of string
      exception Unsat
      val execsolver :
        string -> string -> Cudf.cudf -> Cudf.preamble option * Cudf.universe
    end
  module Input :
    sig
      val std_open_file : string -> IO.input
      exception File_empty
      val open_file : string -> IO.input
      val open_ch : Stdlib.in_channel -> IO.input
      val close_ch : IO.input -> unit
      val parse_uri :
        string ->
        Url.filetypes *
        (string option * string option * string option * string option *
         string) *
        string option
      val guess_format : string list list -> Url.filetypes
    end
  module Util :
    sig
      val uuid : unit -> string
      val list_unique : 'a list -> 'a list
      val memo : ('-> 'b) -> '-> 'b
      val timestamp : unit -> string
      val max32int : int
      type label = string
      module type Messages =
        sig
          type t
          val create :
            ?enabled:bool -> Common.Util.label -> Common.Util.Messages.t
          val eprintf :
            ?raw:bool ->
            Common.Util.Messages.t ->
            ('a, unit, string, unit) Stdlib.format4 -> 'a
          val enable : Common.Util.label -> unit
          val disable : Common.Util.label -> unit
          val all_disabled : unit -> unit
          val all_enabled : unit -> unit
          val avalaible : unit -> Common.Util.label list
          val is_enabled : Common.Util.label -> bool
        end
      module Debug : Messages
      module Warning : Messages
      module Info : Messages
      module Notice : Messages
      module Logging :
        functor (X : sig val label : string end->
          sig
            val it : Info.t
            val info : ('a, unit, string, unit) Stdlib.format4 -> 'a
            val nt : Notice.t
            val notice : ('a, unit, string, unit) Stdlib.format4 -> 'a
            val wt : Warning.t
            val warning : ('a, unit, string, unit) Stdlib.format4 -> 'a
            val dt : Debug.t
            val debug : ('a, unit, string, unit) Stdlib.format4 -> 'a
            val fatal : ('a, unit, string, 'b) Stdlib.format4 -> 'a
          end
      module Progress :
        sig
          type t
          val create :
            ?enabled:bool ->
            ?total:int ->
            ?unbounded:bool -> Common.Util.label -> Common.Util.Progress.t
          val enable : Common.Util.label -> unit
          val disable : Common.Util.label -> unit
          val set_total : Common.Util.Progress.t -> int -> unit
          val progress : ?i:int -> Common.Util.Progress.t -> unit
          val reset : Common.Util.Progress.t -> unit
          val available : unit -> Common.Util.label list
        end
      module Timer :
        sig
          type t
          val create : ?enabled:bool -> string -> Common.Util.Timer.t
          val enable : Common.Util.label -> unit
          val pp_timer :
            Stdlib.Format.formatter -> Common.Util.Timer.t -> unit
          val dump : Stdlib.Format.formatter -> unit -> unit
          val start : Common.Util.Timer.t -> unit
          val stop : Common.Util.Timer.t -> '-> 'a
          val available : unit -> Common.Util.label list
        end
      module IntHashtbl :
        sig
          type key = int
          type 'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> '-> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> '-> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val length : 'a t -> int
          val stats : 'a t -> Hashtbl.statistics
          val to_seq : 'a t -> (key * 'a) Seq.t
          val to_seq_keys : 'a t -> key Seq.t
          val to_seq_values : 'a t -> 'Seq.t
          val add_seq : 'a t -> (key * 'a) Seq.t -> unit
          val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
          val of_seq : (key * 'a) Seq.t -> 'a t
        end
      module IntPairHashtbl :
        sig
          type key = int * int
          type 'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> '-> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> '-> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val length : 'a t -> int
          val stats : 'a t -> Hashtbl.statistics
          val to_seq : 'a t -> (key * 'a) Seq.t
          val to_seq_keys : 'a t -> key Seq.t
          val to_seq_values : 'a t -> 'Seq.t
          val add_seq : 'a t -> (key * 'a) Seq.t -> unit
          val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
          val of_seq : (key * 'a) Seq.t -> 'a t
        end
      module StringHashtbl :
        sig
          type key = string
          type 'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> '-> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> '-> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val length : 'a t -> int
          val stats : 'a t -> Hashtbl.statistics
          val to_seq : 'a t -> (key * 'a) Seq.t
          val to_seq_keys : 'a t -> key Seq.t
          val to_seq_values : 'a t -> 'Seq.t
          val add_seq : 'a t -> (key * 'a) Seq.t -> unit
          val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
          val of_seq : (key * 'a) Seq.t -> 'a t
        end
      module StringPairHashtbl :
        sig
          type key = string * string
          type 'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> '-> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> '-> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val length : 'a t -> int
          val stats : 'a t -> Hashtbl.statistics
          val to_seq : 'a t -> (key * 'a) Seq.t
          val to_seq_keys : 'a t -> key Seq.t
          val to_seq_values : 'a t -> 'Seq.t
          val add_seq : 'a t -> (key * 'a) Seq.t -> unit
          val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
          val of_seq : (key * 'a) Seq.t -> 'a t
        end
      val hashcons : string Common.Util.StringHashtbl.t -> string -> string
      val hits : int Stdlib.ref
      val miss : int Stdlib.ref
      val range : int -> int -> int list
      val string_of_list :
        ?delim:string * string ->
        ?sep:string -> ('-> string) -> 'a list -> string
      class type projection =
        object
          method add : int -> unit
          method inttovar : int -> int
          method size : int
          method vartoint : int -> int
        end
      class identity : projection
      class intprojection : int -> projection
    end
  module CudfAdd :
    sig
      val equal : Cudf.package -> Cudf.package -> bool
      val compare : Cudf.package -> Cudf.package -> int
      val hash : Cudf.package -> int
      val sort : ?asc:bool -> Cudf.package list -> Cudf.package list
      module Cudf_hashtbl :
        sig
          type key = Cudf.package
          type 'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> '-> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> '-> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val length : 'a t -> int
          val stats : 'a t -> Hashtbl.statistics
          val to_seq : 'a t -> (key * 'a) Seq.t
          val to_seq_keys : 'a t -> key Seq.t
          val to_seq_values : 'a t -> 'Seq.t
          val add_seq : 'a t -> (key * 'a) Seq.t -> unit
          val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
          val of_seq : (key * 'a) Seq.t -> 'a t
        end
      module Cudf_set :
        sig
          type elt = Cudf.package
          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 disjoint : t -> t -> bool
          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 map : (elt -> elt) -> t -> t
          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 filter_map : (elt -> elt option) -> t -> t
          val partition : (elt -> bool) -> t -> t * t
          val cardinal : t -> int
          val elements : t -> elt list
          val min_elt : t -> elt
          val min_elt_opt : t -> elt option
          val max_elt : t -> elt
          val max_elt_opt : t -> elt option
          val choose : t -> elt
          val choose_opt : t -> elt option
          val split : elt -> t -> t * bool * t
          val find : elt -> t -> elt
          val find_opt : elt -> t -> elt option
          val find_first : (elt -> bool) -> t -> elt
          val find_first_opt : (elt -> bool) -> t -> elt option
          val find_last : (elt -> bool) -> t -> elt
          val find_last_opt : (elt -> bool) -> t -> elt option
          val of_list : elt list -> t
          val to_seq_from : elt -> t -> elt Seq.t
          val to_seq : t -> elt Seq.t
          val add_seq : elt Seq.t -> t -> t
          val of_seq : elt Seq.t -> t
        end
      val to_set :
        Common.CudfAdd.Cudf_set.elt list -> Common.CudfAdd.Cudf_set.t
      val who_provides :
        Cudf.universe -> Cudf_types.vpkg -> Cudf.package list
      val resolve_deps :
        Cudf.universe -> Cudf_types.vpkglist -> Cudf.package list
      val who_depends :
        Cudf.universe -> Cudf.package -> Cudf.package list list
      type ctable = (int, int list Stdlib.ref) ExtLib.Hashtbl.t
      val init_conflicts : Cudf.universe -> Common.CudfAdd.ctable
      val who_conflicts :
        Common.CudfAdd.ctable ->
        Cudf.universe -> Cudf.package -> Cudf.package list
      val resolve_vpkg_int : Cudf.universe -> Cudf_types.vpkg -> int list
      val resolve_vpkgs_int :
        Cudf.universe -> Cudf_types.vpkglist -> int list
      val encode : string -> string
      val decode : string -> string
      val latest : ?n:int -> Cudf.package list -> Cudf.package list
      module StringSet :
        sig
          type elt = ExtLib.String.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 disjoint : t -> t -> bool
          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 map : (elt -> elt) -> t -> t
          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 filter_map : (elt -> elt option) -> t -> t
          val partition : (elt -> bool) -> t -> t * t
          val cardinal : t -> int
          val elements : t -> elt list
          val min_elt : t -> elt
          val min_elt_opt : t -> elt option
          val max_elt : t -> elt
          val max_elt_opt : t -> elt option
          val choose : t -> elt
          val choose_opt : t -> elt option
          val split : elt -> t -> t * bool * t
          val find : elt -> t -> elt
          val find_opt : elt -> t -> elt option
          val find_first : (elt -> bool) -> t -> elt
          val find_first_opt : (elt -> bool) -> t -> elt option
          val find_last : (elt -> bool) -> t -> elt
          val find_last_opt : (elt -> bool) -> t -> elt option
          val of_list : elt list -> t
          val to_seq_from : elt -> t -> elt Seq.t
          val to_seq : t -> elt Seq.t
          val add_seq : elt Seq.t -> t -> t
          val of_seq : elt Seq.t -> t
        end
      val pkgnames : Cudf.universe -> Common.CudfAdd.StringSet.t
      val add_properties :
        Cudf.preamble -> Cudf_types.typedecl -> Cudf.preamble
      val get_property : string -> Cudf.package -> string
      val is_essential : Cudf.package -> bool
      val realversionmap :
        Cudf.package list ->
        (Cudf_types.pkgname * string, Cudf.package) ExtLib.Hashtbl.t
      val pkgtoint : Cudf.universe -> Cudf.package -> int
      val inttopkg : Cudf.universe -> int -> Cudf.package
      val compute_pool :
        Cudf.universe -> int list list array * int list array
      val add_to_package_list :
        ('a, 'b list Stdlib.ref) ExtLib.Hashtbl.t -> '-> '-> unit
      val get_package_list :
        ('a, 'b list Stdlib.ref) ExtLib.Hashtbl.t -> '-> 'b list
      val normalize_set : int list -> int list
      val string_of : (Stdlib.Format.formatter -> '-> 'b) -> '-> string
      val pp_version : Stdlib.Format.formatter -> Cudf.package -> unit
      val pp_package : Stdlib.Format.formatter -> Cudf.package -> unit
      val string_of_version : Cudf.package -> string
      val string_of_package : Cudf.package -> string
      type pp =
          Cudf.package ->
          string * string option * string * (string * (string * bool)) list
      val pp :
        (Cudf_types.pkgname * Cudf_types.version ->
         string * string option * string) ->
        ?fields:string list ->
        ?decode:(Cudf_types.pkgname -> string) -> Common.CudfAdd.pp
      val default_pp : Common.CudfAdd.pp
      val pp_vpkg :
        Common.CudfAdd.pp ->
        Stdlib.Format.formatter -> Cudf_types.vpkg -> unit
      val pp_vpkglist :
        Common.CudfAdd.pp ->
        Stdlib.Format.formatter -> Cudf_types.vpkglist -> unit
      val cone : Cudf.universe -> Cudf.package list -> Cudf.package list
    end
  module CudfDiff :
    sig
      type changeset = Common.CudfAdd.Cudf_set.t * Common.CudfAdd.Cudf_set.t
      type difference =
          (Cudf_types.pkgname, Common.CudfDiff.changeset) ExtLib.Hashtbl.t
      val make_solution :
        universe:Cudf.universe ->
        solution:Cudf.universe -> Common.CudfDiff.changeset
      val make_difference :
        universe:Cudf.universe ->
        solution:Cudf.universe -> Common.CudfDiff.difference
      type summary = {
        install : Cudf.package list;
        remove : Cudf.package list;
        upgrade : (Cudf.package * Cudf.package) list;
        downgrade : (Cudf.package * Cudf.package) list;
        notchange : Cudf.package list;
      }
      val make_summary :
        Cudf.universe ->
        Common.CudfDiff.difference -> Common.CudfDiff.summary
    end
  module Url :
    sig
      type debtypes = [ `Deb | `DebSrc | `Edsp ]
      type rpmtypes = [ `Hdlist | `Synthesis ]
      type othertypes = [ `Csw | `Npm | `Opam | `Pef ]
      type filetypes =
          [ `Csw
          | `Cudf
          | `Deb
          | `DebSrc
          | `Edsp
          | `Hdlist
          | `Npm
          | `Opam
          | `Pef
          | `Synthesis ]
      val supported_input_types : Common.Url.filetypes list
      type url = { scheme : Common.Url.filetypes; path : string; }
      val of_string : string -> Common.Url.url
      exception Invalid_url of string
      val to_string : Common.Url.url -> string
      val scheme_to_string : Common.Url.filetypes -> string
      val scheme_of_string : string -> Common.Url.filetypes
    end
  module Criteria :
    sig
      val parse_criteria : Format822.field -> Criteria_types.criteria
      val to_string : ?solver:string -> Criteria_types.criteria -> string
      val iter :
        (string * string * string * Re.re option -> unit) ->
        Criteria_types.criteria -> unit
      val is_misc2012 : string -> bool
      val default_criteria : (string * Criteria_types.criteria) list
    end
end