extern_spec_isize_overflowing_add

Function extern_spec_isize_overflowing_add 

Source
pub fn extern_spec_isize_overflowing_add(
    self_: isize,
    rhs: isize,
) -> (isize, bool)
Expand description

extern spec for isize::overflowing_add

This is not a real function: its only use is for documentation.

terminates

ghost

ensures

(self@ $op rhs@) >= $type::MIN@ && (self@ $op rhs@) <= $type::MAX@
                    ==> result.0@ == (self@ $op rhs@)

ensures

exists<k: Int> result.0@ == (self@ $op rhs@) + k * ($type::MAX@ - $type::MIN@ + 1)

ensures

result.1 == ((self@ $op rhs@) < $type::MIN@ || (self@ $op rhs@) > $type::MAX@)