Mova0.6 pre-release⌕
☰
home / docs / algorithms / Testing the algorithms

Testing the algorithms

Each algorithm directory contains production code in mod.rs, unit tests in tests.rs, and a groupant beside each Rust file. Measured 2026-10-30 (evidence recorded 2026-10-31): the 200-module library passes 877 checks — 785 library tests (including fifteen composition tests in src/lib.rs), 91 tests in the external composition harnesses and one doctest — twice in debug and twice in release with identical normalized results. Strict package Clippy, formatting and structural validation pass; the wave26 evidence binds the receipts, and the README lists earlier waves. Model inventory and declared test counts are distinct from executed evidence.

Run the focused suite from the repository root:

cargo test -p mova-algorithms --offline
cargo test -p mova-algorithms --offline --release
cargo fmt -p mova-algorithms --check
cargo clippy -p mova-algorithms --all-targets --offline -- -D warnings

Select one algorithm or the composition tests:

cargo test -p mova-algorithms --offline bfs::tests
cargo test -p mova-algorithms --offline knapsack::tests
cargo test -p mova-algorithms --offline composition_tests

Use -- --test-threads=1 for stable execution order when comparing logs. Use a separate CARGO_TARGET_DIR for concurrent worktrees.

The tables below list the test sources of the first eighty modules and of the joins in each harness; every other module has its tests in src/<module>/tests.rs.

AlgorithmTest source
Binary searchtests.rs
Stable merge sorttests.rs
GCDtests.rs
BFStests.rs
Dijkstratests.rs
Topological sorttests.rs
Disjoint setstests.rs
KMPtests.rs
Levenshteintests.rs
0/1 knapsacktests.rs
Heap sorttests.rs
Selectiontests.rs
Strict LIStests.rs
Strong componentstests.rs
Minimum spanning foresttests.rs
All-pairs shortest pathstests.rs
Dynamic sumstests.rs
Immutable minimatests.rs
Integer square roottests.rs
Modular powertests.rs
Signed shortest pathstests.rs
Bipartite matchingtests.rs
Z prefix matchestests.rs
Palindrome radiitests.rs
Dynamic minimatests.rs
Sliding minimatests.rs
Counting sorttests.rs
Radix sorttests.rs
Extended GCDtests.rs
Prime sievetests.rs
Binary-weight pathstests.rs
DAG pathstests.rs
Multi-pattern matchingtests.rs
Suffix arraytests.rs
Common subsequencetests.rs
Interval schedulingtests.rs
Convex hulltests.rs
Closest pairtests.rs
Prime factorstests.rs
Generalized CRTtests.rs
Bridgestests.rs
Articulation pointstests.rs
Euler trailtests.rs
Maximum flowtests.rs
Forest LCAtests.rs
Suffix automatontests.rs
Huffman codestests.rs
Palindromic subsequencetests.rs
Coin changetests.rs
Matrix chaintests.rs
A* pathstests.rs
Two-SATtests.rs
Global minimum cuttests.rs
Verified rolling-hash searchtests.rs
Horspool searchtests.rs
Common substringtests.rs
Restricted alignmenttests.rs
Subset sumtests.rs
Binomial coefficienttests.rs
Interval uniontests.rs
Johnson all-pairs pathstests.rs
Prim foresttests.rs
Packed reachabilitytests.rs
Adjacent suffix prefixestests.rs
Burrows-Wheeler transformtests.rs
Wildcardstests.rs
Bounded knapsacktests.rs
LCS reconstructiontests.rs
Linear recurrencetests.rs
Finite-field convolutiontests.rs

The seven additional composition tests in src/lib.rs check these relations:

These are bounded interaction checks with explicit domain restrictions. Integrated execution results belong in the parent evidence; leaf observations retain their dates.

Small exhaustive domains use independent oracles. Larger deterministic cases exercise wider values, dimensions and histories. Transformation checks retain their assumptions: connectivity does not identify a DSU root; vertex relabeling need not preserve a lexicographic topological order; weight scaling must remain representable. Inputs are deterministic and the tests add no dependencies.

Compiled source mutations run only in external scratch copies. A mutation must compile and a selected newly added test must fail for the intended reason. A compiler error or a filtered run with zero tests is not a successful negative control. Ordinary cargo test never intentionally mutates the production source.

