Affiliation:
1. VMware Research, Switzerland
2. Carnegie Mellon University, USA
3. ETH Zurich, Switzerland
4. UNSW Sydney, Australia
5. VMware Research, USA
6. Microsoft Research, USA
Abstract
The Rust programming language provides a powerful type system that checks linearity and borrowing, allowing code to safely manipulate memory without garbage collection and making Rust ideal for developing low-level, high-assurance systems. For such systems, formal verification can be useful to prove functional correctness properties beyond type safety. This paper presents Verus, an SMT-based tool for formally verifying Rust programs.
With Verus, programmers express proofs and specifications using the Rust language, allowing proofs to take advantage of Rust's linear types and borrow checking. We show how this allows proofs to manipulate linearly typed permissions that let Rust code safely manipulate memory, pointers, and concurrent resources. Verus organizes proofs and specifications using a novel mode system that distinguishes specifications, which are not checked for linearity and borrowing, from executable code and proofs, which are checked for linearity and borrowing.
We formalize Verus' linearity, borrowing, and modes in a small lambda calculus, for which we prove type safety and termination of specifications and proofs. We demonstrate Verus on a series of examples, including pointer-manipulating code (an xor-based doubly linked list), code with interior mutability, and concurrent code.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference45 articles.
1. Cogent
2. The Prusti Project: Formal Verification for Rust
3. Leveraging rust types for modular specification and verification
4. Boogie: A Modular Reusable Verifier for Object-Oriented Programs
5. Clark Barrett , Aaron Stump , and Cesare Tinelli . 2010 . The SMT-LIB Standard: Version 2.0 . In Proceedings of the 8th International Workshop on Satisfiability Modulo Theories ( Edinburgh, UK), A. Gupta and D. Kroening (Eds.). Clark Barrett, Aaron Stump, and Cesare Tinelli. 2010. The SMT-LIB Standard: Version 2.0. In Proceedings of the 8th International Workshop on Satisfiability Modulo Theories (Edinburgh, UK), A. Gupta and D. Kroening (Eds.).
Cited by
15 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Sound Borrow-Checking for Rust via Symbolic Semantics;Proceedings of the ACM on Programming Languages;2024-08-15
2. How We Built Cedar: A Verification-Guided Approach;Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering;2024-07-10
3. Shadow Filesystems: Recovering from Filesystem Runtime Errors via Robust Alternative Execution;Proceedings of the 16th ACM Workshop on Hot Topics in Storage and File Systems;2024-07-08
4. Predictable Verification using Intrinsic Definitions;Proceedings of the ACM on Programming Languages;2024-06-20
5. RefinedRust: A Type System for High-Assurance Verification of Rust Programs;Proceedings of the ACM on Programming Languages;2024-06-20