roundtrip-frames
The groupant beside tools/roundtrip/src/frames.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 | model.md |
| ast | partial | syntax.json |
| composition | partial | Composition |
| cost | partial | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | bounded checks | 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 |
alignment_priority | alignment_priority | partial source derived model | alignment_priority |
head_transport | head_transport | partial source derived model | head_transport |
tam_chain | tam_chain | partial source derived model | tam_chain |
surface_boundary | surface_boundary | partial source derived model | surface_boundary |
Parts
Model text
descriptant
roundtrip-frames
2026-10-31 prospective epoch retained externally before edits.
F::of and E::of project parser frames/entities excluding source text/how except nominal flag. Realizer emits NP and verb structures, tracks seen ids, honors links/TAM/off flags then punctuates. encode_with greedily aligns pre-pairs, lemma+coarse, lemma, two structural passes; one Insert or Take per parsed node. apply maps realized heads through inverse Take indices before explicit patches.
No annotator/model loading, live corpus, full suite, teacher, GPU or persistent-learning evidence. No executable percentage surrogate: categorical codecs/effects need a useful metric before future caps 1/2/5/10%.
Exact recovery with residual is a diagnostic codec observation. It is not evidence of normal generative equivalence, semantic understanding or persistent learning. Production source is preserved; only isolated tests are appended where needed.
approximant
Forward relation
F::of and E::of project parser frames/entities excluding source text/how except nominal flag. Realizer emits NP and verb structures, tracks seen ids, honors links/TAM/off flags then punctuates. encode_with greedily aligns pre-pairs, lemma+coarse, lemma, two structural passes; one Insert or Take per parsed node. apply maps realized heads through inverse Take indices before explicit patches.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Composition
Source children delimit real function scopes, sharing syntax. Real pipeline joins R4 frame reconstruction to Realizer then R3 tree script and R2 token decode; report consumes aggregated tally. Independent path/CLI branches are not fictitious codec callers.
catalog
behavior_complement
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
Realization never reads Ent.text as surface oracle. A damaged script with absent Take origin yields an empty Dep placeholder, not successful recovery of unavailable source text. Normal realization does not imply semantic equivalence.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
reverse_reconstruction
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
Given realized tree r and encoder script s, apply(r,s) is a reconstruction witness for original parsed tree. Fixed output alone admits many frame/link/TAM states and discarded realizer nodes; scripts with missing or duplicate Take origins need not identify unique antecedents.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
alignment_priority
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
Valid unused pre-pairs reserve origins before lexical matching. Duplicate or out-of-range pre-pairs are ignored; later matches choose smallest unused realized index.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
head_transport
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
Take.from is zero-based realized coordinate; tree head is one-based with0 root. inv[from]=output_position+1. Explicit head patch dominates mapped head.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
tam_chain
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
modal/future/do precedes perfect have, progressive be, passive be; previous auxiliary selects next tag. Bare chooses fragment before TAM; nominal frames may be skipped when other nonnominal frames exist.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
surface_boundary
Subject: roundtrip-frames, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391; transition observation.
Unsaid roles and shared nonpronoun subjects suppress repetition; rt-function replaces stored determiners/cases with defaults. Seen state persists across sentence calls; decoder controls change realization, requiring matching residual state.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.
Status: partial source-derived model.
tests
Native evidence
tests::tree_script_gives_the_tree_back_and_a_damaged_one_does_nottests::world_gives_the_frames_back_and_a_damaged_residual_does_nottests::realizer_does_not_repeat_a_shared_subjecttests::realizer_says_the_content_the_frames_keeptests::realizer_says_the_function_words_the_frames_keeptests::realizer_hangs_clauses_where_the_links_saytests::realizer_punctuates_by_clause_structuretests::tam_is_read_and_realizedtests::pronouns_by_saliencetests::the_tam_verb_group_keeps_the_frames_contenttests::verbless_roots_are_fragmentstests::the_rest_of_a_clause_and_a_phrase_is_kept
17 exact named checks total (16 library, one CLI helper), each twice debug and twice release, numeric exits zero and sorted outcomes identical. Native metadata and raw receipts are in the external wave32 rt_core run directory. No optional model tests execute. lib.rs has compile/representation evidence only.
Four compiled production controls alter class precedence, Block grouping, world boundary XOR and frame lemma patching. Each fails its named runtime assertion (exit101), restores exact source SHA256 and passes restored check (exit0). No assertion-only mutants, survivors or bug repairs. These controls do not establish complete coverage.
Two fresh syntax projections agree for each of nine sources. Production bytes are preserved as exact base prefixes. Format only appended test modules before final native receipts. CLI spec helper errors precede any reader; actual model-loading pipeline is excluded.
invariant-and-cost
Invariant and cost
Realization never reads Ent.text as surface oracle. A damaged script with absent Take origin yields an empty Dep placeholder, not successful recovery of unavailable source text. Normal realization does not imply semantic equivalence.
Given realized tree r and encoder script s, apply(r,s) is a reconstruction witness for original parsed tree. Fixed output alone admits many frame/link/TAM states and discarded realizer nodes; scripts with missing or duplicate Take origins need not identify unique antecedents.
With p parsed and r realized nodes and B lemma bytes, greedy matching O(prB); two structural passes same pair bound. apply O(r+p+payload bytes) memory/time excluding deep clones. Realizer scans all F frames per clause O(F^2) plus recursive entity expansion, membership logs, punctuation cost and payload clones; recursive depth is unbounded.
Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/frames.rs.groupant/