Lune

POPL2023Top-tier venue

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 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.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Islaris: verification of machine code against authoritative ISA semantics cites RefinedC: automating the foundational verification of C code with refined ownership types
  • Islaris: verification of machine code against authoritative ISA semantics cites Formal Verification of a Multiprocessor Hypervisor on Arm Relaxed Memory Hardware
  • Islaris: verification of machine code against authoritative ISA semantics cites A Secure and Formally Verified Linux KVM Hypervisor
  • VIP: verifying real-world C idioms with integer-pointer casts cites RefinedC: automating the foundational verification of C code with refined ownership types
  • VIP: verifying real-world C idioms with integer-pointer casts cites A Secure and Formally Verified Linux KVM Hypervisor
  • RefinedC: automating the foundational verification of C code with refined ownership types cites VST-A: A Foundationally Sound Annotation Verifier
  • VST-A: A Foundationally Sound Annotation Verifier cites RefinedC: automating the foundational verification of C code with refined ownership types
  • Formal Verification of a Multiprocessor Hypervisor on Arm Relaxed Memory Hardware cites A Secure and Formally Verified Linux KVM Hypervisor
  • Destabilizing Iris cites RefinedC: automating the foundational verification of C code with refined ownership types
  • RefinedRust: A Type System for High-Assurance Verification of Rust Programs cites RefinedC: automating the foundational verification of C code with refined ownership types
  • Fulminate: Testing CN Separation-Logic Specifications in C cites RefinedC: automating the foundational verification of C code with refined ownership types
  • Fulminate: Testing CN Separation-Logic Specifications in C cites VST-A: A Foundationally Sound Annotation Verifier
  • StarMalloc: Verifying a Modern, Hardened Memory Allocator cites RefinedC: automating the foundational verification of C code with refined ownership types
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. 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
  2. VST-A: A Foundationally Sound Annotation VerifierLitao Zhou, Jianxing Qin, Qinshi Wang, Andrew W. Appel et al.POPL 2024 · 12 citations
  3. Fulminate: Testing CN Separation-Logic Specifications in CRini Banerjee, Kayvan Memarian, Dhruv C. Makwana, Christopher Pulte et al.POPL 2025 · 6 citations
  4. Destabilizing IrisSimon Spies, Niklas Mück, Haoyi Zeng, Michael Sammler et al.PLDI 2025 · 5 citations
  5. StarMalloc: Verifying a Modern, Hardened Memory AllocatorAntonin Reitz, Aymeric Fromherz, Jonathan ProtzenkoOOPSLA 2024 · 5 citations

Builds on5

  1. 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
  2. A Secure and Formally Verified Linux KVM HypervisorShih-Wei Li, Xupeng Li, Ronghui Gu, Jason Nieh et al.S&P 2021 · 72 citations
  3. Islaris: verification of machine code against authoritative ISA semanticsMichael Sammler, Angus Hammond, Rodolphe Lepigre, Brian Campbell et al.PLDI 2022 · 28 citations
  4. 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
  5. 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

  1. Ghost in the Android Shell: Pragmatic Test-oracle Specification of a Production HypervisorKayvan Memarian, Ben Simner, David Kaloper-Mersinjak, Thibaut Pérami et al.SOSP 2025
  2. Beyond Backtracking: Connections in Fine-Grained Concurrent Separation LogicIke Mulder, Lukasz Czajka, Robbert KrebbersPLDI 2023 · 2 citations
  3. An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 14 citations
  4. Conditional Contextual RefinementYoungju Song, Minki Cho, Dongjae Lee, Chung-Kil Hur et al.POPL 2023 · 29 citations
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines