Skip to content

Unify Resolution structs with runtime dispatch#4

Open
JoeyBF wants to merge 1 commit intomasterfrom
unify-resolution-runtime-dispatch
Open

Unify Resolution structs with runtime dispatch#4
JoeyBF wants to merge 1 commit intomasterfrom
unify-resolution-runtime-dispatch

Conversation

@JoeyBF
Copy link
Copy Markdown
Owner

@JoeyBF JoeyBF commented Mar 23, 2026

Summary

  • Replaces the compile-time nassau feature flag with a QueryModuleResolution enum that dispatches to the standard or Nassau algorithm at runtime
  • nassau::Resolution now uses SteenrodAlgebra/CCC types externally (matching the standard resolution's associated types), with a milnor_algebra() helper for internal algorithm operations
  • construct() auto-detects Nassau when conditions are met (p=2, Milnor, finite-dimensional, no profile/cofiber) and a save directory is provided; without a save dir, standard is used to preserve in-memory quasi-inverse support
  • All #[cfg(feature = "nassau")] blocks removed from examples, utilities, and tests
  • Deleted 9 nassau-specific benchmark files (standard benchmarks now cover them)

Test plan

  • make lint passes
  • make test passes (all lib, integration, doc, and pytest tests)
  • make benchmarks passes (output unchanged)
  • cargo test --test milnor_vs_nassau confirms nassau and standard produce identical output

🤖 Generated with Claude Code

Replace the compile-time `nassau` feature flag with a single
`QueryModuleResolution` enum that dispatches to either the standard
or Nassau algorithm at runtime.

Key changes:
- `nassau::Resolution` no longer has a type parameter; it now uses
  `SteenrodAlgebra`/`CCC` types externally, matching the standard
  resolution's associated types. A `milnor_algebra()` helper extracts
  `&MilnorAlgebra` internally for algorithm-specific operations.
- `QueryModuleResolution` enum (Standard/Nassau) implements
  `ChainComplex` and `AugmentedChainComplex` via a `delegate!` macro,
  picking up the `FreeChainComplex` blanket impl automatically.
- `construct()` auto-detects Nassau when: Milnor basis, p=2, finite
  dimensional module, no profile, no cofiber, and a save directory is
  provided. Without a save directory, standard is used to preserve
  in-memory quasi-inverse support for `ResolutionHomomorphism` and
  `SecondaryResolution`.
- All `#[cfg(feature = "nassau")]` blocks removed from examples and
  utilities.
- Nassau benchmark files deleted (standard benchmarks now cover them).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant