Reading, calling, writing and returning a borrowed buffer #
The source program reads the current first cell, calls a real branching helper,
writes its returned value, takes a full slice and returns that actual view.
Its specification uses ordinary native array contents and Array.set. A slice
does not copy storage: the returned handle is the original view, now observing
the shared write. All other cells of the view retain their original values.
The proof uses generated function equations and the shared heap contracts, without exposing object storage, typed environment construction or registers. This file establishes source behavior; machine realization and cost are separate.
The finite table of actual named source bodies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ordinary mathematical function generated from the same represented source block.
Equations
Instances For
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
- Complexity.Language.Examples.BorrowedBuffer.Implementation.clipHead_onArgs function✝ env✝ = function✝ env✝.head env✝.tail.head
Instances For
Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.
Automatic correspondence for the same generated source function, without a machine budget.
Fold an actual source invocation back to its named ordinary-argument observation.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
Instances For
This named source function's index in its declared signature table.
Equations
Instances For
This named source function's index in its declared signature table.
Equations
Instances For
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
Instances For
Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The same source execution returns the encoded mathematical result without changing its supplied heap, under the actual input representations.
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
The source program's declared first-order signatures.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
Exact total source contract derived from the checked encoded-result equation and the existing raw-input reconstruction, with the same final heap.
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One source-body equation in ordinary monadic notation; named callees remain opaque.
Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
- Complexity.Language.Examples.BorrowedBuffer.Implementation.clamp_onArgs function✝ env✝ = function✝ env✝.head env✝.tail.head
Instances For
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The branching helper computes the ordinary mathematical minimum and preserves any current heap, without assuming that heap is empty.
Generated contract conversion reuses the ordinary helper proof directly.
Native verification composes the public read, write and slice specifications. The remaining conditions concern only ordinary array contents and the returned view.
The same native triple establishes actual finite source evaluation and its final-heap contents, rather than only a partial-correctness implication.
An ordinary array specification of the same declaration, obtained through its generated curried contract equivalence rather than source constructor proofs.