Elamur GroupantsโŒ•
โ˜ฐ

mlab-vm

The groupant beside mlab/src/vm.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
astpartialsyntax.json
compositionpartialcomposition
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
representation_transportrepresentation_transportpartial source derived modelrepresentation_transport
fallback_transportfallback_transportpartial source derived modelfallback_transport
compiler_limitscompiler_limitspartial source derived modelcompiler_limits
floating_coordinate_gatefloating_coordinate_gatepartial source derived modelfloating_coordinate_gate

Parts

Model text

descriptant

mlab-vm

Register compiler/executor with compact scalar registers, Rc value copy-on-write, static fallback statements and dynamic expression dispatch; workspace moves between frames and registers.

Epoch 2026-10-31

Prospective source model preceded test additions. No production semantics changed. Seven legacy files are modeled, with source-scoped fragments for complex files. Retain parse-before-effects versus runtime partial effects, output equality versus correctness, and independent layers routing as distinct observations.

Limits

Partial lexical syntax, no macro expansion or semantic resolution. Finite synthetic CPU checks are not a proof. Frozen suites, corpus, teacher, GPU, allocation exhaustion and host IO failure injection were not run. No useful executable percent surrogate for categorical control/effects; unsupported gap, no 1/2/5/10% claim.

approximant

Forward relation

compile_program sorts function names and emits Proto code and sites; run_program imports workspace, executes specialized ops or shared tree helpers, then exports registers on returned success/error. Fallback sync_out; tree exec; sync_in preserves touched workspace before Flow propagation.

Domain

Valid source-generated AST/values within memory and integer/index limits; deterministic bounded synthetic observations. Arbitrary public malformed representations are outside safety claims.

Executable approximant gap

Exact categorical state/dispatch behavior has no supported percentage-error surrogate here.

invariant

Invariant

Under compiler-generated valid prototypes, native/fallback paths share error text and value semantics on tested fixtures. Matrix fast indices require positive integral in-bounds coordinates; mutation uses Rc::make_mut. Function pools clear registers/loops after calls. No general verifier validates arbitrary public Proto/Op values.

Cost

Compile costs AST traversal, string linear dedup and sorted function/workspace names; execution costs dispatched instructions plus delegated kernels, sync list size and COW copies. Range iteration avoids full range materialization on real scalar path. Registers u16, jumps u32, some argument positions u8; no universal overflow bound; tmp asserts register budget.

composition

Parent composition

registers represents Value observations; compiler emits code/sites/sync lists; execution consumes only valid generated code. Fallback and DynEval transport state through Interp helpers. Equal arithmetic outputs do not prove end-context cleanup or sync lists; selected state/copy/short-circuit fixtures constrain these joins.

Limits

Partial lexical syntax, no macro expansion or semantic resolution. Finite synthetic CPU checks are not a proof. Frozen suites, corpus, teacher, GPU, allocation exhaustion and host IO failure injection were not run. No useful executable percent surrogate for categorical control/effects; unsupported gap, no 1/2/5/10% claim.

models

Typed models

behavior_complement

A failed fast scalar/matrix guard must delegate rather than fabricate an in-bounds index. Fallback errors do not discard synchronized prior writes. Native instruction count excludes fallback statements but does not prove semantic equivalence or absence of dynamic fallback.

reverse_reconstruction

For output O, preimage consists of compiler-generated programs, initial frames and fault states yielding O. Many source programs compile to observationally equivalent traces. Scalar Reg::F(-0) retains its f64 sign; Reg::L only represents canonical logical 0/1.

representation_transport

Reg::from_value packs 1x1 real double into F and bit-exact canonical logical 0/1 into L; other values remain V. U.to_value=None. Allocation identity is outside observation.

fallback_transport

sync_out moves selected registers to current frame, removes U names; sync_in removes frame values back into registers. Frame-sensitive statements synchronize all known vars. Dynamic table/string evaluation uses same round trip.

compiler_limits

Temporary allocation asserts top < u16::MAX; variable enumeration and loop/index casts have no complete public bound certificate. Public malformed bytecode can panic. Supported domain is valid generated code within limits.

floating_coordinate_gate

Scalar arithmetic is IEEE f64; negative base fractional powers delegate complex arithmetic. Matrix coordinates are 1-based integral within rows/cols, offset=(j-1)*rows+i-1. NaN fails bounds; COW preserves aliases.

tests

Executed checks โ€” 2026-10-31

Selected exact names: wave30_bounded_state_and_fallback, wave30_parse_runtime_and_output_state, wave30_synthetic_gate_fail_fast, vm_workspace_is_visible_after_run. All selected native commands ran twice debug and twice release with matching sorted named outcomes (12 distinct tests, 48 positive executions across subsystem). Five compiled assertion mutants fail with exit101; restored byte-exactly and rerun green. Per-source associations appear in external source-test-map.json.

Controls change expected parse state, VM persisted value, suite factory count, SHA known digest and routing tie winner. These are compiled assertion controls exercising real code, not claims of implementation-mutant completeness. lib.rs is compile/type identity evidence only.

No frozen suites, Monte Carlo or recursion-heavy EDGE runs. No speed claim. Scoped Clippy limits retained externally; lexical syntax generated twice identically.

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