:- module version_bitmap.
:- use_module bool, builtin, exception, int, private_builtin, version_array.
:- type version_bitmap.version_bitmap == version_array.version_array(int).
version_bitmap.num_bits(BM_3) = HeadVar__2_2 :-
    V_4 = 0 : int,
    HeadVar__2_2 = version_array.elem(V_4, BM_3).
version_bitmap.set(I_4, BM_5, HeadVar__3_3) :-
    HeadVar__3_3 = version_bitmap.set(BM_5, I_4).
version_bitmap.clear(I_4, BM_5, HeadVar__3_3) :-
    HeadVar__3_3 = version_bitmap.clear(BM_5, I_4).
version_bitmap.flip(I_4, BM_5, HeadVar__3_3) :-
    HeadVar__3_3 = version_bitmap.flip(BM_5, I_4).
version_bitmap.bit(I_5, BM_4) = HeadVar__3_3 :-
    (if
      version_bitmap.is_set(BM_4, I_5)
    then
      HeadVar__3_3 = bool.yes : bool.bool
    else
      HeadVar__3_3 = bool.no : bool.bool
    ).
version_bitmap.copy(BM_3) = HeadVar__2_2 :-
    HeadVar__2_2 = version_array.copy(BM_3).
version_bitmap.resize(N_5, B_6, BM_7, HeadVar__4_4) :-
    HeadVar__4_4 = version_bitmap.resize(BM_7, N_5, B_6).
version_bitmap.unsafe_rewind(BM_3) = HeadVar__2_2 :-
    HeadVar__2_2 = version_array.unsafe_rewind(BM_3).
version_bitmap.unsafe_rewind(BM_3, HeadVar__2_2) :-
    HeadVar__2_2 = version_bitmap.unsafe_rewind(BM_3).
:- pragma exceptions(function, (version_bitmap.init), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.num_bits), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.set), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.set), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.clear), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.clear), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.flip), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.flip), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.is_set), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.is_clear), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.bit), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.'bit :='), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.copy), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.complement), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.union), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.intersect), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.difference), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.xor), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.resize), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.resize), 4, 0, may_throw(user_exception)).
:- pragma exceptions(function, (version_bitmap.unsafe_rewind), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (version_bitmap.unsafe_rewind), 2, 0, may_throw(user_exception)).
:- pragma termination_info(version_bitmap.init((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.num_bits((builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.set((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.set((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(version_bitmap.clear((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.clear((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(version_bitmap.flip((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.flip((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(version_bitmap.is_set((builtin.in), (builtin.in)), finite(0, [no, no]), can_loop).
:- pragma termination_info(version_bitmap.is_clear((builtin.in), (builtin.in)), finite(0, [no, no]), can_loop).
:- pragma termination_info(version_bitmap.bit((builtin.in), (builtin.in)) = (builtin.out), finite(0, [no, no, no]), can_loop).
:- pragma termination_info(version_bitmap.'bit :='((builtin.in), (builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.copy((builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.complement((builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.union((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.intersect((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.difference((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.xor((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.resize((builtin.in), (builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.resize((builtin.in), (builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(version_bitmap.unsafe_rewind((builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(version_bitmap.unsafe_rewind((builtin.in), (builtin.out)), infinite, can_loop).
