ODEL: An Experience-Augmented Self-Evolving Framework for Efficient Python-to-C++ Code Translation

Read full text
Authors: Kaiyuan Feng, Furong Peng, Jiayue Wu
Cited by: 1
References: 12

Abstract

Automated code translation plays an important role in improving software reusability and supporting system migration, particularly in scenarios where Python implementations need to be converted into efficient C++ programs. However, existing approaches often rely heavily on large external models or static inference pipelines, which limits their ability to improve translation quality over time.To address these challenges, this paper proposes ODEL, an On-Demand Experience-enhanced Learning framework for Python-to-C++ code translation. ODEL adopts a hybrid inference architecture in which a lightweight internal model performs routine translation, while a more capable external model is selectively invoked upon verification failure to conduct error analysis and generate structured experience records. These experience records are accumulated and reused across subsequent translation phases, enabling progressive improvement through a closed-loop workflow that integrates generation, verification, consideration, and experience refinement. Experiments on the HumanEval-X benchmark demonstrate that ODEL significantly improves translation accuracy compared with competitive baselines. Specifically, the framework increases Pass@1 from 71.82% to 81.10% and Pass@10 from 74.30% to 89.02%, and exhibits a consistent performance improvement across multiple translation phases. These results indicate that experience reuse within a continuous task stream can effectively enhance automated code translation without modifying model parameters.

Fields of Study & Subjects

Software Testing and Debugging Techniques Software Engineering Research Parallel Computing and Optimization Techniques

Publication details

Journal / source
Applied Sciences
Publisher
MDPI AG
Volume
16
Issue
3
Pages
1506–1506
Publication date
2 February 2026
Language
EN