sig
  type selection_strategy =
      All_remaining_events
    | Wire_with_the_least_number_of_events
    | Wire_with_the_most_number_of_events
  type try_to_remove_first = Late_events | Early_events
  type level
  val string_of_level : Priority.level -> string
  val min_level : Priority.level -> Priority.level -> Priority.level
  val highest : Priority.level
  val high : Priority.level
  val above_average : Priority.level
  val average : Priority.level
  val bellow_average : Priority.level
  val low : Priority.level
  val lowest : Priority.level
  val lower : Priority.level -> Priority.level option
  val higher : Priority.level -> Priority.level option
  module LevelMap :
    sig
      type elt = level
      type set
      type +'a t
      val empty : 'a t
      val is_empty : 'a t -> bool
      val size : 'a t -> int
      val root : 'a t -> (elt * 'a) option
      val max_key : 'a t -> elt option
      val add : elt -> '-> 'a t -> 'a t
      val remove : elt -> 'a t -> 'a t
      val add_while_testing_freshness :
        ('parameters, 'error, elt -> '-> 'a t -> 'error * bool * 'a t)
        SetMap.with_log_wrap
      val remove_while_testing_existence :
        ('parameters, 'error, elt -> 'a t -> 'error * bool * 'a t)
        SetMap.with_log_wrap
      val pop : elt -> 'a t -> 'a option * 'a t
      val merge : 'a t -> 'a t -> 'a t
      val min_elt : 'a t -> (elt * 'a) option
      val find_option : elt -> 'a t -> 'a option
      val find_default : '-> elt -> 'a t -> 'a
      val find_option_with_logs :
        ('parameters, 'error, elt -> 'a t -> 'error * 'a option)
        SetMap.with_log_wrap
      val find_default_with_logs :
        ('parameters, 'error, '-> elt -> 'a t -> 'error * 'a)
        SetMap.with_log_wrap
      val mem : elt -> 'a t -> bool
      val diff : 'a t -> 'a t -> 'a t * 'a t
      val union : 'a t -> 'a t -> 'a t
      val update : 'a t -> 'a t -> 'a t
      val diff_pred : ('-> '-> bool) -> 'a t -> 'a t -> 'a t * 'a t
      val add_with_logs :
        ('parameters, 'error, elt -> '-> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val remove_with_logs :
        ('parameters, 'error, elt -> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val join_with_logs :
        ('parameters, 'error, 'a t -> elt -> '-> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val split_with_logs :
        ('parameters, 'error,
         elt -> 'a t -> 'error * ('a t * 'a option * 'a t))
        SetMap.with_log_wrap
      val update_with_logs :
        ('parameters, 'error, 'a t -> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val map2_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> '-> 'error * 'c) ->
         ('parameters -> 'error -> '-> 'error * 'c) ->
         ('parameters -> 'error -> '-> '-> 'error * 'c) ->
         'a t -> 'b t -> 'error * 'c t)
        SetMap.with_log_wrap
      val map2z_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> '-> '-> 'error * 'a) ->
         'a t -> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val fold2z_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> elt -> '-> '-> '-> 'error * 'c) ->
         'a t -> 'b t -> '-> 'error * 'c)
        SetMap.with_log_wrap
      val fold2_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> elt -> '-> '-> 'error * 'c) ->
         ('parameters -> 'error -> elt -> '-> '-> 'error * 'c) ->
         ('parameters -> 'error -> elt -> '-> '-> '-> 'error * 'c) ->
         'a t -> 'b t -> '-> 'error * 'c)
        SetMap.with_log_wrap
      val fold2_sparse_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> elt -> '-> '-> '-> 'error * 'c) ->
         'a t -> 'b t -> '-> 'error * 'c)
        SetMap.with_log_wrap
      val iter2_sparse_with_logs :
        ('parameters, 'error,
         ('parameters -> 'error -> elt -> '-> '-> 'error) ->
         'a t -> 'b t -> 'error)
        SetMap.with_log_wrap
      val diff_with_logs :
        ('parameters, 'error, 'a t -> 'a t -> 'error * 'a t * 'a t)
        SetMap.with_log_wrap
      val diff_pred_with_logs :
        ('parameters, 'error,
         ('-> '-> bool) -> 'a t -> 'a t -> 'error * 'a t * 'a t)
        SetMap.with_log_wrap
      val merge_with_logs :
        ('parameters, 'error, 'a t -> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val union_with_logs :
        ('parameters, 'error, 'a t -> 'a t -> 'error * 'a t)
        SetMap.with_log_wrap
      val fold_restriction_with_logs :
        ('parameters, 'error,
         (elt -> '-> 'error * '-> 'error * 'b) ->
         set -> 'a t -> '-> 'error * 'b)
        SetMap.with_log_wrap
      val fold_restriction_with_missing_associations_with_logs :
        ('parameters, 'error,
         (elt -> '-> 'error * '-> 'error * 'b) ->
         (elt -> 'error * '-> 'error * 'b) ->
         set -> 'a t -> '-> 'error * 'b)
        SetMap.with_log_wrap
      val iter : (elt -> '-> unit) -> 'a t -> unit
      val fold : (elt -> '-> '-> 'b) -> 'a t -> '-> 'b
      val fold_with_interruption :
        (elt -> '-> '-> ('b, 'c) Stop.stop) ->
        'a t -> '-> ('b, 'c) Stop.stop
      val monadic_fold2 :
        'parameters ->
        'method_handler ->
        ('parameters ->
         'method_handler -> elt -> '-> '-> '-> 'method_handler * 'c) ->
        ('parameters ->
         'method_handler -> elt -> '-> '-> 'method_handler * 'c) ->
        ('parameters ->
         'method_handler -> elt -> '-> '-> 'method_handler * 'c) ->
        'a t -> 'b t -> '-> 'method_handler * 'c
      val monadic_fold2_sparse :
        'parameters ->
        'method_handler ->
        ('parameters ->
         'method_handler -> elt -> '-> '-> '-> 'method_handler * 'c) ->
        'a t -> 'b t -> '-> 'method_handler * 'c
      val monadic_iter2_sparse :
        'parameters ->
        'method_handler ->
        ('parameters -> 'method_handler -> elt -> '-> '-> 'method_handler) ->
        'a t -> 'b t -> 'method_handler
      val monadic_fold_restriction :
        'parameters ->
        'method_handler ->
        ('parameters ->
         'method_handler -> elt -> '-> '-> 'method_handler * 'b) ->
        set -> 'a t -> '-> 'method_handler * 'b
      val mapi : (elt -> '-> 'b) -> 'a t -> 'b t
      val map : ('-> 'b) -> 'a t -> 'b t
      val map2 : ('-> '-> 'a) -> 'a t -> 'a t -> 'a t
      val for_all : (elt -> '-> bool) -> 'a t -> bool
      val filter_one : (elt -> '-> bool) -> 'a t -> (elt * 'a) option
      val compare : ('-> '-> int) -> 'a t -> 'a t -> int
      val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
      val bindings : 'a t -> (elt * 'a) list
      val print :
        (Format.formatter -> '-> unit) -> Format.formatter -> 'a t -> unit
      val of_json :
        ?lab_key:string ->
        ?lab_value:string ->
        ?error_msg:string ->
        (Yojson.Basic.json -> elt) ->
        (Yojson.Basic.json -> 'value) -> Yojson.Basic.json -> 'value t
      val to_json :
        ?lab_key:string ->
        ?lab_value:string ->
        (elt -> Yojson.Basic.json) ->
        ('value -> Yojson.Basic.json) -> 'value t -> Yojson.Basic.json
    end
  type priorities = {
    creation : Priority.level;
    unbinding : Priority.level;
    removal : Priority.level;
    other_events : Priority.level;
    substitution : Priority.level;
    side_effects : Priority.level;
    candidate_set_of_events : Priority.selection_strategy;
    try_to_remove_first : Priority.try_to_remove_first;
  }
  val causal : Priority.priorities
  val weak : Priority.priorities
  val strong : Priority.priorities
  val n_story : int Pervasives.ref
  val n_branch : int Pervasives.ref
end