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

# rt-mixed-diff

The groupant beside tools/roundtrip/src/diff.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
- **status:** partial source bound model
- **source:** [`tools/roundtrip/src/diff.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/roundtrip/src/diff.rs)
- **source SHA-256:** `dc8f0bd667aee979…`
- **repository folder:** [`tools/roundtrip/src/diff.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/roundtrip/src/diff.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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](#approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [composition](#composition) |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [tests](#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](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `alignment_tie` | alignment_tie | partial source derived model | [alignment_tie](#alignment-tie) |
| `precedence` | precedence | partial source derived model | [precedence](#precedence) |
| `spacing_scope` | spacing_scope | partial source derived model | [spacing_scope](#spacing-scope) |
| `scalar_preview` | scalar_preview | partial source derived model | [scalar_preview](#scalar-preview) |

## Parts

- [rt-mixed-diff-lcs](https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/diff.rs.groupant/lcs.groupant/)

## Model text


### descriptant

#### Descriptant

##### Prospective epoch

2026-10-31 source review predicted: Compare increments sents/tokens/chrF then exact text early-return. Otherwise form LCS with skip-original tie, adjacent aligned spacing, then greedy Order, Typography, Case, lemma Tense/Form, PronName and Lexical passes; leftovers classified missing/added. Resource model: LCS O(nm) time and memory; six greedy passes O(nm*string comparison cost); output examples capped by tally, context construction bounded scalar90 but scans full input. External prospective.md predates test additions and preserves APIs, effect order, hazards and interaction hypotheses.

##### Observed epoch

Bounded real helper checks in tests.md constrain these models; syntax is a partial lexical projection with no macro expansion, name resolution or proof. Production expressions unchanged; six inline test modules added. Compiled mutants are temporary and exactly restored. Existing malformed-input and nonfinite domains remain explicit, not silently repaired. Parent composes this scope with siblings without adding overlapping costs twice.

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded.

### approximant

#### Forward relation

Compare increments sents/tokens/chrF then exact text early-return. Otherwise form LCS with skip-original tie, adjacent aligned spacing, then greedy Order, Typography, Case, lemma Tense/Form, PronName and Lexical passes; leftovers classified missing/added.

Domain: Valid token fields, lengths fit allocation and u32 LCS/counters. Exact strings can bypass inconsistent Tk fields; token coordinates are indices, cut truncates90 Unicode scalars.

### invariant

#### Invariant and cost

##### Invariant

Valid token fields, lengths fit allocation and u32 LCS/counters. Exact strings can bypass inconsistent Tk fields; token coordinates are indices, cut truncates90 Unicode scalars.

##### Cost

LCS O(nm) time and memory; six greedy passes O(nm*string comparison cost); output examples capped by tally, context construction bounded scalar90 but scans full input.

##### Limits

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded. No percentage surrogate is implemented: categorical parsing/effect observations lack an admitted numerical error metric. Any future profile must define its metric/domain and use only1/2/5/10 percent caps.

### composition

#### Local composition

Compare increments sents/tokens/chrF then exact text early-return. Otherwise form LCS with skip-original tie, adjacent aligned spacing, then greedy Order, Typography, Case, lemma Tense/Form, PronName and Lexical passes; leftovers classified missing/added.

Children select narrow source functions with their exact byte intervals. Remaining branches stay in the file model; fragments are not exhaustive partitions. Calls and state joins follow the forward relation, not folder order. Shared scans/helpers are counted once in whole-file costs. Complement of composition is not union of complements; reverse composition retains compatible intermediates and caller premises.

### models

## Typed source-bound relations

Subject: exact source SHA-256 in manifest. Domain and resource premises are in invariant.md. Each model is partial, source-derived, over a single helper invocation or the described finite trace. Complements are proposed inner exclusions under those premises; reverse relations retain all compatible antecedents, with no unique inverse claim. The oracle is the named checks in tests.md; unexecuted cases remain hypotheses. No numerical approximation certificate.

### behavior_complement

Excluded: class counts are an invertible edit script or semantic equivalence judgment; exact text produces class divergences.

### reverse_reconstruction

Divergence cells admit many alignments and original strings; LCS witness is deterministic but repeated forms have alternative optimal alignments.

### alignment_tie

At equal unequal-form suffix scores, advance original i; greedy later pairing scans earliest unused j.

### precedence

Typography before Case, lemma before PronName/Lexical; changing pass order changes classes.

### spacing_scope

Only adjacent LCS neighbors in both sequences compare spacing; final-token spacing not independently counted.

### scalar_preview

cut uses chars not byte slicing; previews retain90 scalars then ellipsis and lose remaining text.

### tests

#### Checks and evidence

Named source/helper checks: diff::tests::classes_of_changes.

Wave32 on2026-10-31:10 distinct exact tests passed twice debug and twice release, with equal sorted named outcomes. This node claims only its listed subset; empty subset means source review only. Five actual source-behavior mutants compiled, failed assertions, restored exact bytes/hash, and passed focused green reruns. No assertion-only mutants; existing swapped-input controls are separate. Receipt bundle: $MOVA_DATA/runs/octopus-wave32-rt_mixed-2026-10-31 (native-commands.json, source-test-map.json, mutation-results.json, *.status/*.log). No live corpus, teacher, frozen assessment, download or production data used.

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded.
