Linear types for large-scale systems verification
Jialin Li, Andrea Lattuada, Yi Zhou, Jonathan Cameron, Jon Howell, Bryan Parno, Chris Hawblitzel
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems cites NrOS: Effective Replication and Sharing in an Operating System
- Verus: A Practical Foundation for Systems Verification cites Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- Verus: A Practical Foundation for Systems Verification cites Verus: Verifying Rust Programs using Linear Ghost Types
- Verus: A Practical Foundation for Systems Verification cites NrOS: Effective Replication and Sharing in an Operating System
- Verus: Verifying Rust Programs using Linear Ghost Types cites Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations cites Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent Systems
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations cites Verus: A Practical Foundation for Systems Verification
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual Optimizations cites Verus: Verifying Rust Programs using Linear Ghost Types
Cited by top-tier papers11
- Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun et al.OOPSLA 2023 · 86 citations
- Verus: A Practical Foundation for Systems VerificationAndrea Lattuada, Travis Hance, Jay Bosamiya, Matthias Brun et al.SOSP 2024 · 22 citations
- Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent SystemsTravis Hance, Yi Zhou, Andrea Lattuada, Reto Achermann et al.OSDI 2023 · 18 citations
- Securing Verified IO Programs Against Unverified Code in FCezar-Constantin Andrici, Stefan Ciobaca, Catalin Hritcu, Guido Martínez et al.POPL 2024 · 5 citations
- AutoMan: Facilitating Verified Distributed Systems Development Through Automatic Code Generation and Manual OptimizationsZihao Zhang, Ti Zhou, Christa Jenkins, Omar Chowdhury et al.SOSP 2025 · 2 citations
Builds on3
- RedLeaf: Isolation and Communication in a Safe Operating SystemVikram Narayanan, Tianjiao Huang, David Detweiler, Dan Appel et al.OSDI 2020 · 86 citations
- Theseus: an Experiment in Operating System Structure and State ManagementKevin Boos, Namitha Liyanage, Ramla Ijaz, Lin ZhongOSDI 2020 · 67 citations
- NrOS: Effective Replication and Sharing in an Operating SystemAnkit Bhardwaj, Chinmay Kulkarni, Reto Achermann, Irina Calciu et al.OSDI 2021
Related papers
- DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent ProgramsAleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. FosterPOPL 2026 · 1 citation
- 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 citations
- Accelerating Automated Program Verifiers by Automatic Proof LocalizationKiran Gopinathan, Dionysios Spiliopoulos, Vikram Goyal, Peter Müller et al.CAV 2025 · 1 citation
- Modular Reasoning About Object RelationsMicha Greutmann, Marco Eilers, Peter MüllerCAV 2026
- StarMalloc: Verifying a Modern, Hardened Memory AllocatorAntonin Reitz, Aymeric Fromherz, Jonathan ProtzenkoOOPSLA 2024 · 5 citations
