形式规则与LLM协同:宏翻译的标签团队方法
原标题:Translation Tag Team: Formal Rules and LLMs Translate More Macros Together than Apart
AI 摘要
arXiv 上发布了一篇关于将 C 语言宏翻译为 Rust 的研究论文。研究者提出了首个形式化宏翻译器 MerC,并构建了基准测试 MacroBench。实验发现,LLM 能翻译更多宏但存在错误,而 MerC 与 LLM 结合使用的“标签团队”方法,平均失败率比单独使用 LLM 低 32%,且比 MerC 多翻译 51% 的测试用例。
正文节选
Computer Science > Software Engineering Title:Translation Tag Team: Formal Rules and LLMs Translate More Macros Together than Apart View PDF HTML (experimental) Abstract:Modern critical software infrastructure is largely written in C. Since C lacks memory safety, researchers are investigating automatic translation of C to safer languages like Rust. But real-world C software consists of more than just C code, often using named code fragments called macros which are not part of the C l