Linear types for large-scale systems verification
Jialin Li, Andrea Lattuada, Yi Zhou, Jonathan Cameron, Jon Howell, Bryan Parno, Chris Hawblitzel
摘要
Reasoning about memory aliasing and mutation in software verification is a hard problem. This is especially true for systems using SMT-based automated theorem provers. Memory reasoning in SMT verification typically requires a nontrivial amount of manual effort to specify heap invariants, as well as extensive alias reasoning from the SMT solver. In this paper, we present a hybrid approach that combines linear types with SMT-based verification for memory reasoning. We integrate linear types into Dafny, a verification language with an SMT backend, and show that the two approaches complement each other. By separating memory reasoning from verification conditions, linear types reduce the SMT solving time. At the same time, the expressiveness of SMT queries extends the flexibility of the linear type system. In particular, it allows our linear type system to easily and correctly mix linear and nonlinear data in novel ways, encapsulating linear data inside nonlinear data and vice-versa. We formalize the core of our extensions, prove soundness, and provide algorithms for linear type checking. We evaluate our approach by converting the implementation of a verified storage system (about 24K lines of code and proof) written in Dafny, to use our extended Dafny. The resulting system uses linear types for 91% of the code and SMT-based heap reasoning for the remaining 9%. We show that the converted system has 28% fewer lines of proofs and 30% shorter verification time overall. We discuss the development overhead in the original system due to SMT-based heap reasoning and highlight the improved developer experience when using linear types.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems 引用了 NrOS: Effective Replication and Sharing in an Operating System
- Verus: A Practical Foundation for Systems Verification 引用了 Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- Verus: A Practical Foundation for Systems Verification 引用了 Verus: Verifying Rust Programs using Linear Ghost Types
- Verus: A Practical Foundation for Systems Verification 引用了 NrOS: Effective Replication and Sharing in an Operating System
- Verus: Verifying Rust Programs using Linear Ghost Types 引用了 Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations 引用了 Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations 引用了 Verus: A Practical Foundation for Systems Verification
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations 引用了 Verus: Verifying Rust Programs using Linear Ghost Types
引用它的顶会 Paper11
- Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun 等OOPSLA 2023 · 86 次引用
- Verus: A Practical Foundation for Systems VerificationAndrea Lattuada, Travis Hance, Jay Bosamiya, Matthias Brun 等SOSP 2024 · 22 次引用
- Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent SystemsTravis Hance, Yi Zhou, Andrea Lattuada, Reto Achermann 等OSDI 2023 · 18 次引用
- Securing Verified IO Programs Against Unverified Code in FCezar-Constantin Andrici, Stefan Ciobaca, Catalin Hritcu, Guido Martínez 等POPL 2024 · 5 次引用
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual OptimizationsZihao Zhang, Ti Zhou, Christa Jenkins, Omar Chowdhury 等SOSP 2025 · 2 次引用
它引用的 Paper3
- RedLeaf: Isolation and Communication in a Safe Operating SystemVikram Narayanan, Tianjiao Huang, David Detweiler, Dan Appel 等OSDI 2020 · 86 次引用
- Theseus: an Experiment in Operating System Structure and State ManagementKevin Boos, Namitha Liyanage, Ramla Ijaz, Lin ZhongOSDI 2020 · 67 次引用
- NrOS: Effective Replication and Sharing in an Operating SystemAnkit Bhardwaj, Chinmay Kulkarni, Reto Achermann, Irina Calciu 等OSDI 2021
相关 Paper
- DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent ProgramsAleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. FosterPOPL 2026 · 1 次引用
- Hybrid Systems Verification with Isabelle/HOL: Simpler Syntax, Better Models, Faster ProofsSimon Foster, Jonathan Julián Huerta y Munive, Mario Gleirscher, Georg StruthFM 2021 · 19 次引用
- Accelerating Automated Program Verifiers by Automatic Proof LocalizationKiran Gopinathan, Dionysios Spiliopoulos, Vikram Goyal, Peter Müller 等CAV 2025 · 1 次引用
- SMT2Test: From SMT Formulas to Effective Test CasesChengyu Zhang, Zhendong SuOOPSLA 2024 · 5 次引用
- StarMalloc: Verifying a Modern, Hardened Memory AllocatorAntonin Reitz, Aymeric Fromherz, Jonathan ProtzenkoOOPSLA 2024 · 5 次引用