The parent evidence records executed validation and limits. Each test groupant records its oracle, bounded acceptance relation, failure ambiguity and transformation assumptions. Passing finite checks does not prove all inputs.

The graph, Z/Manacher and range groupants also have executable certificate, compatible-input and metamorphic checks. These retain strict/injective transform premises, deterministic-output versus cardinality distinctions and incomplete constructive preimages. Parent evidence records their mutation controls.

Joins in composition_wave4

Run cargo test -p mova-algorithms --test composition_wave4 --offline for the seven separate interaction checks. Their equations, domains, excluded generalizations and ambiguous preimages are in the adjacent model. The hull counterexample rejects treating a hull as a sufficient nearest-pair summary; empty-suffix and global-cycle distinctions prevent invalid substitutions. Independent leaf oracles remain separate evidence.

Joins in composition_wave5

cargo test -p mova-algorithms --test composition_wave5 --offline runs seven restricted joins: matching/flow, indexed graph certificates, LCA/BFS, substring language/count, prefix-tree cost, palindrome lengths and unit-work coin/matrix costs. Leaf oracles remain independent.

Joins in composition_wave7

Run cargo test -p mova-algorithms --test composition_wave7 --offline for eight additional public-API checks. The harness and its adjacent groupant retain the exact adapter domains; the parent catalog records their typed joins. Independent leaf oracles separately test optimum values, witnesses, validation errors and degenerate inputs.

The domains include globally consistent validated A* heuristics, literal-index validity and condensation ranks, symmetric nonnegative cuts with checked u128 totals and proper zero-oriented sides, byte-verified rolling-hash collisions and all empty-pattern boundaries, contiguous substring witnesses, restricted nonmetric OSA distance, subset targets capped at 1,000,000, cancellation before binomial multiplication, and half-open interval union. Cross-algorithm agreement does not remove those restrictions.

Ten leaf production mutants and one compiled knapsack-adapter mutant fail assertions; compiler failures and zero-test runs are not accepted as controls. Parent evidence and the external wave7 run directories preserve the receipts. No GPU, approximation-quality or throughput gain follows from these checks.

Joins in composition_wave10

Run each algorithm filter independently:

cargo test -p mova-algorithms --offline johnson::tests
cargo test -p mova-algorithms --offline prim::tests
cargo test -p mova-algorithms --offline transitive_closure::tests
cargo test -p mova-algorithms --offline lcp_array::tests
cargo test -p mova-algorithms --offline burrows_wheeler::tests
cargo test -p mova-algorithms --offline wildcard_matching::tests
cargo test -p mova-algorithms --offline bounded_knapsack::tests
cargo test -p mova-algorithms --offline hirschberg::tests
cargo test -p mova-algorithms --offline linear_recurrence::tests
cargo test -p mova-algorithms --offline number_theoretic_transform::tests
cargo test -p mova-algorithms --offline --test composition_wave10

composition_wave10.rs declares eight joins:

The independent leaf oracles are separate from these joins. Johnson uses signed Floyd-Warshall, Prim enumerates candidate forests, and closure uses direct graph traversal. LCP compares directly sorted suffixes and prefixes; BWT materializes rotations and enumerates reachable canonical encodings; wildcard matching recursively partitions star matches. Bounded knapsack enumerates multiplicities; Hirschberg enumerates subsequences and checks witness indices. Recurrence uses iterative term generation, while NTT uses schoolbook convolution and checks prime/root-order assumptions and transform roundtrips.

The 43 unit tests of these ten modules comprise 12 graph tests, 15 byte/text tests, eight dynamic-programming tests and eight numeric tests. Leaf sidecars retain source-bound evidence and compiled mutation controls. Raw receipts are external under $MOVA_DATA/runs/octopus-wave10-{graphs,text,dp,numeric}-2026-10-30; each adjacent evidence file binds its exact logs. A valid leaf run does not establish the root joins.

The compiled recurrence-sign adapter control fails its assertion. Run the complete debug/release commands above, repeat each profile with normalized identity/result comparison, and retain all-target Clippy, narrow formatting, structural registration and compiled adapter controls in the parent evidence.

