docs: refine checked-type properties and invariant audit inventory
This commit is contained in:
1 parent
4cda44823d
commit
8df6cacf12
7 files changed
+155
-9
No files matched your search
@@ -64,7 +64,7 @@ Initially unsupported bindings are observations of a borrowed/slice result, or a
|
||||
|
||||
## Report rows and canonical form
|
||||
|
||||
For modules declaring the proposed contracts feature, append a `contracts` object after existing `unsafe`. The proposed checked-type and assumption extensions depend on it, so their full declared dependency closure also triggers this section. Otherwise emit exactly today's report bytes. Its fixed field order is `rows`, `totals`. Feature-declared modules with no truth sites emit an empty rows array and four zero totals. Every new object has the field order specified below; no optional omissions, unknown keys, whitespace or floating-point numbers. Use the existing canonical-record string escaping.
|
||||
For modules declaring the proposed contracts feature, append a `contracts` object after existing `unsafe`. The proposed checked-type and assumption extensions depend on it, so their full declared dependency closure also triggers this section. Otherwise emit exactly today's report bytes. Its fixed field order is `rows`, `totals`, then `types` under the [checked inventory refinement](contract-source-and-module-state.md#declared-claims-in-the-report). Feature-declared modules with no truth sites emit an empty rows array and four zero totals; types is empty when no checked identity occurs. Every new object has the field order specified below or in that refinement; no optional omissions, unknown keys, whitespace or floating-point numbers. Use the existing canonical-record string escaping.
|
||||
|
||||
Rows iterate functions, blocks and instructions in textual module order, one per pre/post or make/modify operation. Old/view/take are not truth rows. Snapshot helper execution remains in the call graph. This gives stable declaration-site counts independent of callers, number of returns or invocations.
|
||||
|
||||
@@ -104,4 +104,4 @@ Five current-language probes at `a4181f2` confirm byte-identical reports after A
|
||||
|
||||
The exact-limit vector is attainable within ordinary structural bounds: a 63-parameter helper has 64 bool constants, a one-field Data struct.make, 30 copies and one ret (H=128, N=65). One post covers 8,191 syntactic returns, binds original parameters and has D=O=0, so C=1,048,576. Replacing one unused binding with result from an original parameter gives D=1 and budget fallback at 1,048,577, without changing truth or acceptance. These are proposed classifier vectors, not an executed new-contract test. Old-identity vectors use a two-position identity old helper plus one binding, O=3; Range field predicates have H=17, N=5.
|
||||
|
||||
The [report component vector](contract-report-vector.json) pins field order and all four statuses, including a two-return post and a modify callback. It has five rows and six covered boundaries, with totals counting five sites. It is a proposed contracts component, formatted for inspection, not output captured from today's CLI. Its conceptual function f has pre sites 0..2, old at 3 and post at 4; left/right return different Data parameters, yielding the cost-16 vector above. Function g's modify row is runtime/update. No module-state declaration is implied.
|
||||
The [report component vector](contract-report-vector.json) pins field order and all four statuses, including a two-return post, a modify callback and a constant Range make. It has six rows and seven covered boundaries, with totals counting six sites. It is a proposed contracts component, formatted for inspection, not output captured from today's CLI. Its conceptual function f has pre sites 0..2, old at 3 and post at 4; left/right return different Data parameters, yielding the cost-16 vector above. Function g's modify row is runtime/update over StateRep with an unsupported classifier predicate. Function h constructs Rep {lo:0,hi:5} in raw and makes its checked value at instruction 3. The inventory lists StateRep first through g's signature, Rep second at h's make, and an unused always-true u64 witness last; ordinary declarations and earlier signatures contain no checked type. Universal within stays runtime/not_established even though h's make is proven. No module-state declaration or source provenance is implied.
|
||||
Reference in new issue
Block a user