Translation Tag Team: Formal Rules and LLMs Translate More Macros Together than Apart
- Source
- arxiv.org
- Author
- Brent Pappas, Joseph Zalusky, Zachary Burkett, Paul Gazzillo
- Date

Context
MerC tackles a structural problem in translating C software: macros are named code fragments, and expanding them before translation loses those reusable definitions. Its formally specified translation rules preserve macro usage for the cases they support. On MacroBench, a drawn from real-world macros, the authors report that MerC handles half the test cases correctly. Research abstract
Language models cover more cases but introduce incorrect translations. Running MerC first, then using a model for the remaining cases, produced a reported average failure rate 32% lower than using models alone. The useful division of labor is to give the rule-based translator the cases it can handle and reserve model generation for the remainder. Hybrid evaluation
- benchmark — A standard public test set for comparing AI models — the shared scoreboards behind every "model X beats model Y" claim.
- eval — A repeatable test for AI quality — a set of tasks plus scoring — used the way software teams use test suites, because model output is too variable to judge by eyeballing.
articleCodeTransBenchmark: Evaluating LLM-based Code Translation and Repair Across Programming LanguagesVera Kowalczuk, Oliver Wei{\ss}l, Severin Kacianka, Andrea Stocco
articleAn Extensive Empirical Study on Code Translation TechniqueRuihang Fan, Jiajun Jiang, Xinpeng Wang, Jiateng Fu, Fengjie Li, Jiasi Shen
articleFrom C to Idiomatic Rust: A Ship-of-Theseus Agentic TranslationVasily A. Sartakov
Checking sign-in…
Loading comments…