Repository navigation
Description
Parent roadmap: #1. Source checklist area 44 (25 requirements). Related prototype test fix: #4.
Motivation
The existing Haskell checks and C/Python smoke examples validate a small set of normal cases but do not establish broad correctness or interoperability guarantees. Numerical contracts, edge cases, resource lifetimes, and compatibility need targeted automated validation as the public API expands.
Current baseline
test/Main.hs contains nine normal-case assertions. Meson registers C and Python FFI examples that print addition, mean, and factorial results without asserting their values; boundary, exception, threading, ownership, and lifecycle coverage is not established.
Scope
- Extend and harden the existing Haskell unit tests
- Extend and harden the existing C and Python FFI tests
- Tests for every public API
- Boundary, empty-input, and dimension-mismatch tests
- NaN, infinity, overflow, and underflow tests
- Large-value and small-value tests
- Complex-number and arbitrary-precision tests
- ULP, relative-error, and absolute-error validation
- Convergence and failure detection
- Matrix identities and factorization residuals
- FFT inversion, numerical derivatives, and integration checks
- Automatic differentiation gradient checks
- Tensor shapes and broadcasting
- Distribution and RNG quality
- Property-based testing, QuickCheck, and Hspec
- Golden and differential testing
- Comparisons with NumPy, SciPy, GSL, BLAS, and PyTorch
- Cross-platform and cross-compiler testing
- FFI pointer, buffer, thread, exception, and RTS lifecycle tests
- Memory-leak tests and ASan, UBSan, and TSan in applicable areas
- Parser and binary-reader fuzzing
- ABI compatibility tests
- Long-running stability tests
- Numerical and performance regression tests
- Coverage, CI, and release validation
Completion criteria
- Make C/Python tests assert returned values and errors, and add regressions for zero-dimension matrices and supported RTS lifecycle behavior.
- Maintain a public-API coverage map tying numerical tolerances, failure contracts, and relevant properties or reference comparisons to automated tests.
- Run applicable sanitizers, concurrency/lifecycle checks, fuzzing, and long-running tests without suppressing unexplained failures.
- Execute the agreed platform/compiler and release validation matrix with reproducible commands and recorded results.
Compatibility
This is a functional-area development backlog. The mandatory 1.0.0 release subset is not yet agreed; inclusion in the planning milestone does not make every item a release blocker. Preserve existing callers where practical and record deliberate API/ABI changes before implementation. Share overlapping primitives with the other roadmap areas and link smaller implementation issues here as work is selected.
Dense-foundation implementation
Implementation PR: #53.
- Added 61 matrix and 21 vector test groups alongside the existing nine assertions (91 total).
- Bounded models cover 400 slices, 64 multiplication cases, 256 associativity shape chains, typed errors, empty shapes, and maxBound overflow checks.
- All nine Meson tests pass in Release/Debug; a separate faulty Haskell assertion proves failure propagation. Clean-source Haskell compilation also passes with -Werror.
- Validation was performed on Linux x86-64; the remaining validation checklist stays open.
This records the selected implementation batch; the broader tracking issue remains open.
Pivoted LU implementation
Implementation PR: #55.
- Added 69 LU test groups, bringing the Haskell suite to 160 groups.
- Independent coordinate formulas cover 625 small 2x2 determinants and 496 invertible systems/inverses; tests also cover later pivot swaps, residuals, Float/Double, tolerance boundaries, nonfinite values, overflow, and empty shapes.
- All 9 Meson tests pass in both Release and Debug configurations on Linux x86-64 / GHC 9.10.3. Clean-source
-Wall -Werrorcompilation, the runnable Haskell example, Haddock, and source-package inclusion checks also pass.
The remaining validation and cross-platform checklist stays open.
Activity