Problem & Challenge: Mission-critical systems across banking, aerospace, and quantitative finance still rely heavily on legacy C/C++ codebases developed decades ago. These systems present severe engineering risks: pervasive memory unsafety (raw pointers, unguarded dynamic allocations, memory leaks), convoluted control flows (spaghetti logic, deeply nested branches, goto statements), and deprecated legacy cryptography (MD5, SHA-1, DES). Modernizing these massive codebases manually is prohibitively slow, expensive, and error-prone, while traditional static linters produce thousands of noisy, uncontextualized warnings without offering a clear, prioritized remediation path. Our Solution - Chronos AI: Chronos AI is an intelligent source code analysis, clustering, and verification pipeline engineered to de-risk legacy software modernization. Chronos AI parses legacy C/C++ source code using Tree-sitter ASTs (with a robust regex fallback engine), extracting 53 multidimensional metrics across code complexity, memory safety, pointer arithmetic, struct alignment, and cryptographic routines. It feeds these vectors into unsupervised machine learning algorithms (K-Means and DBSCAN) to categorize heterogeneous codebases into distinct behavioral archetypes: memory_unsafe, legacy_crypto, and business_logic. The engine flags high-risk architectural flaws (such as float precision hazards, quantum vulnerability, and memory leaks) and automatically isolates "gold samples"—the highest-risk, most representative source files suitable for prioritized modernization. Target Users & User Interaction: Target users include enterprise software architects, security engineers, and modernization teams managing legacy code. Users execute the pipeline via a clean command-line interface: python main.py --input ./source-code --output ./output --gold-dir ./chronos-gold-samples Chronos AI produces structured JSON/CSV feature matrices, 2D PCA cluster visualizations, risk summaries, and an interactive HTML report. Developers and AI coding agents then focus remediation efforts directly on the extracted gold samples. Creativity & Uniqueness: Unlike standard linters, Chronos AI blends syntax tree analysis with unsupervised clustering to uncover the architectural blueprint of an entire codebase. Crucially, Chronos AI features an independent Before/After verification harness (demo/measure.py and demo/compare.py) utilizing an OWASP-style Likelihood x Impact risk formulation (v3). This provides empirical, quantitative proof of code health improvements rather than subjective assessments. Impact & Real-world Results: In our end-to-end benchmark on complex legacy packages (including financial math routines, clib utilities, khmm, and kopen), Chronos AI guided autonomous modernization via IBM Bob, achieving a 100% elimination of unguarded memory allocations (reduced from 30 down to 0) and an 84.9% reduction in composite memory risk scores, all while preserving strict build and functional integrity across GCC Linux and Windows toolchains.
Category tags: