Lune

PLDI2023顶会

Leveraging Rust Types for Program Synthesis

Jonás Fiala, Shachar Itzhaky, Peter Müller, Nadia Polikarpova, Ilya Sergey

摘要

The Rust type system guarantees memory safety and data-race freedom. However, to satisfy Rust's type rules, many familiar implementation patterns must be adapted substantially. These necessary adaptations complicate programming and might hinder language adoption. In this paper, we demonstrate that, in contrast to manual programming, automatic synthesis is not complicated by Rust's type system, but rather benefits in two major ways. First, a Rust synthesizer can get away with significantly simpler specifications. While in more traditional imperative languages, synthesizers often require lengthy annotations in a complex logic to describe the shape of data structures, aliasing, and potential side effects, in Rust, all this information can be inferred from the types, letting the user focus on specifying functional properties using a slight extension of Rust expressions. Second, the Rust type system reduces the search space for synthesis, which improves performance.

In this work, we present the first approach to automatically synthesizing correct-by-construction programs in safe Rust. The key ingredient of our synthesis procedure is Synthetic Ownership Logic, a new program logic for deriving programs that are guaranteed to satisfy both a user-provided functional specification and, importantly, Rust's intricate type system. We implement this logic in a new tool called RusSOL. Our evaluation shows the effectiveness of RusSOL, both in terms of annotation burden and performance, in synthesizing provably correct solutions to common problems faced by new Rust developers.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Flux: Liquid Types for Rust 引用了 Stacked borrows: an aliasing model for Rust
  • Nola: Later-Free Ghost State for Verifying Termination in Iris 引用了 Verus: Verifying Rust Programs using Linear Ghost Types
  • Nola: Later-Free Ghost State for Verifying Termination in Iris 引用了 RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code
  • Nola: Later-Free Ghost State for Verifying Termination in Iris 引用了 Stacked borrows: an aliasing model for Rust
  • Verus: Verifying Rust Programs using Linear Ghost Types 引用了 RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code
  • Verus: Verifying Rust Programs using Linear Ghost Types 引用了 Stacked borrows: an aliasing model for Rust
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 Flux: Liquid Types for Rust
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 Verus: Verifying Rust Programs using Linear Ghost Types
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 Stacked borrows: an aliasing model for Rust
  • Crabtree: Rust API Test Synthesis Guided by Coverage and Type 引用了 SyRust: automatic testing of Rust libraries with semantic-aware program synthesis
  • RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support 引用了 RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code
  • RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support 引用了 Stacked borrows: an aliasing model for Rust
  • RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support 引用了 SyRust: automatic testing of Rust libraries with semantic-aware program synthesis
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Type-Constrained Code Generation with Language ModelsNiels Mündler, Jingxuan He, Hao Wang, Koushik Sen 等PLDI 2025 · 10 次引用
  2. RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic SupportZhiwu Xu, Bohao Wu, Cheng Wen, Bin Zhang 等ICSE 2024 · 9 次引用
  3. Crabtree: Rust API Test Synthesis Guided by Coverage and TypeYoshiki Takashima, Chanhee Cho, Ruben Martins, Limin Jia 等OOPSLA 2024 · 3 次引用
  4. Nola: Later-Free Ghost State for Verifying Termination in IrisYusuke Matsushita, Takeshi TsukadaPLDI 2025 · 2 次引用
  5. The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati 等PLDI 2026 · 1 次引用

它引用的 Paper7

  1. Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun 等OOPSLA 2023 · 86 次引用
  2. Stacked borrows: an aliasing model for RustRalf Jung, Hoang-Hai Dang, Jeehoon Kang, Derek DreyerPOPL 2020 · 67 次引用
  3. RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe codeYusuke Matsushita, Xavier Denis, Jacques-Henri Jourdan, Derek DreyerPLDI 2022 · 44 次引用
  4. SyRust: automatic testing of Rust libraries with semantic-aware program synthesisYoshiki Takashima, Ruben Martins, Limin Jia, Corina S. PasareanuPLDI 2021 · 32 次引用
  5. Flux: Liquid Types for RustNico Lehmann, Adam T. Geller, Niki Vazou, Ranjit JhalaPLDI 2023 · 29 次引用

相关 Paper

  1. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder 等OOPSLA 2023 · 32 次引用
  2. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
  3. RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsLennard Gäher, Michael Sammler, Ralf Jung, Robbert Krebbers 等PLDI 2024 · 29 次引用
  4. Rust yDL: A Program Logic for RustDaniel Drodt, Reiner HähnleFM 2026
  5. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 次引用
黄昏的海面,两侧是细线勾勒的悬崖