CoTran: An LLM-based Code Translator using Reinforcement Learning with Feedback from Compiler and Symbolic Execution
Not on the map. Why?
Abstract (arXiv)
In this paper, we present an LLM-based code translation method and an associated tool called CoTran, that translates whole-programs from one high-level programming language to another. Existing LLM-based code translation methods lack training to ensure that the translated code reliably compiles or bears substantial functional equivalence to the input code. In our work, we fine-tune an LLM using reinforcement learning, incorporating compiler feedback, and symbolic execution (symexec)-based testing feedback to assess functional equivalence between the input and output programs. The idea is to guide an LLM during fine-tuning, via compiler and symexec-based testing feedback, by letting it know how far it is from producing perfect translations. We conduct extensive experiments comparing CoTran with 14 other code translation tools, including human-written transpilers, LLM-based translation tools, and ChatGPT. Using a benchmark of over num57000 code pairs in Java and Python, we demonstrate that CoTran outperforms the other tools on relevant metrics such as compilation accuracy (CompAcc) and functional equivalence accuracy (FEqAcc). For example, in Python-to-Java translation, CoTran achieves 48.68% FEqAcc and 76.98% CompAcc, whereas the nearest competing tool (PLBART-base) gets 38.26% and 75.77% respectively. Additionally, CoTran, built on top of CodeT5, improves FEqAcc by +14.89% and CompAcc by +8.14% for Python-to-Java (resp., +12.94% and +4.30% for Java-to-Python).
Key facts. Cited by 22 papers in the map (data through 14 Oct 2026). Builds on 22 of its 47 references that are in the map. First posted on arXiv 11 Jun 2023.
Builds on
22 of 47 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
10 more
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2020IntelliCode Compose: Code Generation Using Transformercited by 227
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 99
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2022Pynguin: Automated Unit Test Generation for Pythoncited by 50
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2021Learning migration models for supporting incremental language migrations of software applicationscited by 1
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 10; 2026: 9.
22 papers.
Sort:
By area:
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024From Allies to Adversaries: Manipulating LLM Tool-Calling through Adversarial Injectioncited by 38
- 2025Type-Constrained Code Generation with Language Modelscited by 35
- 2025ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddingscited by 18
- 2024RLSF: Fine-tuning LLMs via Symbolic Feedbackcited by 14
- 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinementcited by 6
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 4
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rustcited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translationcited by 3
- 2026CDRL: Certification-Driven Reinforcement Learning for Neutrino Flavor Model Discoverycited by 2
- 2025P4OMP: Retrieval-Augmented Prompting for OpenMP Parallelism in Serial Codecited by 1
10 more
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corporacited by 1
- 2025Toward Neurosymbolic Program Comprehensioncited by 0
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insightscited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026Evaluating the Robustness of Proof Autoformalization in Lean 4cited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervisioncited by 0
- 2026ORCA: Evaluating LLMs on Data Science Code Translationcited by 0
- 2026AIProver: Agentic Auto-Formalization of Mathematical Research via Certificate-Driven Evolving Harnesscited by 0
- 2026AIProver: Agentic Auto-Formalization of Mathematical Research via Certificate-Driven Evolving Harness4 Oct 2026
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026CDRL: Certification-Driven Reinforcement Learning for Neutrino Flavor Model Discovery21 Aug 2026
- 2026Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervision14 Aug 2026
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026Evaluating the Robustness of Proof Autoformalization in Lean 412 Jun 2026
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corpora20 Apr 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddings17 Oct 2025
- 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement4 Oct 2025
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights21 Jul 2025
10 more
- 2025P4OMP: Retrieval-Augmented Prompting for OpenMP Parallelism in Serial Code28 Jun 2025
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rust7 May 2025
- 2025Type-Constrained Code Generation with Language Models12 Apr 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025Toward Neurosymbolic Program Comprehension3 Feb 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024From Allies to Adversaries: Manipulating LLM Tool-Calling through Adversarial Injection13 Dec 2024
- 2024RLSF: Fine-tuning LLMs via Symbolic Feedback26 May 2024
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2024From Allies to Adversaries: Manipulating LLM Tool-Calling through Adversarial Injectioncited by 38
- 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinementcited by 6
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insightscited by 0
- 2026AIProver: Agentic Auto-Formalization of Mathematical Research via Certificate-Driven Evolving Harnesscited by 0
- 2026AIProver: Agentic Auto-Formalization of Mathematical Research via Certificate-Driven Evolving Harness4 Oct 2026
- 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement4 Oct 2025
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights21 Jul 2025
- 2024From Allies to Adversaries: Manipulating LLM Tool-Calling through Adversarial Injection13 Dec 2024
- 2024RLSF: Fine-tuning LLMs via Symbolic Feedbackcited by 14
- 2024RLSF: Fine-tuning LLMs via Symbolic Feedback26 May 2024
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2025Type-Constrained Code Generation with Language Modelscited by 35
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 4
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rustcited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translationcited by 3
- 2025Toward Neurosymbolic Program Comprehensioncited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026Evaluating the Robustness of Proof Autoformalization in Lean 4cited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026ORCA: Evaluating LLMs on Data Science Code Translationcited by 0
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026Evaluating the Robustness of Proof Autoformalization in Lean 412 Jun 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rust7 May 2025
- 2025Type-Constrained Code Generation with Language Models12 Apr 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025Toward Neurosymbolic Program Comprehension3 Feb 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023