Translating to a Low-Resource Language with Compiler Feedback: A Case Study on Cangjie
- 1 August 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 51 (9) , 2671-2692
Abstract
In the rapidly advancing field of software development, the demand for practical code translation tools has surged, driven by the need for interoperability across different programming environments. Existing learning-based approaches often need help with low-resource programming languages that lack sufficient parallel code corpora for training. To address these limitations, we propose a novel training framework that begins with monolingual seed corpora, generating parallel datasets via back-translation and incorporating compiler feedback to optimize the translation model. As a case study, we apply our method to train a code translation model for a new-born low-resource programming language, Cangjie. We also construct a parallel test dataset for Java-to-Cangjie translation and test cases to evaluate the effectiveness of our approach. Experimental results demonstrate that compiler feedback greatly enhances syntactical correctness, semantic accuracy, and test pass rates of the translated Cangjie code. These findings highlight the potential of our method to support code translation in low-resource settings, expanding the capabilities of learning-based models for programming languages with limited data availability.Keywords
Funding Information
- Natural Science Foundation of China (62272221, 62172205, 62172202)
- Huawei-Nanjing University Software New Technology Joint Laboratory
This publication has 22 references indexed in Scilit:
- Large Language Models are Diverse Role-Players for Summarization Evaluation2023
- Syntax and Domain Aware Model for Unsupervised Program Translation2023
- Migrating Legacy Software to Microservices Architecture2019
- Divide-and-Conquer Approach for Multi-phase Statistical Migration for Source Code (T)2015
- Migrating code with statistical machine translation2014
- Lexical statistical machine translation for language migration2013
- Mining API mapping for language migration2010
- AURA2010
- May the source be with youWork Study, 2000
- Directionality in Translation Processes and Practices1996