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 25% of code size (average 9%), to nothing at all.
Wed 21 JunDisplayed time zone: Eastern Time (US & Canada) change
13:40 - 15:40 | |||
13:40 20mTalk | Extensible Metatheory Mechanization via Family PolymorphismDistinguished Paper PLDI Research Papers DOI | ||
14:00 20mTalk | Defunctionalization with Dependent Types PLDI Research Papers DOI Pre-print | ||
14:20 20mTalk | Garbage-Collection Safety for Region-Based Type-Polymorphic Programs PLDI Research Papers Martin Elsman University of Copenhagen, Denmark DOI | ||
14:40 20mTalk | Flux: Liquid Types for Rust PLDI Research Papers Nico Lehmann University of California, San Diego, Adam Geller Computer Science, University of British Columbia, Niki Vazou IMDEA Software Institute, Ranjit Jhala University of California at San Diego DOI | ||
15:00 20mTalk | Leveraging Rust Types for Program Synthesis PLDI Research Papers Jonas Fiala ETH Zürich, Shachar Itzhaky Technion, Peter Müller ETH Zurich, Nadia Polikarpova University of California at San Diego, Ilya Sergey National University of Singapore DOI Pre-print | ||
15:20 20mTalk | Parameterized Algebraic Protocols PLDI Research Papers Andreia Mordido LASIGE, University of Lisbon, Janek Spaderna University of Freiburg, Germany, Peter Thiemann University of Freiburg, Germany, Vasco T. Vasconcelos LASIGE, University of Lisbon DOI |