On this page
System.Storage_Elements
Storage/address integer types and numeric address conversions.
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
Converting between Address and Integer_Address changes only the number's type: it does not establish valid memory, alignment, type or ownership.
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 System.Storage_Elements;import System.Storage_Elements;
A Vibe module imports this unit's names with from System.Storage_Elements 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
Storage_Offset (declaration) — Signed64 storage-unit offset; addition and conversion still need their normal range/overflow checks.
Declared interface:
type Storage_Offset is range -(2 ** 63) .. 2 ** 63 - 1;API 002
Storage_Count (declaration) — Nonnegative Storage_Offset subtype for counts; it does not establish an allocation exists.
Declared interface:
subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last;API 003
Storage_Element (declaration) — Modular byte-sized storage-unit value under System.Storage_Unit=8.
Declared interface:
type Storage_Element is mod 2 ** Storage_Unit;API 004
Integer_Address (declaration) — Modular numeric address value under Memory_Size=2**64; To_Address performs a numeric conversion, not memory mapping.
Declared interface:
type Integer_Address is mod Memory_Size;API 005
To_Address (declaration) — Convert the numeric address representation; no memory mapping or pointee validation occurs.
API 006
To_Integer (declaration) — Convert a Big_Integer to Integer only after its explicit In_Range precondition.