Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis
Manish Shetty, Naman Jain, Adwait Godbole, Sanjit A. Seshia, Koushik, Sen

TL;DR
Syzygy is an automated method that combines large language models and dynamic analysis to translate complex C code into safe Rust, ensuring correctness and safety in a scalable way.
Contribution
This paper introduces a novel synergistic approach that integrates LLM-driven code translation with dynamic analysis for safe C to Rust conversion.
Findings
Successfully translated Zopfli library (~3000 lines, 98 functions)
Achieved largest automated, test-validated C to Rust translation to date
Validated translation correctness through equivalence testing
Abstract
Despite extensive usage in high-performance, low-level systems programming applications, C is susceptible to vulnerabilities due to manual memory management and unsafe pointer operations. Rust, a modern systems programming language, offers a compelling alternative. Its unique ownership model and type system ensure memory safety without sacrificing performance. In this paper, we present Syzygy, an automated approach to translate C to safe Rust. Our technique uses a synergistic combination of LLM-driven code and test translation guided by dynamic-analysis-generated execution information. This paired translation runs incrementally in a loop over the program in dependency order of the code elements while maintaining per-step correctness. Our approach exposes novel insights on combining the strengths of LLMs and dynamic analysis in the context of scaling and combining code generation with…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsPlant Pathogens and Fungal Diseases · Yeasts and Rust Fungi Studies · Plant Disease Resistance and Genetics
MethodsSparse Evolutionary Training · Lib
