Flux: Liquid Types for Rust
Nico Lehmann, Adam T. Geller, Niki Vazou, Ranjit Jhala
摘要
We introduce Flux, which shows how logical refinements can work hand in glove with Rust's ownership mechanisms to yield ergonomic type-based verification of low-level pointer manipulating programs. First, we design a novel refined type system for Rust that indexes mutable locations, with pure (immutable) values that can appear in refinements, and then exploits Rust's ownership mechanisms to abstract sub-structural reasoning about locations within Rust's polymorphic type constructors, while supporting strong updates. We formalize the crucial dependency upon Rust's strong aliasing guarantees by exploiting the stacked borrows aliasing model to prove that "well-borrowed evaluations of well-typed programs do not get stuck". Second, we implement our type system in Flux, a plug-in to the Rust compiler that exploits the factoring of complex invariants into types and refinements to efficiently synthesize loop annotations-including complex quantified invariants describing the contents of containers-via liquid inference. Third, we evaluate Flux with a benchmark suite of vector manipulating programs and parts of a previously verified secure sandboxing library to demonstrate the advantages of refinement types over program logics as implemented in the state-of-the-art Prusti verifier. While Prusti's more expressive program logic can, in general, verify deep functional correctness specifications, for the lightweight but ubiquitous and important verification use-cases covered by our benchmarks, liquid typing makes verification ergonomic by slashing specification lines by a factor of two, verification time by an order of magnitude, and annotation overhead from up to 24% of code size (average 9%), to nothing at all. flux (/fl2ks/) n. 1 a flowing or flow. 2 a substance used to refine metals. v. 3 to melt; make fluid.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper21
- RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsLennard Gäher, Michael Sammler, Ralf Jung, Robbert Krebbers 等PLDI 2024 · 被引用 29 次
- Leveraging Rust Types for Program SynthesisJonás Fiala, Shachar Itzhaky, Peter Müller, Nadia Polikarpova 等PLDI 2023 · 被引用 17 次
- Laurel: Unblocking Automated Verification with Large Language ModelsEric Mugnier, Emmanuel Anaya Gonzalez, Nadia Polikarpova, Ranjit Jhala 等OOPSLA 2025 · 被引用 12 次
- A Hybrid Approach to Semi-automated Rust VerificationSacha-Élie Ayoun, Xavier Denis, Petar Maksimovic, Philippa GardnerPLDI 2025 · 被引用 9 次
- Miri: Practical Undefined Behavior Detection for RustRalf Jung, Benjamin Kimock, Christian Poveda, Eduardo Sánchez Muñoz 等POPL 2026 · 被引用 8 次
它引用的顶会 Paper3
- RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian 等PLDI 2021 · 被引用 83 次
- Stacked borrows: an aliasing model for RustRalf Jung, Hoang-Hai Dang, Jeehoon Kang, Derek DreyerPOPL 2020 · 被引用 67 次
- WaVe: a verifiably secure WebAssembly sandboxing runtimeEvan Johnson, Evan Laufer, Zijie Zhao, Dan Gohman 等S&P 2023
相关 Paper
- Thrust: A Prophecy-Based Refinement Type System for RustHiromi Ogawa, Taro Sekiyama, Hiroshi UnnoPLDI 2025
- Place Capability Graphs: A General-Purpose Model of Rust's Ownership and Borrowing GuaranteesZachary Grannan, Aurel Bílý, Jonás Fiala, Jasper Geer 等OOPSLA 2025 · 被引用 1 次
- Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun 等OOPSLA 2023 · 被引用 86 次
- Modular specification and verification of closures in RustFabian Wolff, Aurel Bílý, Christoph Matheja, Peter Müller 等OOPSLA 2021 · 被引用 23 次
- Bringing Foundational Verification to Real-World Rust CodeLennard Gäher, Vincent Lafeychine, Sascha Kehrli, Avraham Shinnar 等OOPSLA 2026
