Lune

FSE2025顶会

AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation

Ali Reza Ibrahimzada, Kaiyao Ke, Mrigank Pawagi, Muhammad Salman Abid, Rangeet Pan, Saurabh Sinha, Reyhaneh Jabbarvand

摘要

Code translation transforms programs from one programming language (PL) to another. One prominent use case is application modernization to enhance maintainability and reliability. Several rule-based transpilers have been designed to automate code translation between different pairs of PLs. However, the rules can become obsolete as the PLs evolve and cannot generalize to other PLs. Recent studies have explored the automation of code translation using Large Language Models (LLMs). One key observation is that such techniques may work well for crafted benchmarks but fail to generalize to the scale and complexity of real-world projects with inter- and intra-class dependencies, custom types, PL-specific features, etc. We propose AlphaTrans, a neuro-symbolic approach to automate repository-level code translation. AlphaTrans translates both source and test code, and employs multiple levels of validation to ensure the translation preserves the functionality of the source program. To break down the problem for LLMs, AlphaTrans leverages program analysis to decompose the program into fragments and translates them in the reverse call order . We leveraged AlphaTrans to translate ten real-world open-source projects consisting of ⟨836, 8575, 2719⟩ (application and test) classes, (application and test) methods, and unit tests. AlphaTrans breaks down these projects into 17874 fragments and translates the entire repository. 96.40% of the translated fragments are syntactically correct, and AlphaTrans validates the translations’ runtime behavior and functional correctness for 27.03% and 25.14% of the application method fragments. On average, integrated translation and validation takes 34 hours (min=3, max=121) to translate a project, showing its scalability in practice. For the syntactically or semantically incorrect translations, AlphaTrans generates a report including existing translation, stack trace, test errors, or assertion failures. We provided these artifacts to two developers to fix the translation bugs in four projects. They fixed the issues in 20.1 hours on average (5.5 hours for the smallest and 34 hours for the largest project) and achieved all passing tests. Without AlphaTrans, translating and validating such big projects could take weeks, if not months.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code 引用了 Unsupervised Translation of Programming Languages
  • Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code 引用了 Leveraging Automated Unit Tests for Unsupervised Code Translation
  • Program Skeletons for Automated Program Translation 引用了 Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • Program Skeletons for Automated Program Translation 引用了 Unsupervised Translation of Programming Languages
  • Program Skeletons for Automated Program Translation 引用了 Leveraging Automated Unit Tests for Unsupervised Code Translation
  • Exploring and Unleashing the Power of Large Language Models in Automated Code Translation 引用了 Unsupervised Translation of Programming Languages
  • Exploring and Unleashing the Power of Large Language Models in Automated Code Translation 引用了 Leveraging Automated Unit Tests for Unsupervised Code Translation
  • TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation 引用了 Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation 引用了 Exploring and Unleashing the Power of Large Language Models in Automated Code Translation
  • TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation 引用了 Leveraging Automated Unit Tests for Unsupervised Code Translation
  • MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair 引用了 Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair 引用了 Program Skeletons for Automated Program Translation
  • MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair 引用了 Exploring and Unleashing the Power of Large Language Models in Automated Code Translation
  • MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair 引用了 Unsupervised Translation of Programming Languages
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 Exploring and Unleashing the Power of Large Language Models in Automated Code Translation
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 Unsupervised Translation of Programming Languages
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 Leveraging Automated Unit Tests for Unsupervised Code Translation
  • Leveraging Automated Unit Tests for Unsupervised Code Translation 引用了 Unsupervised Translation of Programming Languages
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and RepairAli Reza Ibrahimzada, Brandon Paulsen, Reyhaneh Jabbarvand, Joey Dodds 等ICML 2026 · 9 次引用
  2. TRACE: Evaluating Execution Efficiency of LLM-Based Code TranslationZhihao Gong, Zeyu Sun, Dong Huang, Qingyuan Liang 等ACL 2026 · 5 次引用
  3. TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution AlignmentZhiqiang Yuan, Weitong Chen, Hanlin Wang, Xin Peng 等FSE 2026 · 4 次引用
  4. Program Skeletons for Automated Program TranslationBo Wang, Tianyu Li, Ruishi Li, Umang Mathur 等PLDI 2025 · 3 次引用
  5. EnCompass: Enhancing Agent Programming with Search Over Program Execution PathsZhening Li, Armando Solar-Lezama, Yisong Yue, Stephan ZhengNeurIPS 2025 · 2 次引用

它引用的 Paper10

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni 等NeurIPS 2020 · 19,162 次引用
  2. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  3. Leveraging Automated Unit Tests for Unsupervised Code TranslationBaptiste Rozière, Jie Zhang, François Charton, Mark Harman 等ICLR 2022 · 161 次引用
  4. Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeRangeet Pan, Ali Reza Ibrahimzada, Rahul Krishna, Divya Sankar 等ICSE 2024 · 96 次引用
  5. Exploring and Unleashing the Power of Large Language Models in Automated Code TranslationZhen Yang, Fang Liu, Zhongxing Yu, Jacky Wai Keung 等FSE 2024 · 72 次引用

相关 Paper

  1. INTERTRANS: Leveraging Transitive Intermediate Translations to Enhance LLM-Based Code TranslationMarcos Macedo, Yuan Tian, Pengyu Nie, Filipe Roseiro Côgo 等ICSE 2025 · 7 次引用
  2. Multilingual Code Co-evolution using Large Language ModelsJiyang Zhang, Pengyu Nie, Junyi Jessy Li, Milos GligoricFSE 2023 · 34 次引用
  3. Polyglot: An Extensible Framework to Benchmark Code Translation with LLMsMarco Vieira, Priyam Ashish Shah, Bhavain Shah, Rrezarta KrasniqiASE 2025
  4. AVATAR: A Parallel Corpus for Java-Python Program TranslationWasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, Kai-Wei ChangACL Findings 2023 · 46 次引用
  5. CodeTransOcean: A Comprehensive Multilingual Benchmark for Code TranslationWeixiang Yan, Yuchen Tian, Yunzhe Li, Qian Chen 等EMNLP Findings 2023 · 32 次引用
黄昏的海面,两侧是细线勾勒的悬崖