Elamur Groupants⌕
☰

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

componentlabelwhere
approximantpartialapproximant
astpartial../syntax.json
compositionpartialcomposition
costpartialcost
descriptantpresentdescriptant
invariantpartialinvariant
testsexecuted bounded checkstests

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.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
cursor_inductioncursor_inductionpartial source derived modelcursor_induction
array_lengtharray_lengthpartial source derived modelarray_length
utf8_gateutf8_gatepartial source derived modelutf8_gate
allocation_boundaryallocation_boundarypartial source derived modelallocation_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/