Elamur GroupantsโŒ•
โ˜ฐ

algorithm-dag-path-count-tests

The groupant beside algorithms/src/dag_path_count/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

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
astpartialsyntax.json
compositionpartialComposition
descriptantpresentEpoch memory
invariantpartialInvariant
testsexecuted bounded checksevidence

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.

idtypelabelwhere
behavior-complementbehavior_complementpartial source derived modelbehavior-complement
reverse-reconstructionreverse_reconstructionpartial source derived modelreverse-reconstruction
oracleindependent_path_enumerationpartial source derived modeloracle
boundaryinteger_boundary_witnesspartial source derived modelboundary
globalvalidation_scope_witnesspartial source derived modelglobal

Model text

model

algorithm-dag-path-count-tests

Domain

Finite fixtures in this test module, a trusted Rust compiler and standard library, and successful allocation; oracle recursion is restricted to four-vertex DAGs.

Source: algorithms/src/dag_path_count/tests.rs; SHA-256: d32093e393ceb0c04668678f34b09e4866755d1fb473979ad315abd558a3a615. Observation is one completed invocation. Models are exact specifications with partial source correspondence, not semantic AST proofs.

Forward

Enumerate actual recursive arc paths independently of topological DP for every ternary multiplicity assignment on six four-vertex forward pairs (729 DAGs), every source and reversed vertex labels. Test exact u128 maximum, deterministic overflow, cycle precedence, unreachable exponential component and 30000-vertex chain.

Cost

Exponential small-input oracle cost is intentional and bounded by enumerated fixtures; long-chain checks use linear output storage. No performance conclusion follows from these tests.

Invariant

Each enumerated fixture is checked against a separately expressed expected result; all test assertions must execute.

behavior-complement

Type: behavior_complement. For the declared finite harness relation H, its complement consists of false passes, false failures, skipped intended assertions, wrong enumerated corpus or disagreement with the explicit expected results. This specification is not inferred merely from seeing a red control. Domain and observation scope are those above; assumptions are fixed inputs, successful allocation and trusted compiler/library. Evidence: evidence.md. Status: partial_source_derived_model.

reverse-reconstruction

Type: reverse_reconstruction. Given a passing harness result, retain every implementation agreeing on the executed finite inputs; behavior outside that corpus remains unconstrained. Given an assertion failure, retain every candidate and fixture yielding that discrepancy. Neither outcome uniquely reconstructs production code. Domain and observation scope are those above; assumptions are fixed inputs, successful allocation and trusted compiler/library. Evidence: evidence.md. Status: partial_source_derived_model.

oracle

Type: independent_path_enumeration. Recursive enumeration follows each distinct arc and increments every reached prefix endpoint; it uses neither indegrees nor DP. Domain and observation scope are those above; assumptions are fixed inputs, successful allocation and trusted compiler/library. Evidence: evidence.md. Status: partial_source_derived_model.

boundary

Type: integer_boundary_witness. Powers 2^0 through 2^127 sum to u128::MAX. An additional 2^127 contribution must overflow at (127,128). Domain and observation scope are those above; assumptions are fixed inputs, successful allocation and trusted compiler/library. Evidence: evidence.md. Status: partial_source_derived_model.

global

Type: validation_scope_witness. A cycle outside source reachability and a cycle beside an overflowing component both reject before counting. Domain and observation scope are those above; assumptions are fixed inputs, successful allocation and trusted compiler/library. Evidence: evidence.md. Status: partial_source_derived_model.

Composition

Intersect the source projection, forward relation, ordered typed obernants, invariants and finite evidence. Tests constrain observations but do not prove all wiring. Parent library exports and registry integration are checked separately.

Epoch memory

Prospective predictions were saved before implementation in ../prospective.md. Original code and fixtures; conceptual origin: Tarjan (1972) lowlink blocks and Kahn (1962) topological ordering with standard DAG recurrence. Existing bridges adjacency and topological_sort were inspected and reused. Production checks matched the first implementation; no semantic repair was needed.

Limits

Allocation failure is excluded. Syntax projection has no macro expansion or semantic resolution. Finite oracles are not unrestricted proofs. An executable approximate surrogate is an explicit gap: no useful certified relaxed metric was established for edge partitions or exact checked counts; the exact oracle is not a speed surrogate.

evidence

Evidence, 2026-10-30

All 456 algorithm library tests passed twice in debug and twice in release; normalized sorted test records were identical. Each new module contributes four tests. Production mutations: replace the lowlink block boundary with true, rejected by articulation_parallel_loops; replace source count one with zero, rejected by exhaustive_path_enumeration. Both compiled and failed named equality assertions; original source bytes were restored and all four tests per module passed again. Strict production Clippy passed. These are finite observations, not speed or unrestricted correctness claims.

External evidence under $MOVA_DATA/runs/octopus-wave18-graphs-2026-10-30:

Source SHA-256: d32093e393ceb0c04668678f34b09e4866755d1fb473979ad315abd558a3a615. Prospective record: ../prospective.md. Syntax projection generated independently twice and compared byte-for-byte.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/algorithms/src/dag_path_count/tests.rs.groupant/