On this page
Interfaces
Fixed-width integer types and unsigned shift/rotate intrinsics.
Read the family guide for representation, selection and resource rules. The complete declaration page retains exact signatures/contracts; the source specification is the implementation baseline.
Availability and ownership
Shifts are defined for any amount, including the width and beyond; rotations take the amount modulo the width. No timing property is stated.
A client proof uses these contracts without proving the body again (see library assurance). Global => null excludes package-global effects, not changes made through an in out argument.
Import and instantiate
with Interfaces;import Interfaces;
A Vibe module imports this unit's names with from Interfaces import Name; see library use across syntaxes. In Varc, keep each name's declared spelling and write & on arguments the call changes.
Contract and lifecycle reading
A Pre condition is the caller's obligation; a Post is what a normal return guarantees. What a postcondition does not state, a client cannot assume. Ghost functions are for contracts and ghost code. The family guide describes copying, lifetime, order and cost.
API 001
Integer_8 (declaration) — Signed 8-bit integer value with the exact declared range; arithmetic remains subject to its proof/runtime rules.
Declared interface:
type Integer_8 is range -2 ** (8 - 1) .. 2 ** (8 - 1) - 1;API 002
Integer_16 (declaration) — Signed 16-bit integer value with the exact declared range; arithmetic remains subject to its proof/runtime rules.
Declared interface:
type Integer_16 is range -2 ** (16 - 1) .. 2 ** (16 - 1) - 1;API 003
Integer_32 (declaration) — Signed 32-bit integer value with the exact declared range; arithmetic remains subject to its proof/runtime rules.
Declared interface:
type Integer_32 is range -2 ** (32 - 1) .. 2 ** (32 - 1) - 1;API 004
Integer_64 (declaration) — Signed 64-bit integer value with the exact declared range; arithmetic remains subject to its proof/runtime rules.
Declared interface:
type Integer_64 is range -2 ** (64 - 1) .. 2 ** (64 - 1) - 1;API 005
Unsigned_8 (declaration) — 8-bit modular unsigned value; arithmetic wraps modulo 2**8. The shift/rotate intrinsics use that same width.
Declared interface:
type Unsigned_8 is mod 2 ** 8;API 006
Unsigned_16 (declaration) — 16-bit modular unsigned value; arithmetic wraps modulo 2**16. The shift/rotate intrinsics use that same width.
Declared interface:
type Unsigned_16 is mod 2 ** 16;API 007
Unsigned_32 (declaration) — 32-bit modular unsigned value; arithmetic wraps modulo 2**32. The shift/rotate intrinsics use that same width.
Declared interface:
type Unsigned_32 is mod 2 ** 32;API 008
Unsigned_64 (declaration) — 64-bit modular unsigned value; arithmetic wraps modulo 2**64. The shift/rotate intrinsics use that same width.
Declared interface:
type Unsigned_64 is mod 2 ** 64;API 009
Shift_Left (declaration) — Shift unsigned bits left; amounts at/above width produce zero.
API 010
Shift_Right (declaration) — Logical unsigned right shift; amounts at/above width produce zero.
API 011
Shift_Right_Arithmetic (declaration) — Right shift treating the top bit as sign; large amounts fill with that sign bit.
API 012
Rotate_Left (declaration) — Rotate bits left with amount reduced modulo the operand width.
API 013
Rotate_Right (declaration) — Rotate bits right with amount reduced modulo the operand width.
API 014
Shift_Left (declaration) — Shift unsigned bits left; amounts at/above width produce zero.
API 015
Shift_Right (declaration) — Logical unsigned right shift; amounts at/above width produce zero.
API 016
Shift_Right_Arithmetic (declaration) — Right shift treating the top bit as sign; large amounts fill with that sign bit.
API 017
Rotate_Left (declaration) — Rotate bits left with amount reduced modulo the operand width.
API 018
Rotate_Right (declaration) — Rotate bits right with amount reduced modulo the operand width.
API 019
Shift_Left (declaration) — Shift unsigned bits left; amounts at/above width produce zero.
API 020
Shift_Right (declaration) — Logical unsigned right shift; amounts at/above width produce zero.
API 021
Shift_Right_Arithmetic (declaration) — Right shift treating the top bit as sign; large amounts fill with that sign bit.
API 022
Rotate_Left (declaration) — Rotate bits left with amount reduced modulo the operand width.
API 023
Rotate_Right (declaration) — Rotate bits right with amount reduced modulo the operand width.
API 024
Shift_Left (declaration) — Shift unsigned bits left; amounts at/above width produce zero.
API 025
Shift_Right (declaration) — Logical unsigned right shift; amounts at/above width produce zero.
API 026
Shift_Right_Arithmetic (declaration) — Right shift treating the top bit as sign; large amounts fill with that sign bit.
API 027
Rotate_Left (declaration) — Rotate bits left with amount reduced modulo the operand width.
API 028
Rotate_Right (declaration) — Rotate bits right with amount reduced modulo the operand width.