Proceedings of the ACM on Programming Languages · 2019 · 133 citations · 32 references
ComputingComputer EngineeringComputer ScienceFormal MethodsProgramming LanguagesSystems ProgrammingAssertion-based VerificationDeductive VerificationSpecification LanguagesType CheckingType SystemsVerificationCorrectness ProofsFormal SpecificationsFormal VerificationFunctional CorrectnessModular VerificationProgram VerificationSeparation LogicStatic Verification
Rust's type system ensures memory safety: well-typed Rust programs are guaranteed to not exhibit problems such as dangling pointers, data races, and unexpected side effects through aliased references. Ensuring correctness properties beyond memory safety, for instance, the guaranteed absence of assertion failures or more-general functional correctness, requires static program verification. For traditional system programming languages, formal verification is notoriously difficult and requires complex specifications and logics to reason about pointers, aliasing, and side effects on mutable state. This complexity is a major obstacle to the more-widespread verification of system software. In this paper, we present a novel verification technique that leverages Rust's type system to greatly simplify the specification and verification of system software written in Rust. We analyse information from the Rust compiler and synthesise a corresponding core proof for the program in a flavour of separation logic tailored to automation. To verify correctness properties beyond memory safety, users can annotate Rust programs with specifications at the abstraction level of Rust expressions; our technique weaves them into the core proof to verify modularly whether these specifications hold. Crucially, our proofs are constructed and checked automatically without exposing the underlying formal logic, allowing users to work exclusively at the level of abstraction of the programming language. As such, our work enables a new kind of verification tool, with the potential to impact a wide audience and allow the Rust community to benefit from state-of-the-art verification techniques. We have implemented our techniques for a subset of Rust; our evaluation on several thousand functions from widely-used Rust crates demonstrates its effectiveness.
32
Jean-Yves Girard · Theoretical Computer Science · 1987 · 4.1K citations
Separation logic: a logic for shared mutable data structures
John Reynolds · 2003 · 2.2K citations
Gerwin Klein, Kevin Elphinstone, Gernot Heiser et al. · 2009 · 1.6K citations
Verifying properties of parallel programs
Susan Owicki, David Gries · Communications of the ACM · 1976 · 543 citations · Full text
Specification and Design of (Parallel) Programs
Cliff B. Jones · IFIP Congress · 1983 · 397 citations