VIP: verifying real-world C idioms with integer-pointer casts
Rodolphe Lepigre, Michael Sammler, Kayvan Memarian, Robbert Krebbers, Derek Dreyer, Peter Sewell
Abstract
Systems code often requires fine-grained control over memory layout and pointers, expressed using low-level (e.g., bitwise) operations on pointer values. Since these operations go beyond what basic pointer arithmetic in C allows, they are performed with the help of integer-pointer casts. Prior work has explored increasingly realistic memory object models for C that account for the desired semantics of integer-pointer casts while also being sound w.r.t. compiler optimisations, culminating in PNVI-ae-udi, the preferred memory object model in ongoing discussions within the ISO WG14 C standards committee. However, its complexity makes it an unappealing target for verification, and no tools currently exist to verify C programs under PNVI-ae-udi.
In this paper, we introduce VIP, a new memory object model aimed at supporting C verification. VIP sidesteps the complexities of PNVI-ae-udi with a simple but effective idea: a new construct that lets programmers express the intended provenances of integer-pointer casts explicitly. At the same time, we prove VIP compatible with PNVI-ae-udi, thus enabling verification on top of VIP to benefit from PNVI-ae-udi's validation with respect to practice. In particular, we build a verification tool, RefinedC-VIP, for verifying programs under VIP semantics. As the name suggests, RefinedC-VIP extends the recently developed RefinedC tool, which is automated yet also produces foundational proofs in Coq. We evaluate RefinedC-VIP on a range of systems-code idioms, and validate VIP's expressiveness via an implementation in the Cerberus C semantics.
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.
Cited by top-tier papers7
- CN: Verifying Systems C Code with Separation-Logic Refinement TypesChristopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian et al.POPL 2023 · 26 citations
- BFF: foundational and automated verification of bitfield-manipulating programsFengmin Zhu, Michael Sammler, Rodolphe Lepigre, Derek Dreyer et al.OOPSLA 2022 · 4 citations
- A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level CodeJulien Simonnet, Matthieu Lemerre, Mihaela SighireanuOOPSLA 2024 · 4 citations
- Compositional Symbolic Execution for the Next 700 Memory ModelsAndreas Lööw, Seung Hoon Park, Daniele Nantes-Sobrinho, Sacha-Élie Ayoun et al.OOPSLA 2025 · 4 citations
- Archmage and CompCertCast: End-to-End Verification Supporting Integer-Pointer CastingYonghyun Kim, Minki Cho, Jaehyung Lee, Jinwoo Kim et al.POPL 2025 · 1 citation
Builds on2
- 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
Related papers
- Verified compilation of C programs with a nominal memory modelYuting Wang, Ling Zhang, Zhong Shao, Jérémie KoenigPOPL 2022 · 6 citations
- Bringing Foundational Verification to Real-World Rust CodeLennard Gäher, Vincent Lafeychine, Sascha Kehrli, Avraham Shinnar et al.OOPSLA 2026
- Practical Verification of System-Software Components Written in Standard CCan Cebeci, Yonghao Zou, Diyu Zhou, George Candea et al.SOSP 2024 · 2 citations
- Persistent Owicki-Gries reasoning: a program logic for reasoning about persistent programs on Intel-x86Azalea Raad, Ori Lahav, Viktor VafeiadisOOPSLA 2020 · 20 citations
- Symbolic MRD: Dynamic Memory, Undefined Behaviour, and Extrinsic ChoiceJay Richards, Daniel Wright, Simon Cooksey, Mark BattyOOPSLA 2025 · 1 citation
