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

# mlab-rng-stream

The groupant beside mlab/src/rng.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:** [`mlab/src/rng.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/src/rng.rs)
- **source SHA-256:** `dccb613f518f3221…`
- **covers:** Seed expansion applies four wrapping splitmix rounds; next_u64 returns rotl(s1*5,7)*9 then XOR/shift/rotl45 transition. Uniform=(result>>11)/2^53. (bytes 386–1433)
- **part of:** [mlab-rng](https://md.groupants.elamur.ai/free/en/mova/mlab/src/rng.rs.groupant/)
- **repository folder:** [`mlab/src/rng.rs.groupant/stream.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/src/rng.rs.groupant/stream.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 | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | partial bounded parent evidence | [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) |
| `uniform_grid` | uniform_grid | partial source derived model | [uniform_grid](#uniform-grid) |
| `seed_reset` | seed_reset | partial source derived model | [seed_reset](#seed-reset) |
| `branch_relation` | branch_relation | partial source derived model | [branch_relation](#branch-relation) |
| `resource_cost` | resource_cost | partial source derived model | [resource_cost](#resource-cost) |

## Model text


### descriptant

#### mlab-rng-stream

Seed expansion applies four wrapping splitmix rounds; next_u64 returns rotl(s1*5,7)*9 then XOR/shift/rotl45 transition. Uniform=(result>>11)/2^53.

Epoch 2026-10-31: isolated source-bound fragment over bytes [386,1433); includes no claim beyond this relation. Source hash dccb613f518f32218a910c4eca3ad31df44347dd38b90d431833558e995a2046.

### approximant

#### stream: forward relation

Seed expansion applies four wrapping splitmix rounds; next_u64 returns rotl(s1*5,7)*9 then XOR/shift/rotl45 transition. Uniform=(result>>11)/2^53.

Domain: All u64 seeds; IEEE f64 libm operations. Cross-platform transcendental bit identity is not proved.

Executable surrogate gap: no measured cheaper implementation with a useful scoped metric is supplied. Categorical/error/effect relations are exact obligations, not percent losses. Future numeric caps only1/2/5/10%.

### invariant

#### stream: invariant and cost

Representable uniforms lie on j/2^53, 0<=j<2^53.

reseed replaces both state and spare; uniform draws do not consume spare.

Scope-specific cost: O(1) wrapping integer operations, four words; uniform consumes exactly one next_u64.

### models

### behavior_complement

Uniform excludes 1 and negative values; wrapping state arithmetic excludes debug overflow panics in the multiplications/addition explicitly marked wrapping.

### reverse_reconstruction

A uniform value admits all low11-bit result antecedents plus compatible state words. Output alone does not recover the seed.

### uniform_grid

Representable uniforms lie on j/2^53, 0<=j<2^53.

### seed_reset

reseed replaces both state and spare; uniform draws do not consume spare.

### branch_relation

Seed expansion applies four wrapping splitmix rounds; next_u64 returns rotl(s1*5,7)*9 then XOR/shift/rotl45 transition. Uniform=(result>>11)/2^53.

### resource_cost

O(1) wrapping integer operations, four words; uniform consumes exactly one next_u64.

### tests

#### Evidence boundary

See ../tests.md for the actual selected source test and mutant. These tests sample the file, not every fragment branch. Uniform excludes 1 and negative values; wrapping state arithmetic excludes debug overflow panics in the multiplications/addition explicitly marked wrapping. Other branches here are source-derived and unexecuted unless the parent test explicitly calls them.
