arrow
Return

Interactive LLM-Driven Framework for Cross-Architecture Code Migration: Balancing Efficiency, Accuracy, and Explainability

delete2026-04-01
delete0
PRE
AI
W
Wang, Peng
Q
Qi, Kaiyuan *
Z
Zhen, Feng
Y
Yan, Bingheng
G
Guo, Tao
DOI:10.1002/cpe.70705delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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 & times; 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.
Keywords:
cross-architecture code migration
explainable software transformation
large language models
multi-ISA optimization
QA-driven interaction

Journal

C
CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE
IF:
1.5
Papers:
473
Citations:
0

Organization

I
Inspur
Scholars:
10
Papers: 6
Citations: 0