Verus: Verifying Rust Programs using Linear Ghost Types

Author:

Lattuada Andrea1ORCID,Hance Travis2ORCID,Cho Chanhee2ORCID,Brun Matthias3ORCID,Subasinghe Isitha4ORCID,Zhou Yi2ORCID,Howell Jon5ORCID,Parno Bryan2ORCID,Hawblitzel Chris6ORCID

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3