---
title: "translation-flow-measure — Mova code model"
description: "Mova code model of tools/translate/src/measure.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/translate/src/measure.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/tools/translate/src/measure.rs.groupant/>

# translation-flow-measure

The groupant beside tools/translate/src/measure.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:** [`tools/translate/src/measure.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/translate/src/measure.rs)
- **source SHA-256:** `c34da721e6921c20…`
- **repository folder:** [`tools/translate/src/measure.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/translate/src/measure.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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-and-cost](#invariant-and-cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant-and-cost](#invariant-and-cost) |
| **tests** | bounded helpers only | [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) |
| `order_residual` | order_residual | partial source derived model | [order_residual](#order-residual) |
| `boundary_coordinates` | boundary_coordinates | partial source derived model | [boundary_coordinates](#boundary-coordinates) |
| `text_literals` | text_literals | partial source derived model | [text_literals](#text-literals) |
| `failure_precedence` | failure_precedence | partial source derived model | [failure_precedence](#failure-precedence) |

## Parts

- [translation-flow-measure-order](https://md.groupants.elamur.ai/free/en/mova/tools/translate/src/measure.rs.groupant/order.groupant/)
- [translation-flow-measure-text](https://md.groupants.elamur.ai/free/en/mova/tools/translate/src/measure.rs.groupant/text.groupant/)

## Model text


### descriptant

#### translation-flow-measure

reader_res converts MTok to nodes, prealigns lowercase lemmas by LCS plus equal-length gaps, encodes tree script and charges moved positions outside a strict LIS. reader_block concatenates verses with § sentinel and shifted nonzero heads, checks script apply and order_ok. Text encoding records noncanonical literal gaps and tail. Run::verse measures normal output separately, builds reader/encoder/stack residual, decodes with first-failure precedence meta-world→meta order→tree→tokens→text; direct mode recurses once with Words.

##### Epoch 2026-10-31

Prospective predictions saved before edits in the external wave32 tr_flow receipts. Original production bytes preserved; only appended synthetic test modules added. Selected actual helpers exercised; five compiled behavior controls rejected with exact byte restoration and positive reruns. Source syntax projection is partial, not expanded semantic Rust. Diagnostic reconstruction with residual is not semantic understanding or persistent learning.

Trees have valid heads and aligned forms/gaps; base is permutation1..n, moved sorted distinct subset. choose_bits requires0<=k<=n; offsets/counts fit usize/i64. Finite residual arithmetic. Exact gate concerns target reproduction using residual, not residual-free translation correctness or learning.

### approximant

#### Forward relation

reader_res converts MTok to nodes, prealigns lowercase lemmas by LCS plus equal-length gaps, encodes tree script and charges moved positions outside a strict LIS. reader_block concatenates verses with § sentinel and shifted nonzero heads, checks script apply and order_ok. Text encoding records noncanonical literal gaps and tail. Run::verse measures normal output separately, builds reader/encoder/stack residual, decodes with first-failure precedence meta-world→meta order→tree→tokens→text; direct mode recurses once with Words.

Scope: source-derived conditional transition model at the manifest SHA. Trees have valid heads and aligned forms/gaps; base is permutation1..n, moved sorted distinct subset. choose_bits requires0<=k<=n; offsets/counts fit usize/i64. Finite residual arithmetic. Exact gate concerns target reproduction using residual, not residual-free translation correctness or learning.

### composition

#### Composition

Scoped children are projections of this file, not independent executables. Main population filtering feeds aggregation; order/text helpers feed measure's exact decoder; many's agreement and storage read the same MTok with intentionally different punctuation treatment, streaming accounting consumes reader costs, clustering consumes normalized PairM. Uncovered branches remain source-derived; finite helper checks do not establish orchestration wiring.

### catalog

## Typed models

All entries bind the source SHA and optional byte range in manifest.json. Observation is one admitted helper call or the explicitly described orchestration trace. Relations are partial source-derived models, not universal proofs. Finite test names and unexecuted effects are in tests.md.

### behavior_complement

Gate success excludes any earlier detected unequal layer. Meta direct mode cannot recursively request another Meta direct pass. Text decode with a retained noncanonical gap cannot silently replace it with canonical spacing. No annotation/model executed in selected reader/text/order checks.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.

### reverse_reconstruction

Given forms, space and RText, decode determines one text; removing RText admits all gap/tail variants. Script plus source reconstructs target nodes on admitted domain, but target alone has many sources/scripts. LIS complement may vary across optimal subsequences; this implementation selects deterministic lowest-tail replacement.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.

### order_residual

For permutation base length n, moved cardinality=n-LIS_length; excluding moved leaves strictly increasing values. order_ok is an admitted-permutation check, not general validation of arbitrary duplicated ids.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.

### boundary_coordinates

Each joined verse adds one § node; every nonzero head shifts by preceding joined length including earlier sentinels. Root0 remains0; reverse recovery needs known sentinels/boundaries and original spans are discarded.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.

### text_literals

Canonical gap is empty at index0, otherwise single space iff preceding space bit; differing gap charged lit_bits+pos_bits and newline selects Layout, tail always Spacing.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.

### failure_precedence

Run records the first unequal decoded layer but continues later decoding work; corrupt flips stack space residual0, not a teacher/model mutation. Normal exact/chrf are independent fields.

Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.


### tests

#### Evidence and gaps

##### Native checks

- `measure::tests::order_residual`
- `measure::tests::a_block_reads_as_one`
- `measure::tests::text_layer_back`

These selected names ran twice debug and twice release with exact filtering and one test thread; raw logs and numeric status files are in the external octopus-wave32-tr_flow-2026-10-31 receipt directory. All test bodies inspected before selection. Inline cases use only synthetic in-memory records; the existing blocks filesystem test was not selected. Tests listed at file level do not execute every function or this entire scoped fragment.

##### Controls

Five compiled source-behavior mutants: main gate counter suppressed; many strict chapter comparison relaxed; measure noncanonical-gap recording disabled; pages Meta filter reversed; blocks literal-change predicate reversed. All failed the corresponding assertion and passed after original bytes/hash restoration. Zero assertion-only mutants; zero surviving exploratory mutants.

##### Limitations

CLI argument/effect paths, live corpus/model/annotation/training, full Run::verse, page filesystem and reports remain source-derived only. Source syntax projections generated twice and byte-compared. No corpus-quality, persistent-learning, throughput or universal semantic coverage claim.

### invariant-and-cost

#### Domain, invariant and cost

##### Invariant

Trees have valid heads and aligned forms/gaps; base is permutation1..n, moved sorted distinct subset. choose_bits requires0<=k<=n; offsets/counts fit usize/i64. Finite residual arithmetic. Exact gate concerns target reproduction using residual, not residual-free translation correctness or learning.

##### Cost

base_order O(nlog n), moved O(nlog n) time/O(n) memory, order_ok O(nlog k); prealign delegates LCS O(nm) time/state. Reader scripts delegate matching costs. Text encode/decode O(tokens+literal bytes) plus ordered map insertion/lookup. Direct recursion adds one Words pass, never unbounded recursion.

Integer additions/casts require representability; finite floating inputs where comparisons are modeled. These symbolic costs are not measurements of corpus throughput. No useful cheaper executable percentage surrogate established; future supported caps only 1/2/5/10%.
