Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:2303.05491

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Logic in Computer Science

arXiv:2303.05491 (cs)
[Submitted on 9 Mar 2023 (v1), last revised 11 Mar 2023 (this version, v2)]

Title:Verus: Verifying Rust Programs using Linear Ghost Types (extended version)

Authors:Andrea Lattuada (VMware Research), Travis Hance (Carnegie Mellon University), Chanhee Cho (Carnegie Mellon University), Matthias Brun (ETH Zurich), Isitha Subasinghe (UNSW Sydney), Yi Zhou (Carnegie Mellon University), Jon Howell (VMware Research), Bryan Parno (Carnegie Mellon University), Chris Hawblitzel (Microsoft Research)
View a PDF of the paper titled Verus: Verifying Rust Programs using Linear Ghost Types (extended version), by Andrea Lattuada (VMware Research) and 8 other authors
View PDF
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.
Subjects: Logic in Computer Science (cs.LO); Programming Languages (cs.PL)
Cite as: arXiv:2303.05491 [cs.LO]
  (or arXiv:2303.05491v2 [cs.LO] for this version)
  https://doi.org/10.48550/arXiv.2303.05491
arXiv-issued DOI via DataCite

Submission history

From: Andrea Lattuada [view email]
[v1] Thu, 9 Mar 2023 18:44:45 UTC (260 KB)
[v2] Sat, 11 Mar 2023 00:58:20 UTC (246 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Verus: Verifying Rust Programs using Linear Ghost Types (extended version), by Andrea Lattuada (VMware Research) and 8 other authors
  • View PDF
  • TeX Source
  • Other Formats
license icon view license
Current browse context:
cs.LO
< prev   |   next >
new | recent | 2023-03
Change to browse by:
cs
cs.PL

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack