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

# algorithm-suffix-array-tests

The groupant beside algorithms/src/suffix_array/tests.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 derived instance
- **source:** [`algorithms/src/suffix_array/tests.rs`](https://github.com/ElamurAI/mova-free/blob/main/algorithms/src/suffix_array/tests.rs)
- **source SHA-256:** `a2c7d645ae0f5094…`
- **repository folder:** [`algorithms/src/suffix_array/tests.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/algorithms/src/suffix_array/tests.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** | bounded checked | [Forward](#forward) |
| **ast** | partial | `syntax.json` |
| **cost** | symbolic unmeasured | [Cost](#cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | source derived | [Invariant](#invariant) |
| **tests** | bounded executed | [evidence](#evidence) |

## 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 |
|---|---|---|---|
| `nonbehavior` | behavior_complement | partial source derived | [nonbehavior](#nonbehavior) |
| `preimages` | reverse_reconstruction | partial source derived | [preimages](#preimages) |
| `oracle-agreement` | correspondence_relation | partial source derived | [oracle-agreement](#oracle-agreement) |
| `premise-boundary` | metamorphic_relation | partial source derived | [premise-boundary](#premise-boundary) |
| `mutation-detection` | distinguishability_relation | partial source derived | [mutation-detection](#mutation-detection) |

## Model text


### descriptant

#### suffix_array tests.rs epoch memory

2026-10-30. Original std-only code, no copied source. Prospective model preceded code in mod.rs.groupant/prospective.md. Classical citations appear in implementation documentation; variant complexity is explicit.

Four tests: 9,841 ternary inputs of length 0..8 against independent direct suffix comparison; empty/singleton/banana, 1,025-byte equal and periodic strings, all bytes; increasing relabel and minimum-prefix laws; ten compatible predecessor triples. Compiled production mutant reversing returned order fails boundaries_and_long_common_prefixes.

The combiner relates authoritative source and its SHA-256, partial syntax, forward relation, typed obernants, invariant, cost and finite evidence. Models preserve ambiguity in compatible predecessors. Missing semantic AST analysis, universal proof, allocator exhaustion and downstream composition remain explicit. Exact production algorithms need no fabricated executable approximation. Any future approximate profile must honor supported 1%, 2%, 5%, 10% caps and bind source and evidence.

### model

## suffix_array tests.rs model

### Forward

Run deterministic independent byte oracles, boundary cases, transformation laws and compatible-output fibers; assert exact values and explicit false-premise counterexamples. Passing finite checks does not establish universal correctness.

### Invariant

Oracle logic does not use production failure links or ranks. All fixtures deterministic; comparison checks include output order, offsets and multiplicity. Negative controls compile production mutations.

### Cost

Bounded exhaustive fixture enumeration; oracle Aho scans each pattern at each boundary; suffix oracle uses repeated minimum selection and full byte comparisons. Test cost is intentionally independent of production claims.

### nonbehavior

Type: behavior_complement. Domain: Finite deterministic fixtures and test executions; no arbitrary programs or hidden production state.

Exclude acceptance when an asserted production output differs from the independent oracle, a stated conditional law fails under its premises, or a compatible-output fiber differs from direct constraints. Unvisited inputs are outside this finite acceptance claim.

Source-derived partial relation with finite evidence, not universal verification.

### preimages

Type: reverse_reconstruction. Domain: Finite deterministic fixtures and test executions; no arbitrary programs or hidden production state.

A passing observation admits every implementation agreeing on the tested fixture observations. Many implementations may differ elsewhere; test success cannot uniquely reconstruct source or establish universal correctness.

Source-derived partial relation with finite evidence, not universal verification.

### oracle-agreement

Type: correspondence_relation. Domain: Finite deterministic fixtures and test executions; no arbitrary programs or hidden production state.

Direct byte-window equality or repeated minimum of complete suffixes supplies the independent specification; production rank and failure-link machinery is not reused.

Source-derived partial relation with finite evidence, not universal verification.

### premise-boundary

Type: metamorphic_relation. Domain: Finite deterministic fixtures and test executions; no arbitrary programs or hidden production state.

Tests pair valid relabel/extension transformations with explicit invalid-premise counterexamples; an oracle equality does not license dropping injectivity or byte-order conditions.

Source-derived partial relation with finite evidence, not universal verification.

### mutation-detection

Type: distinguishability_relation. Domain: Finite deterministic fixtures and test executions; no arbitrary programs or hidden production state.

Reversing the returned suffix order must fail the boundary test; compilation success and assertion failure, not compilation error, establish this control.

Source-derived partial relation with finite evidence, not universal verification.

### evidence

#### Evidence 2026-10-30

Four tests: 9,841 ternary inputs of length 0..8 against independent direct suffix comparison; empty/singleton/banana, 1,025-byte equal and periodic strings, all bytes; increasing relabel and minimum-prefix laws; ten compatible predecessor triples. Compiled production mutant reversing returned order fails boundaries_and_long_common_prefixes.

Debug and release each ran twice with identical normalized per-test outcomes (durations excluded). Strict crate Clippy with all targets and denied warnings, owned rustfmt, and four twice-generated identical source-bound syntax projections passed. All 175 crate tests also passed once with temporary module declarations. Mutants restored before hashing; no shared lib or registry edits committed. No timing, allocator-exhaustion or universal proof claim.
