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

# mova-whale-compose

The groupant beside tools/whale/src/compose.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/whale/src/compose.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale/src/compose.rs)
- **source SHA-256:** `101554dc3dbb2048…`
- **repository folder:** [`tools/whale/src/compose.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale/src/compose.rs.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 | [Forward approximant](#forward-approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Descriptant](#descriptant) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | finite evidence | `tests.md` |

## 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) |

## Model text


### Descriptant

The Whale's description written natively from its reading and retained knowledge: opening (title, size, parts, topics), per part a connecting lead with size and topics, restated clauses in source order, term explanations after first use, knowledge-assisted restatements, the numbers a part reports, a closing; every sentence with its basis; guard and near-duplicate refusal; even per-part share under the word budget; never padded. Source: `tools/whale/src/compose.rs`.

### Forward approximant

Known::of(reading, paper, items): the paper's own acronym definitions as native items; term facts from any paper (paper expansion kept, terminal adds the rest); sentence/section reads_as facts of this paper. write_with: structure sentences (FRAME vocabulary + basis), per readable section lead, clauses (keep filter), explain() at first token match, readings for sentences without a written clause, section readings, numbers (decimals, %, >= 2 digits, not years; >= 2 of them); closing two sentences. push refuses empty, guard-refused (structure: «…» unquoted first), near-duplicate (Jaccard >= threshold over >= 4 content words) and case-insensitive repeats. compose: if over max, share = (max - fixed)/available per section, evenly spaced picks, then drop trailing source sentences until <= max.

### Invariant

Words <= max; nothing added to reach min; every item has kind and basis (sources, knowledge ids or stated counts/titles); no terminal answer text (guard); deterministic (BTreeMap/BTreeSet, source order).

### Cost

O(items^2) near-duplicate comparisons (about 300-450 items per paper) plus one guard check per candidate (O(tokens x occurrences)); two passes when over budget; milliseconds per paper next to the 1 s read (2026-11-04).

### Composition

Parent: whale-workers; inputs reader::Reading, knowledge items (knowledge.rs), gates::Guard; output Draft consumed by gates::check and learn.rs.

### behavior_complement

Not done: summarizing or abstracting a part, reordering by argument structure, claims/method/results classification, explaining a term the Whale has no fact for, any text from the terminal, padding. Prospective prediction 2026-11-04 (before measuring): native round 1 2,500-3,500 words on five open papers; measured 2,964-3,744. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

draft.json keeps every item with kind, sources, knowledge ids and basis: each sentence of description.txt maps back to its source sentences or knowledge item; which clauses were left out for the budget follows from the reading and the share. No unique inverse of the text is claimed.

### Epoch 2026-11-04 (writer version)

`WRITER` names the native reader/writer version; a batch retries a paper that stopped unpassed only under a different version, so it must change with every change that can change a description. FRAME gains «asks» for the question frame «The paper asks: …?».

### Epoch 2026-11-04 (writer-2026-11-04d)

Glosses are keyed by normalized term and hold one sentence per fact relation, each bound to its own knowledge item (own items first, then the pod's); bare-category facts are never written; restated sentences pass the grammar gate before they are written.

### tests.md


learn::tests (fixture paper, scripted terminal): round-2 description explains «QZW» from retained facts, never contains the answer, traceability 1.0, no answer overlap; two_runs_are_identical. Dry run (five CC BY 4.0 papers, no terminal, 2026-11-04): 2,964 / 3,285 / 3,744 / 3,101 / 3,440 words, gates fail only on words, two runs byte-identical. Negative control: answers pasted into the draft turn the learn test red (restored).
