mlab-ext-nist-helpers
The groupant beside mlab/tests/ext_nist.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 |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | partial bounded parent evidence | 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 |
header_coordinates | header_coordinates | partial source derived model | header_coordinates |
metric_zero | metric_zero | partial source derived model | metric_zero |
branch_relation | branch_relation | partial source derived model | branch_relation |
resource_cost | resource_cost | partial source derived model | resource_cost |
Model text
descriptant
mlab-ext-nist-helpers
data_rows locates Data+lines header, extracts first two integers and inclusive1-based span, keeps numeric tokens. num normalizes uppercaseD. after selects first matching line with parseable token scanning right. lre equality first=>15, nonfinite q=>0, zero c uses absolute error, otherwise relative, clamp0..15.
Epoch 2026-10-31: isolated source-bound fragment over bytes [650,3002); includes no claim beyond this relation. Source hash 82ac1127de001872692aa31cc92c6bf01f367afe18cfbd08941641a96851256c.
approximant
helpers: forward relation
data_rows locates Data+lines header, extracts first two integers and inclusive1-based span, keeps numeric tokens. num normalizes uppercaseD. after selects first matching line with parseable token scanning right. lre equality first=>15, nonfinite q=>0, zero c uses absolute error, otherwise relative, clamp0..15.
Domain: Well-formed one-based header spans and bounded synthetic data; frozen certified datasets unexecuted.
Executable surrogate gap: no measured cheaper implementation with a useful scoped metric is supplied. Categorical/error/effect relations are exact obligations, not percent losses. Future numeric caps only1/2/5/10%.
invariant
helpers: invariant and cost
A=3,B=4 selects Rust lines[2..4], retaining both endpoints.
q=.001,c=0 yields3; q=infinity,c=1 yields0; min_lre empty starts15.
Scope-specific cost: O(text bytes) parsing plus O(selected numeric tokens) storage; LRE O(1), matrix literal O(rendered bytes).
models
behavior_complement
Invalid span can panic; nonnumeric tokens skipped rather than rejected. Equal infinities yield15 by equality-before-finite, not a general finite accuracy claim.
reverse_reconstruction
data_rows output admits ignored labels and whitespace and arbitrary lines outside span; LRE cap15 admits exact match and sufficiently small errors.
header_coordinates
A=3,B=4 selects Rust lines[2..4], retaining both endpoints.
metric_zero
q=.001,c=0 yields3; q=infinity,c=1 yields0; min_lre empty starts15.
branch_relation
data_rows locates Data+lines header, extracts first two integers and inclusive1-based span, keeps numeric tokens. num normalizes uppercaseD. after selects first matching line with parseable token scanning right. lre equality first=>15, nonfinite q=>0, zero c uses absolute error, otherwise relative, clamp0..15.
resource_cost
O(text bytes) parsing plus O(selected numeric tokens) storage; LRE O(1), matrix literal O(rendered bytes).
tests
Evidence boundary
See ../tests.md for the actual selected source test and mutant. These tests sample the file, not every fragment branch. Invalid span can panic; nonnumeric tokens skipped rather than rejected. Equal infinities yield15 by equality-before-finite, not a general finite accuracy claim. Other branches here are source-derived and unexecuted unless the parent test explicitly calls them.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/mlab/tests/ext_nist.rs.groupant/helpers.groupant/