Elamur GroupantsโŒ•
โ˜ฐ

mlab-vm-execution

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
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
error_restoreerror_restorepartial source derived modelerror_restore
copy_on_writecopy_on_writepartial source derived modelcopy_on_write
fallback_flowfallback_flowpartial source derived modelfallback_flow
fault_scopefault_scopepartial source derived modelfault_scope

Model text

descriptant

mlab-vm-execution

Workspace transfer, pooled calls, arithmetic/index slow paths and dispatcher.

Epoch 2026-10-31

Half-open source bytes [45698,88727); bound by parent source hash and scoped byte hash. Model covers only this fragment; parent composition explains joins.

approximant

Scoped forward relation

Import current frame to U/F/L/V registers; execute code; synchronize tree fallbacks and dyn calls; export all script variables even after returned error.

Domain and gap

Source-generated states within resource limits. Categorical relation has no executable percent surrogate.

invariant

Scoped invariant

exec truncates end_stack on Err; finish_call restores frame/depth and clears pooled buffers.

Cost

Executed instructions plus delegated kernels, sync-list size, matrix COW and pooled frames. Loops unbounded; arithmetic uses f64 exceptional values and indices use dimension products.

models

Scoped typed relations

behavior_complement

Out-of-bounds or nonintegral matrix coordinates exclude fast indexed write; shared Rc aliases exclude mutating the other alias. A fallback error excludes continuing dispatch but not its already synchronized writes.

reverse_reconstruction

Final workspace does not reveal instruction count, prior overwritten registers or COW ownership. Stats constrain counts but not execution trace.

error_restore

exec truncates end_stack on Err; finish_call restores frame/depth and clears pooled buffers.

copy_on_write

asg_fast validates in-bounds double matrix then Rc::make_mut writes one cell.

fallback_flow

Break/continue use patched fallback targets; Return ends execution; errors propagate after sync_in.

fault_scope

vm:add affects nonconstant binary scalar AddBug, not every addition fast path.

tests

Evidence scope

Parent selected tests: wave30_bounded_state_and_fallback, wave30_parse_runtime_and_output_state, wave30_synthetic_gate_fail_fast, vm_workspace_is_visible_after_run. This fragment shares parent syntax and finite checks; no separate test count or complete fragment coverage claim. Assertion-control association and unexecuted paths are in parent tests.md and source-test-map.json.

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