Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis
Not on the map. Why?
Abstract (arXiv)
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 testing. We apply our approach to successfully translate Zopfli, a high-performance compression library with ~3000 lines of code and 98 functions. We validate the translation by testing equivalence with the source C program on a set of inputs. To our knowledge, this is the largest automated and test-validated C to safe Rust code translation achieved so far.
Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Builds on 30 of its 69 references that are in the map. First posted on arXiv 18 Dec 2024.
Builds on
30 of 69 references.
References · 30
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 991
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 421
- 2020Unsupervised Translation of Programming Languagescited by 263
18 more
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 239
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 197
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 178
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2022Coder Reviewer Reranking for Code Generationcited by 84
- 2024Learning How Hard to Think: Input-Adaptive Allocation of LM Computationcited by 70
- 2022Parsel: Algorithmic Reasoning with Language Models by Composing Decompositionscited by 64
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
- 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 34
- 2023LLM-Assisted Code Cleaning For Training Accurate Code Generatorscited by 27
- 2023On the Evaluation of Neural Code Translation: Taxonomy and Benchmarkcited by 23
- 2024VERT: Verified Equivalent Rust Transpilation with Large Language Models as Few-Shot Learnerscited by 20
- 2024Rectifier: Code Translation with Corrector via LLMscited by 20
- 2024Scaling LLM Inference with Optimized Sample Compute Allocationcited by 16
- 2023Ownership guided C to Rust translationcited by 13
- 2023Explain-then-Translate: An Analysis on Improving Program Translation with Self-generated Explanationscited by 12
Built on by
Citing papers per year: 2025: 10; 2026: 6.
16 papers.
Sort:
By area:
- 2025Type-Constrained Code Generation with Language Modelscited by 35
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2026Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agentscited by 8
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphscited by 3
- 2025EnCompass: Enhancing Agent Programming with Search Over Program Execution Pathscited by 3
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translationcited by 2
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
4 more
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilationcited by 1
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translationcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translation14 Sep 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation13 Apr 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation6 Apr 2026
- 2026Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agents26 Feb 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths3 Dec 2025
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphs13 Oct 2025
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translation4 Oct 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
4 more
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation21 Apr 2025
- 2025Type-Constrained Code Generation with Language Models12 Apr 2025
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification16 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2026Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agentscited by 8
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 2025EnCompass: Enhancing Agent Programming with Search Over Program Execution Pathscited by 3
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilationcited by 1
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translationcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translation14 Sep 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation13 Apr 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agents26 Feb 2026
- 2025EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths3 Dec 2025
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translation4 Oct 2025
- 2025Type-Constrained Code Generation with Language Modelscited by 35
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphscited by 3
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translationcited by 2
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation6 Apr 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphs13 Oct 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation21 Apr 2025
- 2025Type-Constrained Code Generation with Language Models12 Apr 2025
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification16 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025