roundtrip-frames-script
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 | approximant |
| ast | partial | ../syntax.json |
| 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 |
scope_precondition | scope_precondition | partial source derived model | scope_precondition |
resource_boundary | resource_boundary | partial source derived model | resource_boundary |
Model text
descriptant
Alignment and residual script
2026-10-31 epoch: source scope bytes [30703,36953); Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field 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%.
approximant
Alignment and residual script
Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field 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.
catalog
behavior_complement
Subject: roundtrip-frames-script, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391, transition observation.
For Alignment and residual script, excluded transitions violate the stated scoped rule: Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field patches. This is an inner source-derived exclusion under the domain, not a complement of arbitrary unseen runtime behavior.
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-script, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391, transition observation.
Fix outputs and post-state of script; compatible antecedents are all scoped inputs/pre-state satisfying: Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field patches. Fields outside this byte scope are held fixed; discarded fields remain ambiguous.
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-script, 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-script, 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.
scope_precondition
Subject: roundtrip-frames-script, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391, transition observation.
Alignment and residual script requires the coordinate/state assumptions of this fragment; inspect its exact byte range. Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field patches. Invalid arbitrary state is outside the reconstruction law.
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.
resource_boundary
Subject: roundtrip-frames-script, source hash d9eb1c251975ecedf6f5becc0b7567e5140cdfae1acbc83a74d2fb71f95bd391, transition observation.
Alignment and residual script: allocations/clones and recursion/scans within this scope are retained. Parent cost bound is conservative for this subroutine: 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.
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
Scoped evidence
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.
Coverage is limited to this fragment's reached branches; parent tests do not prove every scoped branch.
invariant-and-cost
Scoped invariant and cost
Greedy origin reservation yields one script step per parsed word; inverse origin indices transport heads before optional field patches.
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.
The parent bound is conservative; unrelated parent effects are excluded from this fragment.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/frames.rs.groupant/script.groupant/