Lune

OOPSLA2023顶会

Aliasing Limits on Translating C to Safe Rust

Mehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder, Kyle Dewey, Ben Hardekopf

摘要

The Rust language was created to provide safe low-level systems programming. There is both industrial and academic interest in the problem of (semi-)automatically translating C code to Rust in order to exploit Rust's safety guarantees. We study the effectiveness and limitations of existing techniques for automatically translating unsafe raw pointers (in Rust programs translated from C) into safe Rust references via ownership and lifetime inference. Our novel evaluation methodology enables our study to extend beyond prior studies, and to discover new information contradicting the conclusions of prior studies. We find that existing translation methods are severely limited by a lack of precision in the Rust compiler's safety checker, causing many safe pointer manipulations to be labeled as potentially unsafe. Leveraging this information, we propose methods for improving translation, based on encoding the results of a more precise analysis in a manner that is understandable to an unmodified Rust compiler. We implement one of our proposed methods, increasing the number of pointers that can be translated to safe Rust references by 75% over the baseline (from 12% to 21% of all pointers).

问 Lune

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

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

已有 12 篇顶会 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
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust 引用了 Scylla: Translating an Applicative Subset of C to Safe Rust
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust 引用了 RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust 引用了 Translating C to safer Rust
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust 引用了 To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust 引用了 SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence
  • 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
  • To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions 引用了 Translating C to safer Rust
  • SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence 引用了 Translating C to safer Rust
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust CodeYubo Bai, Tapti PalitASE 2025 · 8 次引用
  2. Scylla: Translating an Applicative Subset of C to Safe RustAymeric Fromherz, Jonathan ProtzenkoOOPSLA 2026 · 6 次引用
  3. To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged UnionsJaemin Hong, Sukyoung RyuASE 2024 · 6 次引用
  4. SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and EquivalenceMomoko Shiraishi, Yinzhi Cao, Takahiro ShinagawaICSE 2026 · 4 次引用
  5. Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to RustHaoran Peng, Baris Kasikci, Gilbert Louis Bernstein, Michael D. ErnstPLDI 2026 · 1 次引用

它引用的 Paper2

  1. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 次引用
  2. C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline 等OOPSLA 2022 · 20 次引用

相关 Paper

  1. Ownership Guided C to Rust TranslationHanliang Zhang, Cristina David, Yijun Yu, Meng WangCAV 2023 · 37 次引用
  2. Translating C To Rust: Lessons from a User StudyRuishi Li, Bo Wang, Tianyu Li, Prateek Saxena 等NDSS 2025
  3. &inator: Correct, Precise C-to-Rust Interface TranslationVictor Chen, Ayden Coughlin, Michael D. BondPLDI 2026 · 1 次引用
  4. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
  5. Raw Pointer Rewriting with LLMs for Translating C to Safer RustYifei Gao, Chengpeng Wang, Pengxiang Huang, Xuwei Liu 等ACL Findings 2026 · 3 次引用
黄昏的海面,两侧是细线勾勒的悬崖