A Hybrid Approach to Semi-automated Rust Verification
Sacha-Élie Ayoun, Xavier Denis, Petar Maksimović, Philippa Gardner
TL;DR
This work presents a hybrid verification pipeline for Rust that splits the verification of safe and unsafe code between Creusot and a novel Gillian-Rust tool, respectively. By embedding a shared specification language and RustBelt/RustHornBelt-inspired abstractions, the approach achieves end-to-end verification of real-world Rust, including unsafe components, with substantial automation and speedups over prior work. The paper details a layout-aware symbolic heap, automated reasoning for lifetimes and borrows, and prophetic reasoning to enable functional correctness, demonstrated on standard library types via a Merge Sort case study and multiple benchmarks. The results suggest that hybrid verification can scale to real unsafe Rust code while reusing safe-code proofs, with practical impact for Rust systems software and library verification. Limitations remain (e.g., closures, multiple lifetimes, concurrency), but the framework provides a concrete path toward broader, automated end-to-end Rust verification.
Abstract
We propose a hybrid approach to end-to-end Rust verification where the proof effort is split into powerful automated verification of safe Rust and targeted semi-automated verification of unsafe Rust. To this end, we present Gillian-Rust, a proof-of-concept semi-automated verification tool built on top of the Gillian platform that can reason about type safety and functional correctness of unsafe code. Gillian-Rust automates a rich separation logic for real-world Rust, embedding the lifetime logic of RustBelt and the parametric prophecies of RustHornBelt, and is able to verify real-world Rust standard library code with only minor annotations and with verification times orders of magnitude faster than those of comparable tools. We link Gillian-Rust with Creusot, a state-of-the-art verifier for safe Rust, by providing a systematic encoding of unsafe code specifications that Creusot can use but cannot verify, demonstrating the feasibility of our hybrid approach.
