:- module hash_table.
:- use_module array, assoc_list, bool, builtin, char, deconstruct, exception, float, int, list, pair, private_builtin, string, type_desc, univ.
:- type hash_table.hash_table_alist(K, V)
	--->	ht_nil 
	;	ht_single(K, V)
	;	ht_cons(K, V, hash_table.hash_table_alist(K, V)).
:- type hash_table.buckets(K, V) == array.array(hash_table.hash_table_alist(K, V)).
:- pragma foreign_import_module("C", hash_table).
:- pragma foreign_import_module("C", array).
:- pragma foreign_import_module("C#", array).
:- pragma foreign_import_module("Java", array).
:- pragma foreign_import_module("IL", array).
:- pragma foreign_import_module("Erlang", array).
:- pragma foreign_import_module("C", array).
:- pragma foreign_import_module("C#", array).
:- pragma foreign_import_module("Java", array).
:- pragma foreign_import_module("IL", array).
:- pragma foreign_import_module("Erlang", array).
:- pragma foreign_import_module("C", io).
:- pragma foreign_import_module("C#", io).
:- pragma foreign_import_module("Java", io).
:- pragma foreign_import_module("IL", io).
:- pragma foreign_import_module("Erlang", io).
:- pragma foreign_import_module("C", io).
:- pragma foreign_import_module("C#", io).
:- pragma foreign_import_module("Java", io).
:- pragma foreign_import_module("IL", io).
:- pragma foreign_import_module("Erlang", io).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C", string).
:- pragma foreign_import_module("C", bitmap).
:- pragma foreign_import_module("C#", bitmap).
:- pragma foreign_import_module("Java", bitmap).
:- pragma foreign_import_module("IL", bitmap).
:- pragma foreign_import_module("Erlang", bitmap).
:- pragma foreign_import_module("C", bitmap).
:- pragma foreign_import_module("C#", bitmap).
:- pragma foreign_import_module("Java", bitmap).
:- pragma foreign_import_module("IL", bitmap).
:- pragma foreign_import_module("Erlang", bitmap).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C#", time).
:- pragma foreign_import_module("Java", time).
:- pragma foreign_import_module("IL", time).
:- pragma foreign_import_module("Erlang", time).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C#", time).
:- pragma foreign_import_module("Java", time).
:- pragma foreign_import_module("IL", time).
:- pragma foreign_import_module("Erlang", time).
:- pragma foreign_import_module("C", stm_builtin).
:- pragma foreign_import_module("C", stm_builtin).
:- pragma foreign_import_module("C", store).
:- pragma foreign_import_module("C#", store).
:- pragma foreign_import_module("Java", store).
:- pragma foreign_import_module("IL", store).
:- pragma foreign_import_module("Erlang", store).
:- pragma foreign_import_module("C", store).
:- pragma foreign_import_module("C#", store).
:- pragma foreign_import_module("Java", store).
:- pragma foreign_import_module("IL", store).
:- pragma foreign_import_module("Erlang", store).
:- pragma foreign_import_module("C#", rtti_implementation).
:- pragma foreign_import_module("Java", rtti_implementation).
:- pragma foreign_import_module("C#", rtti_implementation).
:- pragma foreign_import_module("Java", rtti_implementation).
:- func hash_table.find_slot(hash_table.hash_table(K_1, V_2), K_1) = int.
:- mode hash_table.find_slot((hash_table.hash_table_ui), (builtin.in)) = (builtin.out) is det.
:- pragma inline((hash_table.find_slot)/2).
:- pred hash_table.find_slot_2(pred(K_1, int), K_1, int, int).
:- mode hash_table.find_slot_2(builtin.in((hash_table.hash_pred)), (builtin.in), (builtin.in), (builtin.out)) is det.
:- pragma inline((hash_table.find_slot_2)/4).
:- pred hash_table.alist_search(hash_table.hash_table_alist(K_1, V_2), K_1, V_2).
:- mode hash_table.alist_search((builtin.in), (builtin.in), (builtin.out)) is semidet.
:- pred hash_table.to_assoc_list_2(hash_table.hash_table_alist(K_1, V_2), list.list(pair.pair(K_1, V_2)), list.list(pair.pair(K_1, V_2))).
:- mode hash_table.to_assoc_list_2((builtin.in), (builtin.in), (builtin.out)) is det.
:- pred hash_table.from_assoc_list_2(list.list(pair.pair(K_1, V_2)), hash_table.hash_table(K_1, V_2), hash_table.hash_table(K_1, V_2)).
:- mode hash_table.from_assoc_list_2((builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)) is det.
:- pred hash_table.fold_f((func(K_1, V_2, T_3) = T_3), hash_table.hash_table_alist(K_1, V_2), T_3, T_3).
:- mode hash_table.fold_f((func((builtin.in), (builtin.in), (builtin.in)) = (builtin.out) is det), (builtin.in), (builtin.in), (builtin.out)) is det.
:- mode hash_table.fold_f((func((builtin.in), (builtin.in), (builtin.di)) = (builtin.uo) is det), (builtin.in), (builtin.di), (builtin.uo)) is det.
:- pred hash_table.fold_p(pred(K_1, V_2, T_3, T_3), hash_table.hash_table_alist(K_1, V_2), T_3, T_3).
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out)) is det.
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is det), (builtin.in), (builtin.mdi), (builtin.muo)) is det.
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo)) is det.
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out)) is semidet.
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is semidet), (builtin.in), (builtin.mdi), (builtin.muo)) is semidet.
:- mode hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is semidet), (builtin.in), (builtin.di), (builtin.uo)) is semidet.
hash_table.init(HashPred_5, N_6, MaxOccupancy_7) = HT_8 :-
    (if
      V_12 = 0 : int,
      int.(N_6 =< V_12)
    then
      V_13 = exception.software_error(V_14) : exception.software_error,
      V_14 = "hash_table.init: N =< 0" : string,
      exception.throw(V_13)
    else
      (if
        V_15 = int.bits_per_int,
        int.(N_6 >= V_15)
      then
        V_16 = exception.software_error(V_17) : exception.software_error,
        V_17 = "hash_table.init: N >= int.bits_per_int" : string,
        exception.throw(V_16)
      else
        (if
          V_18 = 0.0 : float,
          float.(MaxOccupancy_7 =< V_18)
        then
          V_19 = exception.software_error(V_20) : exception.software_error,
          V_20 = "hash_table.init: MaxOccupancy =< 0.0" : string,
          exception.throw(V_19)
        else
          NumBuckets_9 = int.(V_21 << N_6),
          V_21 = 1 : int,
          MaxOccupants_10 = float.ceiling_to_int(V_22),
          V_22 = float.(V_23 * MaxOccupancy_7),
          V_23 = float.float(NumBuckets_9),
          Buckets_11 = array.init(NumBuckets_9, V_24),
          V_24 = hash_table.ht_nil : hash_table.hash_table_alist(K_1, V_2),
          HT_8 = hash_table.ht(V_25, MaxOccupants_10, HashPred_5, Buckets_11) : hash_table.hash_table(K_1, V_2),
          V_25 = 0 : int
        )
      )
    ).
