B3003: global not listed in the Global contract
Catalog status: active. Default severity: error. Stable name: global-missing. Family: Flow and effects.
A subprogram with a Global contract reads or writes a library-level variable the contract does not list. Callers rely on Global to know what a call touches, so it must be complete. Writes and reads through called subprograms count too; the label says which callee.
Example (Vada)
procedure Bump with Global => (In_Out => Count);
...
procedure Bump is
begin
if Count < Limit then -- Limit is read but not listedExample (Varc)
pub fn bump() @Global(In_Out => count) {
if count < limit { // limit is read but not listed
A subprogram designated by an access value (Bump'Access) may use only what the access type's Global states, since a call through the value is known only by its type; a type without Global lets it use none.
What to do
Add the variable with the mode the advice suggests (Input, Output, In_Out or Proof_In), or remove the Global contract and let Verada infer it (--show-flow shows the inferred one). For a designated subprogram, pass what it uses as a parameter, or state it in the access type's Global.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See flow and effects, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.