CN: Verifying Systems C Code with Separation-Logic Refinement Types
Christopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian, Peter Sewell, Neel Krishnaswami
Abstract
Despite significant progress in the verification of hypervisors, operating systems, and compilers, and in verification tooling, there exists a wide gap between the approaches used in verification projects and conventional development of systems software. We see two main challenges in bringing these closer together: verification handling the complexity of code and semantics of conventional systems software, and verification usability.
We describe an experiment in verification tool design aimed at addressing some aspects of both: we design and implement CN, a separation-logic refinement type system for C systems software, aimed at predictable proof automation, based on a realistic semantics of ISO C. CN reduces refinement typing to decidable propositional logic reasoning, uses first-class resources to support pointer aliasing and pointer arithmetic, features resource inference for iterated separating conjunction, and uses a novel syntactic restriction of ghost variables in specifications to guarantee their successful inference. We implement CN and formalise key aspects of the type system, including a soundness proof of type checking. To demonstrate the usability of CN we use it to verify a substantial component of Google's pKVM hypervisor for Android.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 92fd9919-c975-4a08-afdc-6651524c6944Cited by top-tier papers11
- RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsLennard Gäher, Michael Sammler, Ralf Jung, Robbert Krebbers et al.PLDI 2024 · 29 citations
- VST-A: A Foundationally Sound Annotation VerifierLitao Zhou, Jianxing Qin, Qinshi Wang, Andrew W. Appel et al.POPL 2024 · 12 citations
- Fulminate: Testing CN Separation-Logic Specifications in CRini Banerjee, Kayvan Memarian, Dhruv C. Makwana, Christopher Pulte et al.POPL 2025 · 6 citations
- Destabilizing IrisSimon Spies, Niklas Mück, Haoyi Zeng, Michael Sammler et al.PLDI 2025 · 5 citations
- StarMalloc: Verifying a Modern, Hardened Memory AllocatorAntonin Reitz, Aymeric Fromherz, Jonathan ProtzenkoOOPSLA 2024 · 5 citations
Builds on5
- RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian et al.PLDI 2021 · 83 citations
- A Secure and Formally Verified Linux KVM HypervisorShih-Wei Li, Xupeng Li, Ronghui Gu, Jason Nieh et al.S&P 2021 · 72 citations
- Islaris: verification of machine code against authoritative ISA semanticsMichael Sammler, Angus Hammond, Rodolphe Lepigre, Brian Campbell et al.PLDI 2022 · 28 citations
- Formal Verification of a Multiprocessor Hypervisor on Arm Relaxed Memory HardwareRunzhou Tao, Jianan Yao, Xupeng Li, Shih-Wei Li et al.SOSP 2021 · 24 citations
- VIP: verifying real-world C idioms with integer-pointer castsRodolphe Lepigre, Michael Sammler, Kayvan Memarian, Robbert Krebbers et al.POPL 2022 · 11 citations
Related papers
- Beyond Backtracking: Connections in Fine-Grained Concurrent Separation LogicIke Mulder, Lukasz Czajka, Robbert KrebbersPLDI 2023 · 2 citations
- An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 14 citations
- Conditional Contextual RefinementYoungju Song, Minki Cho, Dongjae Lee, Chung-Kil Hur et al.POPL 2023 · 29 citations
- Code-Specify-Test-Debug-Prove: Flexibly Integrating Separation Logic Specification into Conventional WorkflowsZain K. Aamer, Rini Banerjee, Hiroyuki Katsura, David Kaloper-Mersinjak et al.PLDI 2026 · 2 citations
- SL-VC: A Benchmark and Automated Framework for Separation Logic Verification Condition ProvingHanyang Wang, Xiwei Wu, Qinxiang CaoICML 2026
