Elamur Groupants⌕
☰

mova-elephant-reprogram

The groupant beside tools/elephant/src/reprogram.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

componentlabelwhere
ApproximantpartialForward approximant
Astpartialsyntax.json
CompositionpartialComposition
CostpartialCost
DescriptantpresentDescriptant
InvariantpartialInvariant
Testsfinite evidenceTests

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.

relationtypelabelwhere
Behavior complementbehavior complementpartial source derived modelBehavior complement
Reverse reconstructionreverse reconstructionpartial source derived modelReverse reconstruction

Model text

Descriptant

Reprogramming the store: a plan for a new program key (ok, attest, recount) and its application; snapshots of hand-list versions by fingerprint. Source: tools/elephant/src/reprogram.rs.

Forward approximant

plan: for each counted part: key equal or attested -> ok; only seeds differ and both list snapshots exist -> key::affected: None -> attest, Some -> recount; otherwise recount with the differing fields. apply: Store::rekey(to, attests, retract every recount).

Invariant

A part is attested only when its only key difference is the hand lists and affected is None; apply refuses a plan made for another key; snapshot_lists refuses another text under a known fingerprint.

Cost

One part scan per part that needs the list analysis.

Composition

Parent: elephant. Uses key and store.

Behavior complement

Never recounts by itself (a recount is a new pass); never edits the lists. Evidence status: source-derived model with finite checks, not a proof.

Reverse reconstruction

The manifest's attestations and the history recover what was attested, retracted and when.

Tests

Checks

lsm reprogramming test (attest 3, recount 1; red control attests none). These are finite fixtures and measurements; not a proof.

History

2026-11-06 · document

Epoch 2026-11-06

First model, written with the source (the Elephant made incremental and an animal on Mova).

Provenance

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/elephant/src/reprogram.rs.groupant/