translation-flow-main
The groupant beside tools/translate/src/main.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 |
| composition | partial | composition |
| cost | symbolic source derived | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | bounded helpers only | 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 |
population_partition | population_partition | partial source derived model | population_partition |
failure_sampling | failure_sampling | partial source derived model | failure_sampling |
world_multiset | world_multiset | partial source derived model | world_multiset |
effect_trace | effect_trace | partial source derived model | effect_trace |
Parts
Model text
descriptant
translation-flow-main
Agg::add increments verses, target token count, exact/gate booleans, chrF and each of three residuals. direct_ok increments only when direct is Some. run_sys filters targets by only, retains records for all target keys, but adds to Agg only when has_src(original key); rotation uses +101 modulo present-source count. block_measure merges block reader+verse tail for meta systems and all verse residuals for baselines, then layout_code; gate conjuncts verse/order/layout checks. CLI dispatches many before eval args, rejects train before creating output, then loads model and corpora, trains tables, measures, writes reports and optionally pages.
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.
Finite residuals and representable counters; valid corpus trees and keys. Failures capped at4, examples at6 for verse count congruent1 mod97. Missing source still produces target record but excludes summary numerator and denominator. All-target and paired-target populations must not be interchanged.
approximant
Forward relation
Agg::add increments verses, target token count, exact/gate booleans, chrF and each of three residuals. direct_ok increments only when direct is Some. run_sys filters targets by only, retains records for all target keys, but adds to Agg only when has_src(original key); rotation uses +101 modulo present-source count. block_measure merges block reader+verse tail for meta systems and all verse residuals for baselines, then layout_code; gate conjuncts verse/order/layout checks. CLI dispatches many before eval args, rejects train before creating output, then loads model and corpora, trains tables, measures, writes reports and optionally pages.
Scope: source-derived conditional transition model at the manifest SHA. Finite residuals and representable counters; valid corpus trees and keys. Failures capped at4, examples at6 for verse count congruent1 mod97. Missing source still produces target record but excludes summary numerator and denominator. All-target and paired-target populations must not be interchanged.
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
Under valid inputs Agg never counts direct_ok without a direct residual and never stores a fifth failure. run_sys never marks an absent original source as a paired observation even if target residual reconstruction succeeds. CLI cannot run eval training split past its explicit rejection.
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
A summary admits every ordered sequence of Out records with the same sums and capped samples; discarded failures and unsampled text are unrecoverable. VRec carries source/target meta states and residual, permitting diagnostic target reconstruction conditionally on decoder state, not unique original source or meaning.
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.
population_partition
Records for all target keys and aggregates only for source-present keys are different projections; empty intersections give zero verses while records can remain nonempty.
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_sampling
First four failures and examples at counts1,98,... up to six retain order-sensitive prefixes; permuting inputs preserves sums but may change sample text.
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.
world_multiset
For each string x, matched contribution=min(count_a(x),count_b(x)); duplicate events count repeatedly. Negation agreement compares any-negated booleans, losing event identity.
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.
effect_trace
Source-derived only: output directory precedes model load, report write precedes optional page model setup and page reads. Errors leave earlier writes intact; no transactional rollback.
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
wave32::aggregate_and_multiset
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
Finite residuals and representable counters; valid corpus trees and keys. Failures capped at4, examples at6 for verse count congruent1 mod97. Missing source still produces target record but excludes summary numerator and denominator. All-target and paired-target populations must not be interchanged.
Cost
Agg O(residual cells+divergence cells) merges; multiset_match O((a+b)log distinct(b)) time and O(distinct(b)) state. run_sys keeps O(target records+outputs), rotation position search O(N²) worst case before codec costs; block_measure scans records per block plus reader DP. Full orchestration costs remain sums of delegated parsing/training/evaluation and sequential file writes, not measured.
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%.
This page in Markdown ā https://md.groupants.elamur.ai/free/en/mova/tools/translate/src/main.rs.groupant/