These APIs are exact. Resource caps, graph cycle scope, byte interpretation, canonical BWT metadata, Hirschberg tie policy and modular arithmetic restrict substitutions. Allocation refusal is not universally injected, and the largest supported NTT buffer is not exercised by the numeric leaf. Its five timing batches at four supplied sizes test a prospective NTT/schoolbook crossover only; no GPU, training or full-course acceleration follows.

Joins in composition_wave11

Run the leaf filters and public-API harness:

cargo test -p mova-algorithms --offline hopcroft_karp::tests
cargo test -p mova-algorithms --offline dinic::tests
cargo test -p mova-algorithms --offline tarjan_scc::tests
cargo test -p mova-algorithms --offline damerau_levenshtein::tests
cargo test -p mova-algorithms --offline palindromic_tree::tests
cargo test -p mova-algorithms --offline lyndon_factorization::tests
cargo test -p mova-algorithms --offline berlekamp_massey::tests
cargo test -p mova-algorithms --offline fast_walsh_hadamard::tests
cargo test -p mova-algorithms --offline hungarian::tests
cargo test -p mova-algorithms --offline held_karp::tests
cargo test -p mova-algorithms --offline --test composition_wave11
cargo test -p mova-algorithms --offline --release --test composition_wave11
AlgorithmTest source
Hopcroft-Karp matchingtests.rs
Blocking flowtests.rs
Tarjan componentstests.rs
Unrestricted Damerau distancetests.rs
Eertreetests.rs
Lyndon factorstests.rs
Recurrence synthesistests.rs
XOR convolutiontests.rs
Hungarian assignmenttests.rs
Held-Karp tourtests.rs

composition_wave11.rs declares eight restricted joins:

Independent leaf oracles remain separate evidence: graph fixtures enumerate matchings/cuts or compare reachability; text fixtures use edit-state search, explicit palindrome intervals and finite factorizations; numeric fixtures solve small Gaussian consistency systems and sum XOR pairs directly; optimization fixtures enumerate assignments and tours. The joins cannot broaden a leaf's resource domain, change its objective or turn finite correspondence into a proof.

Repeat complete debug/release runs and compare normalized test identities/results; retain strict all-target Clippy, narrow formatting, source registration, repeated syntax projections and compiled production/oracle/adapter controls. Leaf records retain their own executed evidence. The compiled adapter mutation b[4i] to b[3i] fails the named no-carry convolution assertion; exact restoration passes. Structural reports repeat identically and all 26 changed Rust sources pass registration; the repository-wide require-all gate remains red for the explicit backlog. Parent evidence retains receipts. Allocation failure is not uniformly injected. Current exact APIs add no approximate-error budget, GPU result or full-course performance claim.

Joins in composition_wave14

These ten leaf modules declare 34 unit tests. Use the module filters below with cargo test -p mova-algorithms --offline; four structure modules name their test module wave14_models. Oracle scopes describe bounded executable coverage, not proofs for all supported inputs.

AlgorithmModule filterOracle scope and test count
Minimum bipartite coverbipartite_vertex_cover::tests3 declared tests: all 689 simple graphs with each partition size 0..=3 against independent subset-cover and recursive-matching enumeration; duplicate/alternating witnesses, accepted caps and validation precedence.
Stable marriagestable_marriage::tests3 declared tests: all 46,674 complete strict preference profiles for n=0..=3, independent blocking-pair checks and every stable assignment for proposer-optimality; replacement witness, malformed preferences and n=1000/1001 budget boundary.
Deterministic primalitymiller_rabin::tests4 declared tests: trial division on 0..100,000; strong pseudoprime fixtures, large primes/products and Boolean output fibers. The bounded oracle does not itself establish the full-u64 witness theorem.
Prime-field square roottonelli_shanks::tests4 declared tests: exhaustive root enumeration for every prime p<200 and radicands 0..3*p; invalid/composite validation before zero shortcuts, large-prime constructed squares, canonical smaller roots and normalization fibers.
Minimum cyclic rotationminimal_rotation::tests4 declared tests: explicitly sorted rotations of all ternary-byte words through length 8; periodic/byte ties, a 4096-byte witness, usize boundary arithmetic helpers and false-oracle/fiber controls.
Shift-And matchingshift_and::tests4 declared tests: direct-window oracle for ternary-byte texts through length 6 and patterns through length 4; lengths through 64, overlaps, empty boundaries, typed rejection at 65/128 and false-oracle/fiber controls.
Subset zetasubset_zeta::wave14_models3 declared tests: literal subset sums for every ternary vector of lengths 1,2,4,8 under moduli 1,2,4,7,u64::MAX; wide residues, direction, validation without mutation and accepted N=2²⁰ boundary.
Subset Möbiussubset_mobius::wave14_models3 declared tests: literal signed inclusion-exclusion for every ternary vector of lengths 1,2,4,8 under moduli 1,2,4,7,u64::MAX; wide residues, direction, validation without mutation and accepted N=2²⁰ boundary.
Inversion countinversion_count::wave14_models3 declared tests: direct pair enumeration for every ternary array through length 8 with input preservation; ties/non-Clone ordering and exact reversed-array total at n=2²⁰, plus over-cap rejection.
Minimum Cartesian treecartesian_tree::wave14_models3 declared tests: recursive leftmost-interval-minimum oracle for every ternary array through length 8; literal links/ties/non-Clone ordering and an equal-value chain at n=2²⁰, plus over-cap rejection.

