Polyglot: An Extensible Framework to Benchmark Code Translation with LLMs
Marco Vieira, Priyam Ashish Shah, Bhavain Shah, Rrezarta Krasniqi
摘要
Large Language Models (LLMs) show great potential for automating code-related tasks. However, sound assessments are necessary to understand their true capabilities, particularly in code translation, where reliability is crucial. We introduce Polyglot, an automated, multi-language framework for evaluating the translation quality of LLMs between different programming languages. Leveraging the IBM CodeNet Project, an extensive collection of coding problems in multiple languages, we assess translation quality using syntactic correctness, execution reliability, semantic preservation, and static code metrics. Our evaluation focuses on translating C to Java, Python, and Rust, languages that follow distinct paradigms and represent alternatives to modernize C-based systems. We evaluate open-source LLMs using three prompting strategies to understand the impact on translation performance. Our findings highlight that while LLMs show promising results for simple code translation, their limitations regarding complex logic and distinct language paradigms require further analysis.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
相关 Paper
- 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 次
- Multilingual Code Co-evolution using Large Language ModelsJiyang Zhang, Pengyu Nie, Junyi Jessy Li, Milos GligoricFSE 2023 · 被引用 34 次
- INTERTRANS: Leveraging Transitive Intermediate Translations to Enhance LLM-Based Code TranslationMarcos Macedo, Yuan Tian, Pengyu Nie, Filipe Roseiro Côgo 等ICSE 2025 · 被引用 7 次
- RustRepoTrans: Repository-level Context Code Translation Benchmark Targeting RustGuangsheng Ou, Mingwei Liu, Yuxuan Chen, Yanlin Wang 等ASE 2025 · 被引用 1 次
- ClassEval-T: Evaluating Large Language Models in Class-Level Code TranslationPengyu Xue, Linhao Wu, Zhen Yang, Chengyi Wang 等ISSTA 2025 · 被引用 5 次
