On this page
Ownership, reclamation, and exceptional boundaries
Resource proof asks who is responsible for each allocated object, which aliases can observe or change it, and what happens on every relevant exit. Numeric safety alone does not answer those questions. Verada combines ownership flow with leak/finalizer obligations; the shared ownership reference defines the exact supported forms.
Reason in terms of ownership transitions
An owning access value has responsibility for its designated object. Allocating establishes a new owned value. Assignment of an owning value transfers responsibility; it does not create two independently usable owners. After a move, the source or moved component is unavailable until restored. An operation must return required writable parameters/globals in an appropriate whole state.
Allocated designated values must be initialized under the supported allocation rules; ownership of a fresh address is not permission to read unset fields.
For each update, write down the transition: which object owns the node before the statement, which owns it afterward, which fields were moved, and which local is dying. This makes an ownership diagnostic much easier to understand than treating every pointer-shaped value as an ordinary copyable address.
The Vibe linked stack is a concrete example: moving head into a local, restoring the stack from the node's next, reading its value, and deleting the removed node. The Vada/Varc presentations obey the same ownership model, with their own allocation/deallocation spellings.
Partial moves and control flow
Moving one field can make reading its enclosing record invalid, because the whole value contains a moved part. Restoring that field restores the appropriate usable state. At branch joins, the checker must account for every possible path, not just the last branch you inspected. A loop cannot silently accumulate moved state that violates its next iteration's requirements.
Dynamic indexed places can be tracked conservatively. If two accesses might designate the same owned region, changing the index spelling is not proof that they are independent. Use a permitted abstraction or a clearer disjointness/lifetime structure instead of adding arithmetic assertions that do not address alias identity.
B6002 identifies use after move, B6003 incomplete restoration at return, B6004 moving from an observed input, and B6008 a move left across a loop iteration. Repair the actual ownership transition. Replacing a read with an unproved assumption does not restore the missing owner.
Borrowers and observers
A borrower provides supported temporary exclusive writable access; conflicting source use is suspended during its lifetime. An observer provides read-only access that prevents changes invalidating the observed structure. An owner can become usable again after the borrow's scope ends or the supported return of a borrow.
Before calling through a borrowed value, check that the expected type, designated subtype, mutability and source lifetime match. Avoid retaining a view longer than the computation needs. B6009/B6010 can reveal an unnecessarily wide scope, a conflicting whole-object update, or an attempted escape of a temporary reference.
A traversal is specified with At_End_Borrow (the language chapter): the prover gives each borrow ghost prophecies, values for the borrower and the borrowed part where the borrow ends. Each step B := B.Next relates the old prophecy to the new one (the old borrower's value with that part the new borrower's, which the old one can no longer change). At the borrow's end the last prophecy is the borrower's value, and the owner's part is the first. Without a pledge in the loop invariant, the owner's part is unknown after a borrower that moved on. Vibe local/element views are frontend transformations with additional restrictions, not native syntax for every shared anonymous-access borrower/observer form, and have no At_End.
Leak obligations and explicit deallocation
Dropping or overwriting a live unreclaimed owner must not lose its allocation. Leak checks include relevant composite parts and scope/return paths. A safely transferred owner is different from an address discarded into an untracked location.
An instance of Ada.Unchecked_Deallocation is constrained by Verada ownership despite its library name. Freeing a node does not automatically free its owned child chain. Move or release those children under the abstraction's contract before losing the outer node. Vibe del owner invokes the generated deallocator for its supported owned class; it is not Python binding deletion or garbage collection.
Leak freedom is proved, not checked at run time. An advisory program that runs its sample input does not show leak freedom because no run-time check failed. Use the mode matrix and resource/debug tests as separate evidence, and complete strict resource proof for the intended release claim.
Reclaimed limited abstractions
A limited reclaimed type registers a supported finalizer. Because ordinary copying is forbidden, one logical object owns its resources until transferred or finalized. The finalizer must accept implicit calls without a precondition, terminate, and discharge the required owned resources. Its effects contribute to callers even when the source contains no explicit release call.
Reason through normal scope end, early return, loop exit, supported temporaries and user exception propagation. Moved parts must not be finalized again as though they still own their former allocation. A branch-dependent partially moved finalizable object can require restoring a consistent state before exit.
Relaxed_Finalization => True is part of the supported contract, and program-termination finalization is not generally guaranteed. Do not rely on a library-level finalizer to send a required protocol message or commit important application state when the process ends. Use an explicit proved operation for required externally observable work.
Copyable reclaimed values
A copyable nonlimited reclaimed type supplies Adjust as well as Finalize. The adjuster makes a copied value's resource state valid, has no precondition, must terminate, and requires Global => null. Direct owned access components cannot simply be duplicated by copying.
Immutable runtime-managed text illustrates a valid separate representation: logical copies can share immutable character storage internally while the runtime maintains holder counts. Client proof uses string/value contracts, not accidental allocation counts or buffer identity. Different compilers can place incidental copies differently; do not use adjustment counts as an ordinary semantic signal.
Review assignment order and aggregate/result/temporary behavior when building a new resource abstraction. A tested scalar copy is not evidence for every nested array/container case. Use the supplied type's documented API instead of freeing an internal handle directly.
Normal and exceptional state are different
Ordinary postconditions apply on normal return. Exceptional_Cases describes permitted propagated user exceptions and their consequences. A body may change state before raising; whether those changes are visible depends on the parameter/state model, not on a universal transaction rule.
In particular, by-copy out/in out formals do not receive normal copyback on exceptional return. Tagged/class-wide/limited by-reference state can already be modified. An exceptional contract must not promise a caller-visible updated by-copy formal as though normal return occurred. Use permitted entry snapshots or stable abstract state where required. The account example explicitly phrases exceptional consequences using entry state.
A raise must be handled locally, permitted by the effective exceptional contract, or proved unreachable where propagation is forbidden. Making a forbidden path unreachable is an obligation on the actual control conditions, not a promise supplied by naming the exception.
Functions do not generally propagate user exceptions; supported mutating-result operations can be procedures underneath and have their own interface. Check the actual declaration, not only whether its surface keyword is fn or def.
Handlers and safe recovery
A handled exception transfers control under the shared user-exception rules. State at a handler can reflect any relevant raise path; reestablish what recovery needs before reading or returning values. A catch-all user handler is not a mechanism for recovering from unproved overflow or resource exhaustion. Runtime-check failures in development modes are a different failure path from ordinary user exceptions.
Vibe element views defer replacement until scope end and reject an explicit raise before putback; use explicit copying and replacement when the algorithm must expose the container or propagate an exception before then. See Vibe sharing and exception rules for the supported boundaries.
In the REPL, a failed input can poison potentially written session globals. Effects are not rolled back, and reset/finalization treats invalid state cautiously. Do not infer that recovering the prompt restored ownership and invariants of every previous object.
Review a resource abstraction
Inventory its owners, copyable values, borrows, observers, finalizers and foreign storage. For each public operation, check alias/lifetime assumptions, normal result/model guarantees, exceptional effects and ownership restoration. Then inspect every exit for leaks/double release and every implicit callback/finalizer for unaccounted effects. Test representative resource and exceptional paths independently of the proof summary.
A structure that is not a tree, such as a doubly linked list or a graph with shared vertices, is written as an arena with index models or as a proof enclave, whose fence keeps its pointers from the rest of the program while a heap logic proves its bodies.