---
title: "wasi-mlab-gate — Mova code model"
description: "Mova code model of wasi-host/examples/mlab_gate.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/wasi-host/examples/mlab_gate.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/wasi-host/examples/mlab_gate.rs.groupant/>

# wasi-mlab-gate

The groupant beside wasi-host/examples/mlab_gate.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

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`wasi-host/examples/mlab_gate.rs`](https://github.com/ElamurAI/mova-free/blob/main/wasi-host/examples/mlab_gate.rs)
- **source SHA-256:** `a7947069ab507ffd…`
- **repository folder:** [`wasi-host/examples/mlab_gate.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/wasi-host/examples/mlab_gate.rs.groupant)
- **repository commit:** `48f2e6f74146`

> **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](#approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [composition](#composition) |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | compile and source review | [tests](#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](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `argument_selection` | argument_selection | partial source derived model | [argument_selection](#argument-selection) |
| `external_reference` | external_reference | partial source derived model | [external_reference](#external-reference) |
| `comparison_projection` | comparison_projection | partial source derived model | [comparison_projection](#comparison-projection) |
| `empty_suite` | empty_suite | partial source derived model | [empty_suite](#empty-suite) |

## Parts

- [wasi-gate-scenarios](https://md.groupants.elamur.ai/free/en/mova/wasi-host/examples/mlab_gate.rs.groupant/wasi-gate-scenarios.groupant/)

## Model text


### descriptant

#### wasi-mlab-gate

Example reads fixed mlab.wasm, constructs Host then for each .txt path parses scenarios; each runs native capture with fresh Vfs and guest with fresh Vfs/merged stderr, appends textual trap, compares output strings, accumulates wall times and divergence list. Main not executed in wave31.

##### Epoch 2026-10-31

Prospective review recorded before edits. Source review found late output FAULT effects and weaker-than-capability rights metadata; these are modeled as current behavior rather than silently repaired. Only bounded new test blocks were added; production code remains unchanged. Actual finite results and exact restoration receipts live under $MOVA_DATA/runs/octopus-wave31-wasi-2026-10-31. No full mlab guest, frozen suite, GPU or corpus run. This node retains its scoped observations for future refinement.

### approximant

#### Forward relation

Example reads fixed mlab.wasm, constructs Host then for each .txt path parses scenarios; each runs native capture with fresh Vfs and guest with fresh Vfs/merged stderr, appends textual trap, compares output strings, accumulates wall times and divergence list. Main not executed in wave31.

Scope: `wasi-mlab-gate`. State and transitions follow the authoritative source, including partial effects before errors. No executable approximate replacement is attached: categorical errno/effects and module execution lack a useful validated percentage metric; future numerical profiles may only use1/2/5/10% caps after domain/reference evidence.

### invariant

#### Invariant and cost

Example reads fixed mlab.wasm, constructs Host then for each .txt path parses scenarios; each runs native capture with fresh Vfs and guest with fresh Vfs/merged stderr, appends textual trap, compares output strings, accumulates wall times and divergence list. Main not executed in wave31.

The invariant is conditional on the admitted transition: With no differences and successful traversal, final status1 is excluded; matching output does not exclude nonzero guest exit or different Vfs.

Cost: O(suite bytes+outputs+diff text)+sum native and guest run costs, unbounded scenario workload. No measured speed ratio.

No wall-time gain, universal resource bound or atomic rollback is inferred. External Vfs/wasmi/native-mlab work remains separately charged.

### composition

#### Composition

Example reads fixed mlab.wasm, constructs Host then for each .txt path parses scenarios; each runs native capture with fresh Vfs and guest with fresh Vfs/merged stderr, appends textual trap, compares output strings, accumulates wall times and divergence list. Main not executed in wave31.

Immediate fragments partition selected mechanisms; their byte ranges refer to this single source and reuse its syntax projection. Memory helper success is a precondition for ABI transport, not proof that all linker wrappers dispatch correctly. WASI path/read/write helpers call real Vfs; mlab remains an external reference. Remaining top-level definitions and test bodies stay covered only by the parent source model.

### models

## Typed model catalog

### behavior_complement

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: With no differences and successful traversal, final status1 is excluded; matching output does not exclude nonzero guest exit or different Vfs.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.

### reverse_reconstruction

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: same/total and summed times admit arbitrarily many code/output histories; output equality does not recover state equivalence or successful nonzero-exit status.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.

### argument_selection

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: vm enabled by any --vm, fuel uses first --fuel next value parse; only args ending .txt are suite paths.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.

### external_reference

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: mlab Interp and suite parser are external references, not owned runtime implementation; native/guest equality is a gate hypothesis.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.

### comparison_projection

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: Guest stdout decoded lossily and concatenated trap; nonzero proc_exit without trap may compare equal because exit_code is ignored.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.

### empty_suite

Subject: `wasi-host/examples/mlab_gate.rs` at SHA-256 `a7947069ab507ffd5ad7b71ae9146bca16e08b827af78bc5961993c788b699b8`, scope `wasi-mlab-gate`. Domain: the source transition and bounded fixtures described in approximant.md; readable valid host resources where required. Observation: returned values, byte coordinates, state/effect order, not total-system semantics. Operator/relation: Even zero selected txt files still reads/builds Host; afterward0/0 and exit0 if no differences.

Status: partial source-derived relation; complement is a scoped exclusion hypothesis, reverse preserves all compatible antecedents described rather than a chosen inverse. Assumptions: production branch order, declared coordinate/resource premises; no completeness claim for untested inputs. Evidence: tests.md distinguishes actual execution from source review; finite observations can falsify but not prove the relation.


### tests

#### Checks and limits

Source review and compilation only for this scope; no runtime branch-coverage claim.

Exact names: .

Memory tests bypass linker ABI; tiny empty/unreachable guests exercise engine outcomes only. The CLI test uses isolated import/export/journal fixtures.

Five compiled production/helper-source controls: append offset, virtual clock advance, trap status, CLI export gate and newest-mtime max. Each compiles, fails its selected assertion, restores exact original bytes and passes again. These controls cover their target relations, not every node. No assertion-only mutants. See external source-test-map.json, native-commands.json, verify.rs and numeric/raw receipts in $MOVA_DATA/runs/octopus-wave31-wasi-2026-10-31. The example main and frozen mlab paths are never executed.
