roundtrip-world-codec
The groupant beside tools/roundtrip/src/world.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 |
global_local_links | global_local_links | partial source derived model | global_local_links |
dedup_projection | dedup_projection | partial source derived model | dedup_projection |
sentence_xor | sentence_xor | partial source derived model | sentence_xor |
scope_precondition | scope_precondition | partial source derived model | scope_precondition |
Model text
descriptant
World residual codec
2026-10-31 epoch: source scope bytes [11506,21694); Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition.
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
World residual codec
Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition.
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-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
For World residual codec, excluded transitions violate the stated scoped rule: Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition. 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-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
Fix outputs and post-state of codec; compatible antecedents are all scoped inputs/pre-state satisfying: Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition. 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.
global_local_links
Subject: roundtrip-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
globalize adds sentence offset to quote/cause/next/link; localize uses wrapping_sub. Valid sentence-local indices and nonoverflowing totals are required for intended coordinate interpretation.
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.
dedup_projection
Subject: roundtrip-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
fact_key includes kind/verb/neg/role ids/frame attrs/oblique ids but omits TAM, pronouns, links and mention modifiers. Distinct facts may collide; inserts preserve original frames regardless.
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.
sentence_xor
Subject: roundtrip-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
decode starts is heuristic link grouping; R4 toggles symmetric difference with original starts, inserts recover removed frames, empties restore zero-frame sentences. nsents is external required input.
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-world-codec, source hash 46d4429a5127b1a462d90e5d350a0f440d440a6781edeab42a01d3bf124a3675, transition observation.
World residual codec requires the coordinate/state assumptions of this fragment; inspect its exact byte range. Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition. 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.
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
Dedup/global-index map precedes decoder comparison; full patches compensate lost fields and XOR starts plus empty indices recover original sentence partition.
Let F frames, E entities, Q quote links, B cloned payload bytes, S=nsents and Z=r.empties.len(). Ordered maps add logarithmic lookups; starts can scan O(F^2*(Qmax+1)); decode_in position searches can be quadratic. decode_exact additionally scans the linear empties vector for each requested sentence: O(S*Z+S) time and O(S) output vector storage, independent of F. For S all-empty sentences, F=E=Q=0 and Z=S, yet contains performs S(S+1)/2 equality checks and emits S empty vectors. Deep frame/entity clones add B and recursion cost; no fixed capacity or allocation guarantee.
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/world.rs.groupant/codec.groupant/