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

# prag-vn-codec

The groupant beside prag/src/vn.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_fragment
- **status:** partial source bound model
- **source:** [`prag/src/vn.rs`](https://github.com/ElamurAI/mova-free/blob/main/prag/src/vn.rs)
- **source SHA-256:** `f35dceabba8b9e6e…`
- **covers:** codec: Element tokens map V/ADJ/ADV to tags, quoted tokens to lowercase lexical words, brace alternatives to sorted unique preposition sets (including named spatial expansion), and other tokens to (role,restriction). syntax splits whitespace. shape takes first V, first preceding NP, expletive flag, sequential objects/complements and adjacent prep-NP pairs. (bytes 3070–16443)
- **part of:** [prag-vn](https://md.groupants.elamur.ai/free/en/mova/prag/src/vn.rs.groupant/)
- **repository folder:** [`prag/src/vn.rs.groupant/codec.groupant`](https://github.com/ElamurAI/mova-free/tree/main/prag/src/vn.rs.groupant/codec.groupant)
- **repository commit:** `48f2e6f74146`

> **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 source model | [forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **composition** | partial source model | [composition](#composition) |
| **cost** | partial source model | [cost](#cost) |
| **descriptant** | partial source model | [epoch-memory](#epoch-memory) |
| **invariant** | partial source model | [invariant](#invariant) |
| **tests** | partial source model | [checks](#checks) |

## 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 |
|---|---|---|---|
| `prag-vn-codec-behavior-complement` | behavior_complement | partial source model | [behavior-complement](#behavior-complement) |
| `prag-vn-codec-reverse-reconstruction` | reverse_reconstruction | partial source model | [reverse-reconstruction](#reverse-reconstruction) |
| `prag-vn-codec-specialization` | normalization_fiber | partial source model | [specialization](#specialization) |

## Model text


### forward
Element tokens map V/ADJ/ADV to tags, quoted tokens to lowercase lexical words, brace alternatives to sorted unique preposition sets (including named spatial expansion), and other tokens to (role,restriction). syntax splits whitespace. shape takes first V, first preceding NP, expletive flag, sequential objects/complements and adjacent prep-NP pairs.

### invariant
Preposition expansion is sorted/deduplicated. Restriction handling is literal token matching, not a logical formula evaluator; unknown restriction names expand to empty. Malformed absent V uses index zero, so general malformed grammar correctness is unclaimed.

### cost
O(B + sum p log p) per syntax with p expanded prepositions; shape O(S+expanded bytes) allocations.

### behavior-complement
Candidate Prep with duplicate alternatives or omitted literal to for {to}[+dest] is outside the token observation relation. Unknown types and permissive unmatched braces remain accepted according to explicit parser rules. Universe: supplied inputs and candidate observations in forward's bounded domain; R is the specified transition. This is a partial source-derived exclusion relation, not a proof.

### reverse-reconstruction
A Prep({from,of,off,out}) admits {+src}, {+src_conf} and literal alternatives with permutations/duplicates; case/ordering normalization is noninjective. Shape forgets semantics, examples and ignored lexical tokens. The target is the full compatible preimage, not a selected example.

### specialization
For fixed expanded set P, all token strings whose expansion sorts and deduplicates to P remain compatible; no original spelling is recoverable.

### composition
TSV codec feeds index identities, ancestry feeds nearest restrictions and frame coordinates, frequency feeds tie preference, and matching retains these same indices. Nominal lookup is a separate projection of the loaded tables. Shared identities and order must survive any joined preimage; summing overlapping fragment costs double-counts work.

### checks
Six vn::wave15_models tests cover supplied tables, normalization, inheritance, exact score/role coordinates, ties/animacy, core/complement and malformed ancestry. See evidence.json for raw-log hashes. Syntax generated twice with identical bytes.

### epoch-memory
2026-10-30 prospective model: preserve valid TSV/file ordering and scores; add only pure production seams. Public mutable ancestry permits invalid indices; old malformed_parent_stops_at_valid_prefix panicked at index 999 (five other tests passed). Repair stops at valid nonrepeated prefix. BTreeSet adds O(H log H) bounded visited tracking; no optimization claim. Compiled preference mutant changes unique bonus 2 to 3 and must fail exact score assertion; restored bytes precede twice-debug/twice-release checks.

### limitations
Finite fixtures are not proof or linguistic accuracy. Syntax is partial, macros opaque. No parser, teacher, corpus, GPU, global flag mutation or global recording lifecycle execution. Class vector mutation can invalidate private indexes; only ancestry prefix is hardened. communication and global Match accessors retain index preconditions. Extremely large score/count overflow and concurrent record_start/take races remain outside the bounded domain. No error budget, automatic substitution or measured performance claim.
