Interactive LLM ‐Driven Framework for Cross‐Architecture Code Migration: Balancing Efficiency, Accuracy, and Explainability
Peng Wang, Kaiyuan Qi, Feng Zhen et al. · Concurrency and Computation Practice and Experience · 2026
ABSTRACT Cross‐architecture code migration has become essential as data centers transition from homogeneous x86 systems to heterogeneous “one‐cloud, multi‐chip” infrastructures that include ARM64, RISC‐V, and domestic processors. Traditional approaches, such as manual refactoring and rule‐based rewriting, face challenges in maintaining semantic correctness, scalability, and explainability. This paper presents an interactive, question‐answering (QA)‐driven framework that uses a frozen large language model (LLM) as a semantic reasoning engine. The framework combines static analysis, AST‐based semantic‐distance modeling, and a self‐evolving rule base for validated transformations, ensuring transparency, explainability, and architecture‐aware migration. It supports multiple languages (C++, Python, Java) and ISAs (x86, ARM64, RISC‐V) without the need for fine‐tuning the LLM. Evaluation on 30 real‐world codebases shows an average migration accuracy of 92.4%, approaching expert‐level performance (95.1%), with a 4.2× reduction in migration errors and significant reduction in developer time (from 20–25 h to 8 h). These results demonstrate that the QA‐driven, LLM‐based migration framework significantly improves efficiency, accuracy, and scalability.
Cited by 0 works. doi:10.1002/cpe.70705
Authors
References
- CCFinder: a multilinguistic token-based code clone detection system for large scale source code
- Simple Fast Algorithms for the Editing Distance between Trees and Related Problems
- Competition-level code generation with AlphaCode
- Kokkos: Enabling manycore performance portability through polymorphic memory access patterns
- Halide
- UniXcoder: Unified Cross-Modal Pre-training for Code Representation
- Cetus: A Source-to-Source Compiler Infrastructure for Multicores
- Summarize and Generate to Back-translate: Unsupervised Translation of Programming Languages
- MCFOF: Multi-Compilation Fusion Optimization Framework using ROSE Compiler Infrastructure