Specification-Driven Code Translation Powered by Large Language Models: How Far Are We?
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) are increasingly being applied across various domains, including code-related tasks such as code translation. Previous studies have explored using LLMs for translating code between different programming languages. Since LLMs are more effective with natural language, using natural language as an intermediate representation in code translation tasks is an intuitively appealing approach. However, whether this benefit is general or highly context-dependent remains unclear. In this work, we investigate using NL-specification as an intermediate representation for code translation. We evaluate our method using three datasets, five popular programming languages, and 29 language pair permutations. Our results show that using NL-specification alone does not lead to performance improvements. However, when combined with source code, it provides gains in certain language pairs (notably with Python and C++ as source languages), while offering no consistent improvement overall. Besides analyzing the performance of code translation, we also investigate the quality of the translated code and provide insights into the issues present in the translated code.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). First posted on arXiv 5 Dec 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025BabelCoder: Agentic Code Translation with Specification Alignmentcited by 1
- 2026Social Bias in LLM-Generated Code: Benchmark and Mitigationcited by 1
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insightscited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026Social Bias in LLM-Generated Code: Benchmark and Mitigation1 May 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025BabelCoder: Agentic Code Translation with Specification Alignment7 Dec 2025
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights21 Jul 2025