Lune

CAV2023顶会

Ownership Guided C to Rust Translation

Hanliang Zhang, Cristina David, Yijun Yu, Meng Wang

摘要

Abstract Dubbed a safer C, Rust is a modern programming language that combines memory safety and low-level control. This interesting combination has made Rust very popular among developers and there is a growing trend of migrating legacy codebases (very often in C) to Rust. In this paper, we present a C to Rust translation approach centred around static ownership analysis. We design a suite of analyses that infer ownership models of C pointers and automatically translate the pointers into safe Rust equivalents. The resulting tool, Crown, scales to real-world codebases (half a million lines of code in less than 10 s) and achieves a high conversion rate.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 15 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Scylla: Translating an Applicative Subset of C to Safe Rust 引用了 Translating C to safer Rust
  • Scylla: Translating an Applicative Subset of C to Safe Rust 引用了 To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions
  • Scalable, Validated Code Translation of Entire Projects using Large Language Models 引用了 Translating C to safer Rust
  • RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code 引用了 Scalable, Validated Code Translation of Entire Projects using Large Language Models
  • RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code 引用了 Translating C to safer Rust
  • C to checked C by 3c 引用了 Translating C to safer Rust
  • SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification 引用了 Translating C to safer Rust
  • To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions 引用了 Translating C to safer Rust
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper15

  1. Scalable, Validated Code Translation of Entire Projects using Large Language ModelsHanliang Zhang, Cristina David, Meng Wang, Brandon Paulsen 等PLDI 2025 · 15 次引用
  2. RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust CodeYubo Bai, Tapti PalitASE 2025 · 8 次引用
  3. SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based VerificationTianyang Zhou, Ziyi Zhang, Haowen Lin, Somesh Jha 等ACL 2026 · 8 次引用
  4. Scylla: Translating an Applicative Subset of C to Safe RustAymeric Fromherz, Jonathan ProtzenkoOOPSLA 2026 · 6 次引用
  5. To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged UnionsJaemin Hong, Sukyoung RyuASE 2024 · 6 次引用

它引用的 Paper4

  1. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 次引用
  2. RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe codeYusuke Matsushita, Xavier Denis, Jacques-Henri Jourdan, Derek DreyerPLDI 2022 · 44 次引用
  3. Modular specification and verification of closures in RustFabian Wolff, Aurel Bílý, Christoph Matheja, Peter Müller 等OOPSLA 2021 · 23 次引用
  4. C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline 等OOPSLA 2022 · 20 次引用

相关 Paper

  1. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder 等OOPSLA 2023 · 32 次引用
  2. Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira 等PLDI 2026 · 1 次引用
  3. Translating C To Rust: Lessons from a User StudyRuishi Li, Bo Wang, Tianyu Li, Prateek Saxena 等NDSS 2025
  4. Concrat: An Automatic C-to-Rust Lock API Translator for Concurrent ProgramsJaemin Hong, Sukyoung RyuICSE 2023 · 17 次引用
  5. GenC2Rust: Towards Generating Generic Rust Code from CXiafa Wu, Brian DemskyICSE 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