BitfieldDomain.BitfieldArithmodule Ints_t : IntOps.IntOpsinclude sig ... endval zero_mask : Ints_t.tval one_mask : Ints_t.tval bitmask_up_to : int -> Ints_t.tval is_power_of_two : Ints_t.t -> boolWhether any represented value is negative when interpreted using ik. The kind determines signedness and the position of the sign bit, via min. As with min, the bitfield is assumed to be valid for that kind.
val has_neg_values' : ('a * Ints_t.t) -> boolWhether the infinite sign extension permits negative values. Unlike has_neg_values, this takes no kind: it assumes a valid, correctly sign-extended (or zero-extended unsigned) bitfield and inspects its leading bits instead of interpreting a finite-width sign bit. Leading ones in o allow negative values, whether those bits are known ones or unknown. Thus top satisfies this predicate, unlike has_only_neg_values'. Correctly zero-extended unsigned values do not. The two has_neg_values variants agree when ik matches the kind used to extend the bitfield. This variant is useful for shift counts, whose kind need not match the left operand's kind and is unavailable in the shift interface. Bottom must be handled separately.
Whether all represented values are negative when interpreted using ik. The kind determines signedness and the position of the sign bit, via max. As with max, the bitfield is assumed to be valid for that kind.
Whether the infinite sign extension encodes definitely negative values. Unlike has_only_neg_values, this takes no kind: it assumes a valid, correctly sign-extended bitfield and inspects its leading bits instead of interpreting a finite-width sign bit. Leading zeros in z disallow zero value bits, while leading ones in o allow one value bits. Unknown leading bits (including top) therefore do not satisfy this predicate. For valid, sign-extended signed bitfields, the two predicates agree. This variant is useful for shift counts, whose kind need not match the left operand's kind and is not available in the shift interface.
val may_exceed_shift_count : GoblintCil.Cil.ikind -> ('a * Ints_t.t) -> boolFor a count with no negative possibilities, o is its maximum. ik belongs to the left operand, not the count.