Conversation
Remove public re-exports of ~30 ReductionXToY structs, 6 gadget functions, BoolVar, LogicGadget, and JSON serialization types (EdgeJson, NodeJson, ReductionGraphJson) from rules/mod.rs. Users interact with reductions via the ReduceTo trait or ReductionGraph, never referencing these structs by name. Also remove unused ReductionColoringToILP type alias and suppress dead_code warnings on LogicGadget fields only read in tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change internal type re-exports (CopyLine, MappingGrid, CellState, Pattern, etc.) from pub to pub(crate) in unitdiskmapping/mod.rs. Change alpha_tensor and pathdecomposition modules to pub(crate). Add #[cfg(test)] guards on re-exports only needed by unit tests. Add #[doc(hidden)] _internal module for the export_mapping_stages example which needs these types. Keep ksg, triangular modules and GridKind/MappingResult as pub. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…es module - Change polynomial and truth_table modules from pub to pub(crate) since they are only used internally via crate:: imports. - Delete graph_types.rs and its unit test file (zero internal imports, confirmed by codebase audit; actual graph types live in topology/). - Remove truth_table integration tests from tests/suites/reductions.rs (equivalent coverage exists in src/unit_tests/truth_table.rs). - Remove doc example from TruthTable since the module is now internal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add public is_valid_solution(&self, config: &[usize]) -> bool methods to all graph problem types, delegating to existing private validation helpers. Also add cut_size method to MaxCut for computing partition cut sizes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add public is_valid_solution methods to MaximumSetPacking, MinimumSetCovering, BicliqueCover, CircuitSAT, and Factoring. Each delegates to existing validation logic. PaintShop already has count_switches and BMF is skipped per design. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change standalone validation free functions (is_independent_set, is_vertex_cover, is_clique, etc.) from pub to pub(crate) with #[cfg(test)] for test-only functions. Functions still used in non-test code (is_valid_coloring, is_hamiltonian_cycle, cut_size) remain pub(crate) without #[cfg(test)]. - Change 17 validation functions from pub to pub(crate) - Add #[cfg(test)] to 14 functions only used in tests - Remove validation function re-exports from graph/set/specialized mod.rs - Make submodules pub(crate) for crate-internal test access - Update graph_models.rs imports to use full module paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change these utility functions from pub to pub(crate) with #[cfg(test)] since they are only used in unit tests. This reduces the public API surface of the config module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove from prelude: config utilities, registry types, variant types, ILP/optimization internals, NumericSize, and WeightElement. These items remain accessible via their full module paths. Add explicit imports to 16 examples, 2 integration test files that previously relied on the broader prelude: - ILP type: 13 examples + 1 test file - K3/K2 variant types: 7 examples + 2 test files - LinearConstraint/ObjectiveSense: 1 example + 1 test file Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These tests were dropped when graph_types.rs was deleted but had no equivalent coverage elsewhere. Added them to variant.rs where similar graph type VariantParam tests already exist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
==========================================
+ Coverage 96.13% 96.33% +0.20%
==========================================
Files 193 193
Lines 26585 26682 +97
==========================================
+ Hits 25557 25704 +147
+ Misses 1028 978 -50 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cover all 15 new public methods with both valid and invalid cases: - 14 is_valid_solution tests across all problem types - 1 cut_size method test for MaxCut Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReductionXToYstructs changed topub(crate), unitdiskmapping internals moved behind#[cfg(test)]re-exportsis_valid_solution()inherent methods to all 15+ problem types, replacing standalone validation functionspolynomial,truth_table, delete unusedgraph_typesmodulePlanarGraph/BipartiteGraphVariantParam testsTest plan
cargo test— 1479 tests)Closes #77
🤖 Generated with Claude Code