Verified compilation of C programs with a nominal memory model
Yuting Wang, Ling Zhang, Zhong Shao, Jérémie Koenig
摘要
Memory models play an important role in verified compilation of imperative programming languages. A representative one is the block-based memory model of CompCert---the state-of-the-art verified C compiler. Despite its success, the abstraction over memory space provided by CompCert's memory model is still primitive and inflexible. In essence, it uses a fixed representation for identifying memory blocks in a global memory space and uses a globally shared state for distinguishing between used and unused blocks. Therefore, any reasoning about memory must work uniformly for the global memory; it is impossible to individually reason about different sub-regions of memory (i.e., the stack and global definitions). This not only incurs unnecessary complexity in compiler verification, but also poses significant difficulty for supporting verified compilation of open or concurrent programs which need to work with contextual memory, as manifested in many previous extensions of CompCert. To remove the above limitations, we propose an enhancement to the block-based memory model based on nominal techniques; we call it the nominal memory model. By adopting the key concepts of nominal techniques such as atomic names and supports to model the memory space, we are able to 1) generalize the representation of memory blocks to any types satisfying the properties of atomic names and 2) remove the global constraints for managing memory blocks, enabling flexible memory structures for open and concurrent programs. To demonstrate the effectiveness of the nominal memory model, we develop a series of extensions of CompCert based on it. These extensions show that the nominal memory model 1) supports a general framework for verified compilation of C programs, 2) enables intuitive reasoning of compiler transformations on partial memory; and 3) enables modular reasoning about programs working with contextual memory. We also demonstrate that these extensions require limited changes to the original CompCert, making the verification techniques based on the nominal memory model easy to adopt.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- Fully Composable and Adequate Verified Compilation with Direct Refinements between Open ModulesLing Zhang, Yuting Wang, Jinhua Wu, Jérémie Koenig 等POPL 2024 · 被引用 10 次
- TensorRight: Automated Verification of Tensor Graph RewritesJai Arora, Sirui Lu, Devansh Jain, Tianfan Xu 等POPL 2025 · 被引用 6 次
- CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared StacksLing Zhang, Yuting Wang, Yalun Liang, Zhong ShaoPLDI 2025
它引用的顶会 Paper3
- CompCertM: CompCert with C-assembly linking and lightweight modular verificationYoungju Song, Minki Cho, Dongjoo Kim, Yonghyun Kim 等POPL 2020 · 被引用 49 次
- CompCertELF: verified separate compilation of C programs into ELF object filesYuting Wang, Xiangzhe Xu, Pierre Wilke, Zhong ShaoOOPSLA 2020 · 被引用 26 次
- CompCertO: compiling certified open C componentsJérémie Koenig, Zhong ShaoPLDI 2021 · 被引用 18 次
相关 Paper
- An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 被引用 14 次
- Fully Verified Instruction SchedulingZiteng Yang, Jun Shirako, Vivek SarkarOOPSLA 2024 · 被引用 1 次
- SECOMP: Formally Secure Compilation of Compartmentalized C ProgramsJérémy Thibault, Roberto Blanco, Dongjae Lee, Sven Argo 等CCS 2024 · 被引用 1 次
- Sequential reasoning for optimizing compilers under weak memory concurrencyMinki Cho, Sung-Hwan Lee, Dongjae Lee, Chung-Kil Hur 等PLDI 2022 · 被引用 11 次
- Formally Verifying Optimizations with Block SimulationsLéo Gourdin, Benjamin Bonneau, Sylvain Boulmé, David Monniaux 等OOPSLA 2023 · 被引用 13 次
