AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation
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 \emph{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> classes, methods, and tests. AlphaTrans translated the entire repository of these projects consisting of 6899 source code fragments. 99.1% of the translated code fragments are syntactically correct, and AlphaTrans validates the translations’ runtime behavior and functional correctness for 25.8%. On average, the integrated translation and validation take 36 hours (min=4, max=122) 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 were able to fix the issues in 20.1 hours on average (5.5 hours for the smallest and 34 hours for the largest project) and achieve all passing tests. Without AlphaTrans, translating and validating such big projects could take weeks, if not months.
Mon 23 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
16:00 - 18:00 | SE and AI 1Research Papers / Journal First / Ideas, Visions and Reflections / Demonstrations at Cosmos Hall Chair(s): Yuchao Jiang UNSW | ||
16:00 10mTalk | Learning to Edit Interactive Machine Learning Notebooks Ideas, Visions and Reflections Bihui Jin University of Waterloo, Jiayue Wang University of Waterloo, Pengyu Nie University of Waterloo | ||
16:10 20mTalk | Automatically Detecting Numerical Instability in Machine Learning Applications via Soft Assertions Research Papers Shaila Sharmin Iowa State University, Anwar Hossain Zahid Iowa State University, Subhankar Bhattacharjee Iowa State University, Chiamaka Igwilo Iowa State University, Miryung Kim UCLA and Amazon Web Services, Wei Le Iowa State University DOI | ||
16:30 20mTalk | Mitigating Regression Faults Induced by Feature Evolution in Deep Learning Systems Journal First Hanmo You Tianjin University, Zan Wang Tianjin University, Xuyang Chen College of Intelligence and Computing, Tianjin University, Junjie Chen Tianjin University, Jun Sun Singapore Management University, Shuang Liu Renmin University of China, Zishuo Dong College of Intelligence and Computing, Tianjin University | ||
16:50 10mTalk | ClusterXplain: a Clustering-based Tool for DNN components Debugging Demonstrations | ||
17:00 10mTalk | Capturing Semantic Flow of ML-based Systems Ideas, Visions and Reflections Shin Yoo KAIST, Robert Feldt Chalmers | University of Gothenburg, Somin Kim Korea Advanced Institute of Science and Technology, Naryeong Kim Korea Advanced Institute of Science and Technology | ||
17:10 20mTalk | Has My Code Been Stolen for Model Training? A Naturalness Based Approach to Code Contamination Detection Research Papers Haris Ali Khan Beijing Institute of Technology, Yanjie Jiang Peking University, Qasim Umer Information and Computer Science Department, King Fahd University of Petroleum & Minerals (KFUPM), Dhahran 31261, Saudi Arabia, Yuxia Zhang Beijing Institute of Technology, Waseem Akram Beijing Institute of Technology, Hui Liu Beijing Institute of Technology DOI | ||
17:30 20mTalk | AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation Research Papers Ali Reza Ibrahimzada University of Illinois Urbana-Champaign, Kaiyao Ke University of Illinois Urbana-Champaign, Mrigank Pawagi Indian Institute of Science, Bengaluru, Muhammad Salman Abid Cornell University, Rangeet Pan IBM Research, Saurabh Sinha IBM Research, Reyhaneh Jabbarvand University of Illinois at Urbana-Champaign DOI Pre-print Media Attached | ||
17:50 10mTalk | Can Hessian-Based Insights Support Fault Diagnosis in Attention-based Models? Ideas, Visions and Reflections |
This is the main event hall of Clarion Hotel, which will be used to host keynote talks and other plenary sessions. The FSE and ISSTA banquets will also happen in this room.
The room is just in front of the registration desk, on the other side of the main conference area. The large doors with numbers “1” and “2” provide access to the Cosmos Hall.