Elamur GroupantsโŒ•
โ˜ฐ

mlab-display-matrix-layout

The groupant beside mlab/src/display.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
costsymbolic source derivedinvariant
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
state_invariantstate_invariantpartial source derived modelstate_invariant
failure_precedencefailure_precedencepartial source derived modelfailure_precedence
representation_transportrepresentation_transportpartial source derived modelrepresentation_transport
resource_costresource_costpartial source derived modelresource_cost

Model text

descriptant

mlab-display-matrix-layout

Map storage j*r+i into row vectors with common field width, then partition columns into blocks of max(1,80/width).

Modeling epoch โ€” 2026-10-31

Prospective source read preceded edits. Bounded synthetic checks and selected existing safe tests exercise actual code; paired debug/release results and compiled negative-control assertions are retained externally. Frozen scenario, corpus, external measurement, full-school and training effects are unexecuted. Partial lexical syntax supplies no macro-expanded or semantic proof.

approximant

Forward relation

Map storage j*r+i into row vectors with common field width, then partition columns into blocks of max(1,80/width).

Domain

Valid Rust value/storage invariants and available bounded resources; exact branch and effect observations only.

Executable approximant gap

No useful percentage-error surrogate is established for these categorical, textual or effectful observations. Supported future caps are 1%, 2%, 5%, 10%; no executable approximation or production substitution is claimed.

invariant

Invariants and costs

Every row visits columns in increasing order. Last two-column block uses and rather than through header.

Failure ordering

Invalid Mat storage can panic during indexing; output buffering has no fallible allocation API.

Cost

O(rows*cols + output bytes) time and buffered cells; no streaming interface.

models

Typed models โ€” mlab-display-matrix-layout

Source-derived partial relations; finite checks do not prove universality.

behavior_complement

Matrix complex -0 excludes minus separator because only <0 is checked. Block headers are absent when all columns fit.

reverse_reconstruction

Aligned row strings admit matrices of compatible shape and quantized scalar cells; common width and block headers constrain shape but not original floats.

state_invariant

Every row visits columns in increasing order. Last two-column block uses and rather than through header.

failure_precedence

Invalid Mat storage can panic during indexing; output buffering has no fallible allocation API.

representation_transport

Logical width is 3, real width is 2+field width, complex adds signs/imaginary field; terminal width is nominal characters.

resource_cost

O(rows*cols + output bytes) time and buffered cells; no streaming interface.

tests

Evidence and limitations

Parent source checks: display::tests::scalars_short, display::tests::matrix_rows. The fragment's actual statements lie in the recorded byte range; parent checks need not exercise every branch in this fragment. See ../tests.md for source-level control and limitations.

AST projection generated twice to fresh files and compared byte-for-byte. Runtime evidence is finite and does not establish every branch, allocation failure, backend implementation or effect path. No optimization or speed claim.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/mlab/src/display.rs.groupant/matrix-layout.groupant/