Run the nine public-API joins in both profiles:

cargo test -p mova-algorithms --offline --test composition_wave14
cargo test -p mova-algorithms --offline --release --test composition_wave14

composition_wave14.rs checks these restricted relations:

Worker receipts record ten compiled production mutations and eight false-oracle controls rejected by named assertions. The root control replaces subset_mobius::transform(&mut za, modulus) with subset_zeta::transform(&mut za, modulus) in the OR-convolution join. It compiles and fails zeta_product_inverts_to_or_convolution; exact restoration and positive checks pass. Raw root run evidence includes algorithm-progress.log, clippy-initial.log and algorithm-adapter-mutant.log, with source/log bindings retained in the parent evidence and adjacent leaf sidecars.

Full-u64 primality depends on the documented fixed-witness theorem; finite trial division alone does not prove it. Tonelli–Shanks uses an ascending nonresidue search without a small worst-case search bound. Subset inverses recover residues rather than original representatives. Preference joins use complete strict lists, byte joins do not add Unicode semantics, and range joins retain leftmost ties. Allocation failure and trait panics are not uniformly injected. These native checks establish no benchmark gain, approximate-error budget, GPU behavior, training improvement or general proof.

Joins in composition_wave16

Run the harness in both profiles:

cargo test -p mova-algorithms --offline --test composition_wave16
cargo test -p mova-algorithms --offline --release --test composition_wave16

Leaf filters use <module>::tests; implementations and their independent oracles are adjacent:

ModuleTest sourcePrincipal scope
boruvkatests.rsSigned forest optimum, indexed witnesses, loops, parallel edges and validation.
prufertests.rsCanonical labeled-tree coding, literal trees, degrees, malformed inputs and small empty conventions.
bron_kerboschtests.rsExhaustive small graph/subset optimum and lexicographic witness; simple-graph validation.
banded_levenshteintests.rsThresholded byte distance, band budget and shortcut precedence.
bit_parallel_lcstests.rsByte subsequence length, top-bit/full-word boundaries and shorter-side rejection.
totient_sievetests.rsInclusive totients, coprime counts and resource boundary.
mobius_sievetests.rsSigned arithmetic-function values, square factors and resource boundary.
fibonaccitests.rsModular recurrence, full-width arithmetic, modulus one and zero-modulus rejection.
li_chao_treetests.rsRegistered-coordinate minima, earliest ties, wide products and state/error boundaries.
offline_dynamic_connectivitytests.rsEdge lifetimes, rollback partitions, query order and invalid updates.

The eight public-API joins in composition_wave16.rs retain distinct adapter obligations:

These ten leaf modules have 32 unit tests and eight external joins. Keep compiled production/oracle controls separate from an adapter control, and retain exact source restoration before positive reruns. See the wave16 evidence for final source/log bindings and bounded CPU timing observations. The joins of the later harnesses (composition_wave18, 19, 20, 25 and groupant_wave26_transforms) are described in their adjacent groupants.

Finite bounded checks do not establish whole-domain correctness, practical runtime for 64-vertex clique search or full Mova behavior. Bounded CPU timings do not establish whole-system or training gains. Allocation failure is not uniformly injected, and query summaries generally admit multiple compatible input histories.

This page in Markdown → https://md.mova.elamur.ai/free/en/docs/algorithms/TESTING/