VIP: verifying real-world C idioms with integer-pointer casts
Rodolphe Lepigre, Michael Sammler, Kayvan Memarian, Robbert Krebbers, Derek Dreyer, Peter Sewell
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Archmage and CompCertCast: End-to-End Verification Supporting Integer-Pointer Casting 引用了 RefinedC: automating the foundational verification of C code with refined ownership types
- CN: Verifying Systems C Code with Separation-Logic Refinement Types 引用了 RefinedC: automating the foundational verification of C code with refined ownership types
- CN: Verifying Systems C Code with Separation-Logic Refinement Types 引用了 A Secure and Formally Verified Linux KVM Hypervisor
- BFF: foundational and automated verification of bitfield-manipulating programs 引用了 RefinedC: automating the foundational verification of C code with refined ownership types
- A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level Code 引用了 RefinedC: automating the foundational verification of C code with refined ownership types
- Compositional Symbolic Execution for the Next 700 Memory Models 引用了 CN: Verifying Systems C Code with Separation-Logic Refinement Types
引用它的顶会 Paper8
- CN: Verifying Systems C Code with Separation-Logic Refinement TypesChristopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian 等POPL 2023 · 26 次引用
- BFF: foundational and automated verification of bitfield-manipulating programsFengmin Zhu, Michael Sammler, Rodolphe Lepigre, Derek Dreyer 等OOPSLA 2022 · 4 次引用
- A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level CodeJulien Simonnet, Matthieu Lemerre, Mihaela SighireanuOOPSLA 2024 · 4 次引用
- Compositional Symbolic Execution for the Next 700 Memory ModelsAndreas Lööw, Seung Hoon Park, Daniele Nantes-Sobrinho, Sacha-Élie Ayoun 等OOPSLA 2025 · 4 次引用
- Archmage and CompCertCast: End-to-End Verification Supporting Integer-Pointer CastingYonghyun Kim, Minki Cho, Jaehyung Lee, Jinwoo Kim 等POPL 2025 · 1 次引用
它引用的 Paper2
相关 Paper
- Verified compilation of C programs with a nominal memory modelYuting Wang, Ling Zhang, Zhong Shao, Jérémie KoenigPOPL 2022 · 6 次引用
- Bringing Foundational Verification to Real-World Rust CodeLennard Gäher, Vincent Lafeychine, Sascha Kehrli, Avraham Shinnar 等OOPSLA 2026
- Practical Verification of System-Software Components Written in Standard CCan Cebeci, Yonghao Zou, Diyu Zhou, George Candea 等SOSP 2024 · 2 次引用
- Sound garbage collection for C using pointer provenanceSubarno Banerjee, David Devecsery, Peter M. Chen, Satish NarayanasamyOOPSLA 2020 · 4 次引用
- Persistent Owicki-Gries reasoning: a program logic for reasoning about persistent programs on Intel-x86Azalea Raad, Ori Lahav, Viktor VafeiadisOOPSLA 2020 · 20 次引用
