Lune

PLDI2025顶会

Program Skeletons for Automated Program Translation

Bo Wang, Tianyu Li, Ruishi Li, Umang Mathur, Prateek Saxena

摘要

Translating software between programming languages is a challenging task, for which automated techniques have been elusive and hard to scale up to larger programs. A key difficulty in cross-language translation is that one has to re-express the intended behavior of the source program into idiomatic constructs of a different target language. This task needs abstracting away from the source language-specific details, while keeping the overall functionality the same. In this work, we propose a novel and systematic approach for making such translation amenable to automation based on a framework we call program skeletons. A program skeleton retains the high- level structure of the source program by abstracting away and effectively summarizing lower-level concrete code fragments, which can be mechanically translated to the target programming language. A skeleton, by design, permits many different ways of filling in the concrete implementation for fragments, which can work in conjunction with existing data-driven code synthesizers. Most importantly, skeletons can conceptually enable sound decomposition, i.e., if each individual fragment is correctly translated, taken together with the mechanically translated skeleton, the final translated program is deemed to be correct as a whole. We present a prototype system called Skel embodying the idea of skeleton-based translation from Python to JavaScript. Our results show promising scalability compared to prior works. For 9 real-world Python programs, some with more than about 1 k lines of code, 95% of their code fragments can be automatically translated, while about 5% require manual effort. All the final translations are correct with respect to whole-program test suites.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
  • 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
  • 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 引用了 Unsupervised Translation of Programming Languages
  • Leveraging Automated Unit Tests for Unsupervised Code Translation 引用了 Unsupervised Translation of Programming Languages
  • QiMeng-LibBench: Benchmarking LLM Agents for Library-Scale Cross-Architecture Migration 引用了 Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and RepairAli Reza Ibrahimzada, Brandon Paulsen, Reyhaneh Jabbarvand, Joey Dodds 等ICML 2026 · 9 次引用
  2. SysMoBench: Evaluating AI on Formally Specifying Complex Real-World SystemsQian Cheng, Ruize Tang, Emilie Ma, Finn Hackett 等ICLR 2026 · 1 次引用
  3. QiMeng-LibBench: Benchmarking LLM Agents for Library-Scale Cross-Architecture MigrationWeijia Li, KE GAO, Jiajie Li, Han Sun 等ICML 2026
  4. Spatial and Temporal Decomposition for Faster Translation ValidationBenjamin Mikek, Chathur Bommineni, Qirun Zhang, Thomas RepsOOPSLA 2026

它引用的 Paper13

  1. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  2. CodeGen: An Open Large Language Model for Code with Multi-Turn Program SynthesisErik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 等ICLR 2023 · 234 次引用
  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. C2S: translating natural language comments to formal program specificationsJuan Zhai, Yu Shi, Minxue Pan, Guian Zhou 等FSE 2020 · 44 次引用

相关 Paper

  1. Syntax and Domain Aware Model for Unsupervised Program TranslationFang Liu, Jia Li, Li ZhangICSE 2023 · 25 次引用
  2. TransMap: Pinpointing Mistakes in Neural Code TranslationBo Wang, Ruishi Li, Mingkai Li, Prateek SaxenaFSE 2023 · 4 次引用
  3. User-Customizable Transpilation of Scripting LanguagesBo Wang, Aashish Kolluri, Ivica Nikolic, Teodora Baluta 等OOPSLA 2023 · 13 次引用
  4. Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality EvaluationXing Zhang, Jiaheng Wen, Fangkai Yang, Yu Kang 等EMNLP Findings 2025 · 2 次引用
  5. AVATAR: A Parallel Corpus for Java-Python Program TranslationWasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, Kai-Wei ChangACL Findings 2023 · 46 次引用
黄昏的海面,两侧是细线勾勒的悬崖