onto-store-reader
The groupant beside onto/src/store.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.
Facts
Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.
Components
| component | label | where |
|---|---|---|
| approximant | partial | approximant |
| ast | partial | ../syntax.json |
| composition | partial | composition |
| cost | partial | cost |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | executed bounded checks | tests |
Obernants
The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.
| id | type | label | where |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
cursor_induction | cursor_induction | partial source derived model | cursor_induction |
array_length | array_length | partial source derived model | array_length |
utf8_gate | utf8_gate | partial source derived model | utf8_gate |
allocation_boundary | allocation_boundary | partial source derived model | allocation_boundary |
Model text
descriptant
onto-store-reader
Cursor p starts0; take(n) if n<=B-p returns b[p..p+n] and p'=p+n<=B
Epoch 2026-10-31
Specialized source fragment bytes [1951,2948); shared parent AST. Excludes unrelated parent operations and added test module.
approximant
Scoped forward
Cursor p starts0; take(n) if n<=B-p returns b[p..p+n] and p'=p+n<=B
Domain
This byte-scoped operator uses the parent valid-state domain plus the following local restrictions:
p0=0<=B; successful guarded step keeps p'<=B
u64→usize checked; u32 byte count checked_mul4
string requires String::from_utf8 after bounded bytes
Bounded slice before vector allocation, no total RAM guarantee
No executable percentage surrogate established.
invariant
Local observations
n>remaining excludes success and cursor advance; oversized n cannot overflow addition
p0=0<=B; successful guarded step keeps p'<=B
u64→usize checked; u32 byte count checked_mul4
string requires String::from_utf8 after bounded bytes
Bounded slice before vector allocation, no total RAM guarantee
cost
Scoped cost
O(n) copied array bytes; take itself O(1), cursor O(1).
Restriction to this operator's traversed inputs; parent total is not charged to every fragment. No standalone measurement.
composition
Parent join
reader supplies the parent relation: Cursor p starts0; take(n) if n<=B-p returns b[p..p+n] and p'=p+n<=B
Output compatibility is conditional on the local domain and earlier-branch exclusions. Other parent branches are outside this fragment.
models
behavior_complement
n>remaining excludes success and cursor advance; oversized n cannot overflow addition
reverse_reconstruction
Returned slice/new cursor recovers old p=p'-n; unrelated bytes unconstrained
cursor_induction
p0=0<=B; successful guarded step keeps p'<=B
array_length
u64→usize checked; u32 byte count checked_mul4
utf8_gate
string requires String::from_utf8 after bounded bytes
allocation_boundary
Bounded slice before vector allocation, no total RAM guarantee
tests
Evidence
Parent tests.md identifies selected actual-code checks. Fragment is a source-scoped partial model; parent finite fixtures do not establish exhaustive branch coverage or every local equation.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/onto/src/store.rs.groupant/reader.groupant/