Code Translation

Domain: Code Generation

🎯 Motivation

Converting code from one programming language to another. The model understands the logic and rewrites it in a different language.

πŸ“‹ Concrete Example

Python: β€˜def greet(name): return f”Hello, {name}”’ -> JavaScript: β€˜function greet(name) { return Hello, ${name}; }’. Same logic, different language.

πŸ”— Analogy

A translator converting a book from Chinese to English - the story stays the same, but the language changes. Code translation does this with programming languages.