paper-with-me

Papers

Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis

2024-12-18 · Manish Shetty, Naman jain, Adwait Godbole, Sanjit A. Seshia, Koushik Sen

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.

📄 PDF Abstract BibTeX arXiv:2412.14234

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationCode TranslationTranslation

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically
Library 설명 없음

Similar Papers 제목 키워드 기반

Syzygy of Thoughts: Improving LLM CoT with the Minimal Free Resolution

2025-04-13 · Chenghao Li, Chaoning Zhang, Yi Lu, Jiaquan Zhang 외

Chain-of-Thought (CoT) prompting enhances the reasoning of large language models (LLMs) by decomposing problems into sequential steps, mimicking human logic and reducing errors. However, complex tasks with vast solution …

GSM8KMath

PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust

2025-05-07 · YiFei Gao, Chengpeng Wang, Pengxiang Huang, Xuwei Liu 외

There has been a growing interest in translating C code to Rust due to Rust's robust memory and thread safety guarantees. Tools such as C2RUST enable syntax-guided transpilation from C to semantically equivalent Rust cod…

C++ code

CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation

2025-04-21 · Anirudh Khatry, Robert Zhang, Jia Pan, Ziteng Wang 외

C-to-Rust transpilation is essential for modernizing legacy C code while enhancing safety and interoperability with modern Rust ecosystems. However, no dataset currently exists for evaluating whether a system can transpi…

Code Translation

Gated Uncertainty-Aware Runtime Dual Invariants for Neural Signal-Controlled Robotics

2025-11-25 · Tasha Kim, Oiwi Parker Jones arxiv

Safety-critical assistive systems that directly decode user intent from neural signals require rigorous guarantees of reliability and trust. We present GUARDIAN (Gated Uncertainty-Aware Runtime Dual Invariants), a framew…

How do programmers use unsafe Rust?

2020-11-13 · OOPSLA 2020 11 · Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 외

Rust’s ownership type system enforces a strict discipline on how memory locations are accessed and shared. This discipline allows the compiler to statically prevent memory errors, data races, inadvertent side effects thr…