graph TD subgraph "C++ ckpttn-cpp" A1[MLPartMgr.hpp] A2[min_cover.cpp\n MinHash + Matching] A3[MidLvlPartMgr.hpp\n Hamiltonian Cycle] A4[FMBiGainCalc.hpp] end subgraph "Rust ckpttn-rs" B1[ml_part_mgr.rs] B2[min_cover.rs\n ~~ Greedy ~~] B3[mid_lvl_part_mgr.rs] B4[fm_bi_gain_calc.rs] end A1 -->|ported| B1 A2 -->|ported 2026| B2 A3 -->|ported 2026| B3 A4 -->|ported| B4 style A2 fill:#4caf50 style B2 fill:#ff9800,stroke-dasharray: 5 5 style A3 fill:#4caf50 style B3 fill:#ff9800,stroke-dasharray: 5 5
graph TD subgraph "User API" A[MLBiPartMgr] --> B[PartMgrBase] C[MLKWayPartMgr] --> B D[MLMidLvlPartMgr] --> E[MidLvlPartMgr] F[MLMidLvlKWayPartMgr] --> G[MidLvlKWayPartMgr] end subgraph "Core Engine" B --> H[FMBiGainCalc] B --> I[FMBiConstrMgr] B --> J[FMKWayGainCalc] B --> K[FMKWayConstrMgr] end subgraph "Multi-Level" L[contract_subgraph] --> M[min_maximal_matching] L --> N[MinHash Pruning] O[HierNetlist] --> P[projection_up] O --> Q[projection_down] end style A fill:#4caf50 style C fill:#4caf50 style D fill:#2196f3 style F fill:#2196f3 style L fill:#ff9800 style M fill:#ff9800 style N fill:#ff9800
graph TD subgraph "Greedy (138 clusters)" G1["โก Heavy nets first\n Each cluster is large\n Fewer total clusters"] end subgraph "Primal-Dual (328 clusters)" P1["โ๏ธ Minimizes total weight\n Each cluster is smaller\n More total clusters"] end style G1 fill:#4caf50 style P1 fill:#2196f3
graph TD subgraph "After: Fixed" D[contract_subgraph] --> E[HierNetlist\n cluster_modules โ] E --> F[projection_down\n ALL modules โ] end subgraph "Before: Broken" A[contract_subgraph] --> B[HierNetlist\n parent = None] B --> C[projection_down\n SKIPS clusters โ] end style C fill:#f44336 style F fill:#4caf50
graph LR subgraph "Short Term" A["๐ง Fix Hamiltonian Cycle\n (full isize migration)"] B["๐งช NNPartMgr specialization"] end subgraph "Medium Term" C["๐ Benchmark suite\n (ibm01โibm18)"] D["๐ Performance comparison\n C++ vs Rust"] end subgraph "Long Term" E["๐ Parallel FM\n (rayon backend)"] F["๐ฌ GPU-accelerated\n matching"] end A --> C B --> C C --> D D --> E D --> F style A fill:#ff9800 style B fill:#ff9800 style C fill:#2196f3 style D fill:#2196f3 style E fill:#9c27b0 style F fill:#9c27b0
graph TD subgraph "AI Claims" C1["โ All tests pass!\n (said 3ร)"] end subgraph "Reality" R1["โ Greedy vs Primal-Dual\n claims were wrong"] R2["โ Overflow panics\n (vertex.rs:345)"] R3["โ Wrong vec size\n (FMKWayGainCalc)"] R4["โ Infinite loops\n (MidHamCycle)"] R5["โ Broken projection\n (parent never set)"] end C1 -.->|verify| R1 C1 -.->|verify| R2 C1 -.->|verify| R3 C1 -.->|verify| R4 C1 -.->|verify| R5 style C1 fill:#f44336 style R1 fill:#ff9800 style R2 fill:#ff9800 style R3 fill:#ff9800 style R4 fill:#ff9800 style R5 fill:#ff9800