:- module stack.
:- pragma termination_info(stack.init((builtin.out)), finite(1, [no, no]), cannot_loop).
:- pragma termination_info((stack.init) = (builtin.out), finite(1, [no, no]), cannot_loop).
:- pragma termination_info(stack.is_empty((builtin.in)), finite(0, [no, no]), cannot_loop).
:- pragma termination_info(stack.is_full((builtin.in)), finite(0, [no, no]), cannot_loop).
:- pragma termination_info(stack.push((builtin.in), (builtin.in), (builtin.out)), finite(2, [no, yes, yes, no]), cannot_loop).
:- pragma termination_info(stack.push((builtin.in), (builtin.in)) = (builtin.out), finite(2, [no, yes, yes, no]), cannot_loop).
:- pragma termination_info(stack.push_list((builtin.in), (builtin.in), (builtin.out)), finite(0, [no, yes, yes, no]), can_loop).
:- pragma termination_info(stack.push_list((builtin.in), (builtin.in)) = (builtin.out), finite(0, [no, yes, yes, no]), can_loop).
:- pragma termination_info(stack.top((builtin.in), (builtin.out)), finite(-3, [no, yes, no]), cannot_loop).
:- pragma termination_info(stack.det_top((builtin.in), (builtin.out)), finite(-3, [no, yes, no]), cannot_loop).
:- pragma termination_info(stack.det_top((builtin.in)) = (builtin.out), finite(-3, [no, yes, no]), cannot_loop).
:- pragma termination_info(stack.pop((builtin.out), (builtin.in), (builtin.out)), finite(-2, [no, no, yes, no]), cannot_loop).
:- pragma termination_info(stack.det_pop((builtin.out), (builtin.in), (builtin.out)), finite(-2, [no, no, yes, no]), cannot_loop).
:- pragma termination_info(stack.depth((builtin.in), (builtin.out)), finite(0, [no, no, no]), cannot_loop).
:- pragma termination_info(stack.depth((builtin.in)) = (builtin.out), finite(0, [no, no, no]), cannot_loop).
:- pragma exceptions(predicate, (stack.init), 1, 0, will_not_throw).
:- pragma exceptions(function, (stack.init), 1, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.is_empty), 1, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.is_full), 1, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.push), 3, 0, will_not_throw).
:- pragma exceptions(function, (stack.push), 3, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.push_list), 3, 0, will_not_throw).
:- pragma exceptions(function, (stack.push_list), 3, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.top), 2, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.det_top), 2, 0, may_throw(user_exception)).
:- pragma exceptions(function, (stack.det_top), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (stack.pop), 3, 0, will_not_throw).
:- pragma exceptions(predicate, (stack.det_pop), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (stack.depth), 2, 0, will_not_throw).
:- pragma exceptions(function, (stack.depth), 2, 0, will_not_throw).
