sig
  exception Bddindex
  type 'a typdef = [ `Benum of 'a array ]
  type 'a typ = [ `Benum of '| `Bint of bool * int | `Bool ]
  type 'a symbol = {
    compare : '-> '-> int;
    marshal : '-> string;
    unmarshal : string -> 'a;
    mutable print : Format.formatter -> '-> unit;
  }
  type ('a, 'b, 'c, 'd, 'e) t0 = {
    mutable cudd : 'Cudd.Man.t;
    mutable typdef : ('a, 'c) PMappe.t;
    mutable vartyp : ('a, 'b) PMappe.t;
    mutable bddindex0 : int;
    mutable bddsize : int;
    mutable bddindex : int;
    mutable bddincr : int;
    mutable idcondvar : (int, 'a) PMappe.t;
    mutable vartid : ('a, int array) PMappe.t;
    mutable varset : ('a, 'Cudd.Bdd.t) PMappe.t;
    mutable print_external_idcondb : Format.formatter -> int * bool -> unit;
    mutable ext : 'e;
    symbol : 'Env.symbol;
    copy_ext : '-> 'e;
  }
  module O :
    sig
      type ('a, 'b, 'c, 'd, 'e) t = ('a, 'b, 'c, 'd, 'e) Env.t0
        constraint 'b = [> 'Env.typ ] constraint 'c = [> 'Env.typdef ]
      val make :
        symbol:'Env.symbol ->
        copy_ext:('-> 'b) ->
        ?bddindex0:int ->
        ?bddsize:int ->
        ?relational:bool ->
        'Cudd.Man.t ->
        '-> ('a, [> 'Env.typ ], [> 'Env.typdef ], 'c, 'b) Env.O.t
      val print :
        (Format.formatter -> ([> 'Env.typ ] as 'a) -> unit) ->
        (Format.formatter -> ([> 'Env.typdef ] as 'c) -> unit) ->
        (Format.formatter -> '-> unit) ->
        Format.formatter -> ('b, 'a, 'c, 'e, 'd) Env.O.t -> unit
    end
  type ('a, 'b) t = ('a, 'Env.typ, 'Env.typdef, 'b, unit) Env.O.t
  val print_typ :
    (Format.formatter -> '-> unit) ->
    Format.formatter -> [> 'Env.typ ] -> unit
  val print_typdef :
    (Format.formatter -> '-> unit) ->
    Format.formatter -> [> 'Env.typdef ] -> unit
  val print_tid : Format.formatter -> int array -> unit
  val print_idcondb :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    Format.formatter -> int * bool -> unit
  val print_order :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    Format.formatter -> unit
  val print :
    Format.formatter ->
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> unit
  val marshal : '-> string
  val unmarshal : string -> 'a
  val make_symbol :
    ?compare:('-> '-> int) ->
    ?marshal:('-> string) ->
    ?unmarshal:(string -> 'a) ->
    (Format.formatter -> '-> unit) -> 'Env.symbol
  val string_symbol : string Env.symbol
  val make :
    symbol:'Env.symbol ->
    ?bddindex0:int ->
    ?bddsize:int -> ?relational:bool -> 'Cudd.Man.t -> ('a, 'b) Env.t
  val make_string :
    ?bddindex0:int ->
    ?bddsize:int -> ?relational:bool -> 'Cudd.Man.t -> (string, 'a) Env.t
  val copy :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t
  val mem_typ :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> '-> bool
  val mem_var :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> '-> bool
  val mem_label :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> '-> bool
  val typdef_of_typ :
    ('a, [> 'Env.typ ], [> 'Env.typdef ] as 'b, 'c, 'd) Env.O.t ->
    '-> 'b
  val typ_of_var :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ], 'c, 'd) Env.O.t ->
    '-> 'b
  val vars :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> 'PSette.t
  val labels :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> 'PSette.t
  val add_typ_with :
    ('a, [> 'Env.typ ], [> 'Env.typdef ] as 'b, 'c, 'd) Env.O.t ->
    '-> '-> unit
  val add_vars_with :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ], 'c, 'd) Env.O.t ->
    ('a * 'b) list -> int array option
  val remove_vars_with :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    'a list -> int array option
  val rename_vars_with :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    ('a * 'a) list -> int array option
  val add_typ :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    '-> '-> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val add_vars :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a * 'b) list -> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val remove_vars :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    'a list -> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val rename_vars :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a * 'a) list -> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val add_var_with :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ], 'c, 'd) Env.O.t ->
    '-> '-> unit
  val iter_ordered :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    ('-> int array -> unit) -> unit
  val is_leq :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> bool
  val is_eq :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> bool
  val shift :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    int -> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val lce :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> ('a, 'b, 'c, 'd, 'e) Env.O.t
  val permutation12 :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> int array
  val permutation21 :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> int array
  type 'a change = {
    intro : int array option;
    remove : ('Cudd.Bdd.t * int array) option;
  }
  val compute_change :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a, 'b, 'c, 'd, 'e) Env.O.t -> 'Env.change
  val notfound : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
  type ('a, 'b) value = { env : 'a; val0 : 'b; }
  val make_value :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    '-> (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value
  val get_env : ('a, 'b) Env.value -> 'a
  val get_val0 : ('a, 'b) Env.value -> 'b
  val extend_environment :
    ('-> int array -> 'a) ->
    (('b, [> 'Env.typ ] as 'c, [> 'Env.typdef ] as 'd, 'e, 'f) Env.O.t,
     'a)
    Env.value ->
    ('b, 'c, 'd, 'e, 'f) Env.O.t ->
    (('b, 'c, 'd, 'e, 'f) Env.O.t, 'a) Env.value
  val compare_idb : int * bool -> int * bool -> int
  val permutation :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> int array
  val permute_with :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    int array -> unit
  val normalize_with :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> int array
  val check_normalized :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> bool
  val compose_permutation : int array -> int array -> int array
  val compose_opermutation :
    int array option -> int array option -> int array option
  val permutation_of_offset : int -> int -> int array
  val check_var :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t -> '-> unit
  val check_lvar :
    ('a, [> 'Env.typ ], [> 'Env.typdef ], 'b, 'c) Env.O.t ->
    'a list -> unit
  val check_value :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value -> unit
  val check_value2 :
    (('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t,
     'f)
    Env.value -> (('a, 'b, 'c, 'd, 'e) Env.O.t, 'g) Env.value -> unit
  val check_value3 :
    (('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t,
     'f)
    Env.value ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'g) Env.value ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'h) Env.value -> unit
  val check_lvarvalue :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    ('a * (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value) list ->
    ('a * 'f) list
  val check_lvalue :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value list -> 'f list
  val check_ovalue :
    ('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value option -> 'f option
  val mapunop :
    ('-> 'b) ->
    (('c, [> 'Env.typ ] as 'd, [> 'Env.typdef ] as 'e, 'f, 'g) Env.O.t,
     'a)
    Env.value -> (('c, 'd, 'e, 'f, 'g) Env.O.t, 'b) Env.value
  val mapbinop :
    ('-> '-> 'c) ->
    (('d, [> 'Env.typ ] as 'e, [> 'Env.typdef ] as 'f, 'g, 'h) Env.O.t,
     'a)
    Env.value ->
    (('d, 'e, 'f, 'g, 'h) Env.O.t, 'b) Env.value ->
    (('d, 'e, 'f, 'g, 'h) Env.O.t, 'c) Env.value
  val mapbinope :
    (('a, [> 'Env.typ ] as 'b, [> 'Env.typdef ] as 'c, 'd, 'e) Env.O.t ->
     '-> '-> 'h) ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'f) Env.value ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'g) Env.value ->
    (('a, 'b, 'c, 'd, 'e) Env.O.t, 'h) Env.value
  val mapterop :
    ('-> '-> '-> 'd) ->
    (('e, [> 'Env.typ ] as 'f, [> 'Env.typdef ] as 'g, 'h, 'i) Env.O.t,
     'a)
    Env.value ->
    (('e, 'f, 'g, 'h, 'i) Env.O.t, 'b) Env.value ->
    (('e, 'f, 'g, 'h, 'i) Env.O.t, 'c) Env.value ->
    (('e, 'f, 'g, 'h, 'i) Env.O.t, 'd) Env.value
end