Rectifier: Code Translation with Corrector via LLMs
원문 초록
Software migration is garnering increasing attention with the evolution of software and society. Early studies mainly relied on handcrafted translation rules to translate between two languages, the translation process is error-prone and time-consuming. In recent years, researchers have begun to explore the use of pre-trained large language models (LLMs) in code translation. However, code translation is a complex task that LLMs would generate mistakes during code translation, they all produce certain types of errors when performing code translation tasks, which include (1) compilation error, (2) runtime error, (3) functional error, and (4) non-terminating execution. We found that the root causes of these errors are very similar (e.g. failure to import packages, errors in loop boundaries, operator errors, and more). In this paper, we propose a general corrector, namely Rectifier, which is a micro and universal model for repairing translation errors. It learns from errors generated by existing LLMs and can be widely applied to correct errors generated by any LLM. The experimental results on translation tasks between C++, Java, and Python show that our model has effective repair ability, and cross experiments also demonstrate the robustness of our method.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
Mutual-Supervised Learning for Sequential-to-Parallel Code Translation
Function-to-Style Guidance of LLMs for Code Translation
Guaranteed Guess: A Language Modeling Approach for CISC-to-RISC Transpilation with Testing Guarantees
LEGO-Compiler: Enhancing Neural Compilation Through Translation Composability
On-Policy Optimization with Group Equivalent Preference for Multi-Programming Language Understanding
LLM-Assisted Translation of Legacy FORTRAN Codes to C++: A Cross-Platform Study
토론
이 논문과 연결된 포럼 글이 아직 없습니다.