hash_table.new(HashPred_5, N_6, MaxOccupancy_7) = HeadVar__4_4 :-
    HeadVar__4_4 = hash_table.init(HashPred_5, N_6, MaxOccupancy_7).
hash_table.init_default(HashPred_3) = HeadVar__2_2 :-
    HeadVar__2_2 = hash_table.init(HashPred_3, V_4, V_5),
    V_4 = 7 : int,
    V_5 = 0.9 : float.
hash_table.new_default(HashPred_3) = HeadVar__2_2 :-
    HeadVar__2_2 = hash_table.init(HashPred_3, V_4, V_5),
    V_4 = 7 : int,
    V_5 = 0.9 : float.
hash_table.hash_pred(hash_table.ht(V_3, V_4, HeadVar__2_2, V_5)) = HeadVar__2_2.
:- pragma foreign_proc("C", hash_table.int_hash(N :: (builtin.in), H :: (builtin.out)), [will_not_call_mercury, thread_safe, tabled_for_io, promise_pure, may_modify_trail], "
    const int c2 = 0x27d4eb2d; /* a prime or an odd constant */
    MR_Unsigned key;

    key = N;

    if (sizeof(MR_Word) == 4) {
        key = (key ^ 61) ^ (key >> 16);
        key = key + (key << 3);
        key = key ^ (key >> 4);
        key = key * c2;
        key = key ^ (key >> 15);
    } else {
        key = (~key) + (key << 21); /* key = (key << 21) - key - 1; */
        key = key ^ (key >> 24);
        key = (key + (key << 3)) + (key << 8); /* key * 265 */
        key = key ^ (key >> 14);
        key = (key + (key << 2)) + (key << 4); /* key * 21 */
        key = key ^ (key >> 28);
        key = key + (key << 31);
    }

    H = key;
").
hash_table.string_hash(S_3, HeadVar__2_2) :-
    HeadVar__2_2 = string.hash(S_3).
hash_table.char_hash(C_3, H_4) :-
    V_5 = char.to_int(C_3),
    hash_table.int_hash(V_5, H_4).
hash_table.float_hash(F_3, HeadVar__2_2) :-
    HeadVar__2_2 = float.hash(F_3).
hash_table.num_buckets(HT_3) = HeadVar__2_2 :-
    HeadVar__2_2 = array.size(V_4),
    HT_3 = hash_table.ht(V_5, V_6, V_7, V_4) : hash_table.hash_table(K_1, V_2).
hash_table.num_occupants(hash_table.ht(HeadVar__2_2, V_3, V_4, V_5)) = HeadVar__2_2.
hash_table.copy(Orig_3) = Copy_4 :-
    Orig_3 = hash_table.ht(NumOccupants_5, MaxOccupants_6, HashPred_7, Buckets0_8) : hash_table.hash_table(K_1, V_2),
    array.copy(Buckets0_8, Buckets_9),
    Copy_4 = hash_table.ht(NumOccupants_5, MaxOccupants_6, HashPred_7, Buckets_9) : hash_table.hash_table(K_1, V_2).
hash_table.set(K_5, V_6, HT_7, HeadVar__4_4) :-
    HeadVar__4_4 = hash_table.set(HT_7, K_5, V_6).
hash_table.'elem :='(K_5, HT_6, V_7) = HeadVar__4_4 :-
    HeadVar__4_4 = hash_table.set(HT_6, K_5, V_7).
hash_table.det_insert(K_5, V_6, HT_7, HeadVar__4_4) :-
    HeadVar__4_4 = hash_table.det_insert(HT_7, K_5, V_6).
hash_table.det_update(K_5, V_6, HT_7, HeadVar__4_4) :-
    HeadVar__4_4 = hash_table.det_update(HT_7, K_5, V_6).
hash_table.delete(K_4, HT_5, HeadVar__3_3) :-
    HeadVar__3_3 = hash_table.delete(HT_5, K_4).
hash_table.elem(K_4, HT_5) = HeadVar__3_3 :-
    HeadVar__3_3 = hash_table.lookup(HT_5, K_4).
hash_table.search(HT_4, K_5) = V_6 :-
    H_7 = hash_table.find_slot(HT_4, K_5),
    HT_4 = hash_table.ht(V_10, V_11, V_12, V_9) : hash_table.hash_table(K_1, V_2),
    array.unsafe_lookup(V_9, H_7, AL_8),
    hash_table.alist_search(AL_8, K_5, V_6).
hash_table.search(HT_4, K_5, HeadVar__3_3) :-
    HeadVar__3_3 = hash_table.search(HT_4, K_5).
hash_table.to_assoc_list(HT_3) = AL_4 :-
    V_5 = hash_table.to_assoc_list_2 : pred(hash_table.hash_table_alist(K_1, V_2), list.list(pair.pair(K_1, V_2)), list.list(pair.pair(K_1, V_2))),
    HT_3 = hash_table.ht(V_8, V_9, V_10, V_6) : hash_table.hash_table(K_1, V_2),
    V_7 = list.[] : list.list(pair.pair(K_1, V_2)),
    array.foldl(V_5, V_6, V_7, AL_4).
hash_table.from_assoc_list(HashPred_6, N_7, MaxOccupants_8, AList_9) = HT_10 :-
    V_11 = hash_table.init(HashPred_6, N_7, MaxOccupants_8),
    hash_table.from_assoc_list_2(AList_9, V_11, HT_10).
hash_table.from_assoc_list(HashPred_4, AList_5) = HT_6 :-
    V_7 = hash_table.init_default(HashPred_4),
    hash_table.from_assoc_list_2(AList_5, V_7, HT_6).
hash_table.fold(F_5, HT_6, X0_7) = X_8 :-
    V_9 = hash_table.fold_f(F_5) : pred(hash_table.hash_table_alist(K_1, V_2), T_3, T_3),
    HT_6 = hash_table.ht(V_11, V_12, V_13, V_10) : hash_table.hash_table(K_1, V_2),
    array.foldl(V_9, V_10, X0_7, X_8).
hash_table.fold(P_5, HT_6, STATE_VARIABLE_A_0_8, STATE_VARIABLE_A_9) :-
    V_10 = hash_table.fold_p(P_5) : pred(hash_table.hash_table_alist(K_1, V_2), T_3, T_3),
    HT_6 = hash_table.ht(V_13, V_14, V_15, V_11) : hash_table.hash_table(K_1, V_2),
    array.foldl(V_10, V_11, STATE_VARIABLE_A_0_8, STATE_VARIABLE_A_9).
:- pragma inline((hash_table.find_slot)/2).
hash_table.find_slot(HT_4, K_5) = H_6 :-
    V_7 = hash_table.hash_pred(HT_4),
    V_8 = hash_table.num_buckets(HT_4),
    hash_table.find_slot_2(V_7, K_5, V_8, H_6).
:- pragma inline((hash_table.find_slot_2)/4).
hash_table.find_slot_2(HashPred_5, K_6, NumBuckets_7, H_8) :-
    call(HashPred_5, K_6, Hash_9),
    H_8 = int.(Hash_9 /\ V_10),
    V_10 = int.(NumBuckets_7 - V_11),
    V_11 = 1 : int.
hash_table.fold_f(F_5, List_6, A0_7, A_8) :-
    ( % disjunction
      List_6 = hash_table.ht_nil : hash_table.hash_table_alist(K_1, V_2),
      A_8 = A0_7
    ;
      List_6 = hash_table.ht_single(K_9, V_10) : hash_table.hash_table_alist(K_1, V_2),
      A_8 = apply(F_5, K_9, V_10, A0_7)
    ;
      List_6 = hash_table.ht_cons(K_13, V_14, KVs_11) : hash_table.hash_table_alist(K_1, V_2),
      A1_12 = apply(F_5, K_13, V_14, A0_7),
      hash_table.fold_f(F_5, KVs_11, A1_12, A_8)
    ).
hash_table.fold_p(P_5, List_6, STATE_VARIABLE_A_0_11, STATE_VARIABLE_A_12) :-
    ( % disjunction
      List_6 = hash_table.ht_nil : hash_table.hash_table_alist(K_1, V_2),
      STATE_VARIABLE_A_12 = STATE_VARIABLE_A_0_11
    ;
      List_6 = hash_table.ht_single(K_8, V_9) : hash_table.hash_table_alist(K_1, V_2),
      call(P_5, K_8, V_9, STATE_VARIABLE_A_0_11, STATE_VARIABLE_A_12)
    ;
      List_6 = hash_table.ht_cons(K_16, V_17, KVs_10) : hash_table.hash_table_alist(K_1, V_2),
      call(P_5, K_16, V_17, STATE_VARIABLE_A_0_11, STATE_VARIABLE_A_13_13),
      hash_table.fold_p(P_5, KVs_10, STATE_VARIABLE_A_13_13, STATE_VARIABLE_A_12)
    ).
:- pragma exceptions(function, (hash_table.init), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.new), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.init_default), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.new_default), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.hash_pred), 2, 0, will_not_throw).
:- pragma exceptions(predicate, (hash_table.int_hash), 2, 0, will_not_throw).
:- pragma exceptions(predicate, (hash_table.string_hash), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.char_hash), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.float_hash), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.generic_hash), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.num_buckets), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.num_occupants), 2, 0, will_not_throw).
:- pragma exceptions(function, (hash_table.copy), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.set), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.set), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.'elem :='), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.det_insert), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.det_insert), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.det_update), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.det_update), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.delete), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.delete), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.lookup), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.elem), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.search), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.search), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.to_assoc_list), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.from_assoc_list), 5, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.from_assoc_list), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.fold), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.fold), 4, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 2, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 3, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 4, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold), 4, 5, may_throw(user_exception)).
:- pragma exceptions(function, (hash_table.find_slot), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.find_slot_2), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.alist_search), 3, 0, may_throw(type_exception)).
:- pragma exceptions(predicate, (hash_table.to_assoc_list_2), 3, 0, will_not_throw).
:- pragma exceptions(predicate, (hash_table.from_assoc_list_2), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_f), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_f), 4, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 2, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 3, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 4, may_throw(user_exception)).
:- pragma exceptions(predicate, (hash_table.fold_p), 4, 5, may_throw(user_exception)).
:- pragma termination_info(hash_table.init(builtin.in((hash_table.hash_pred)), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.new(builtin.in((hash_table.hash_pred)), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.init_default(builtin.in((hash_table.hash_pred))) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.new_default(builtin.in((hash_table.hash_pred))) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.hash_pred((hash_table.hash_table_ui)) = builtin.out((hash_table.hash_pred)), finite(-4, [no, no, yes, no]), cannot_loop).
:- pragma termination_info(hash_table.int_hash((builtin.in), (builtin.out)), infinite, cannot_loop).
:- pragma termination_info(hash_table.string_hash((builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.char_hash((builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.float_hash((builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.generic_hash((builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.num_buckets((hash_table.hash_table_ui)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.num_occupants((hash_table.hash_table_ui)) = (builtin.out), finite(-4, [no, no, yes, no]), cannot_loop).
:- pragma termination_info(hash_table.copy((hash_table.hash_table_ui)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.set((hash_table.hash_table_di), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.set((builtin.in), (builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)), infinite, can_loop).
:- pragma termination_info(hash_table.'elem :='((builtin.in), (hash_table.hash_table_di), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.det_insert((hash_table.hash_table_di), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.det_insert((builtin.in), (builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)), infinite, can_loop).
:- pragma termination_info(hash_table.det_update((hash_table.hash_table_di), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.det_update((builtin.in), (builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)), infinite, can_loop).
:- pragma termination_info(hash_table.delete((hash_table.hash_table_di), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.delete((builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)), infinite, can_loop).
:- pragma termination_info(hash_table.lookup((hash_table.hash_table_ui), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.elem((builtin.in), (hash_table.hash_table_ui)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.search((hash_table.hash_table_ui), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.search((hash_table.hash_table_ui), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.to_assoc_list((hash_table.hash_table_ui)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.from_assoc_list(builtin.in((hash_table.hash_pred)), (builtin.in), (builtin.in), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.from_assoc_list(builtin.in((hash_table.hash_pred)), (builtin.in)) = (hash_table.hash_table_uo), infinite, can_loop).
:- pragma termination_info(hash_table.fold((func((builtin.in), (builtin.in), (builtin.in)) = (builtin.out) is det), (hash_table.hash_table_ui), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.fold((func((builtin.in), (builtin.in), (builtin.di)) = (builtin.uo) is det), (hash_table.hash_table_ui), (builtin.di)) = (builtin.uo), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is det)), (hash_table.hash_table_ui), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is det)), (hash_table.hash_table_ui), (builtin.mdi), (builtin.muo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is det)), (hash_table.hash_table_ui), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is semidet)), (hash_table.hash_table_ui), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is semidet)), (hash_table.hash_table_ui), (builtin.mdi), (builtin.muo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold(builtin.in((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is semidet)), (hash_table.hash_table_ui), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(hash_table.find_slot((hash_table.hash_table_ui), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(hash_table.find_slot_2(builtin.in((hash_table.hash_pred)), (builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.alist_search((builtin.in), (builtin.in), (builtin.out)), finite(-2, [no, no, yes, no, no]), cannot_loop).
:- pragma termination_info(hash_table.to_assoc_list_2((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.from_assoc_list_2((builtin.in), (hash_table.hash_table_di), (hash_table.hash_table_uo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_f((func((builtin.in), (builtin.in), (builtin.in)) = (builtin.out) is det), (builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_f((func((builtin.in), (builtin.in), (builtin.di)) = (builtin.uo) is det), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is det), (builtin.in), (builtin.mdi), (builtin.muo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.mdi), (builtin.muo)) is semidet), (builtin.in), (builtin.mdi), (builtin.muo)), infinite, can_loop).
:- pragma termination_info(hash_table.fold_p((pred((builtin.in), (builtin.in), (builtin.di), (builtin.uo)) is semidet), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
