Lune

POPL2022顶会

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CompCertELF: verified separate compilation of C programs into ELF object files 引用了 CompCertM: CompCert with C-assembly linking and lightweight modular verification
  • Fully Composable and Adequate Verified Compilation with Direct Refinements between Open Modules 引用了 CompCertO: compiling certified open C components
  • Fully Composable and Adequate Verified Compilation with Direct Refinements between Open Modules 引用了 CompCertM: CompCert with C-assembly linking and lightweight modular verification
  • CompCertO: compiling certified open C components 引用了 CompCertM: CompCert with C-assembly linking and lightweight modular verification
  • CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared Stacks 引用了 Fully Composable and Adequate Verified Compilation with Direct Refinements between Open Modules
  • CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared Stacks 引用了 CompCertO: compiling certified open C components
  • CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared Stacks 引用了 CompCertM: CompCert with C-assembly linking and lightweight modular verification
  • TensorRight: Automated Verification of Tensor Graph Rewrites 引用了 CompCertO: compiling certified open C components
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Fully Composable and Adequate Verified Compilation with Direct Refinements between Open ModulesLing Zhang, Yuting Wang, Jinhua Wu, Jérémie Koenig 等POPL 2024 · 10 次引用
  2. TensorRight: Automated Verification of Tensor Graph RewritesJai Arora, Sirui Lu, Devansh Jain, Tianfan Xu 等POPL 2025 · 6 次引用
  3. CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared StacksLing Zhang, Yuting Wang, Yalun Liang, Zhong ShaoPLDI 2025

它引用的 Paper3

  1. CompCertM: CompCert with C-assembly linking and lightweight modular verificationYoungju Song, Minki Cho, Dongjoo Kim, Yonghyun Kim 等POPL 2020 · 49 次引用
  2. CompCertELF: verified separate compilation of C programs into ELF object filesYuting Wang, Xiangzhe Xu, Pierre Wilke, Zhong ShaoOOPSLA 2020 · 26 次引用
  3. CompCertO: compiling certified open C componentsJérémie Koenig, Zhong ShaoPLDI 2021 · 18 次引用

相关 Paper

  1. SECOMP: Formally Secure Compilation of Compartmentalized C ProgramsJérémy Thibault, Roberto Blanco, Dongjae Lee, Sven Argo 等CCS 2024 · 1 次引用
  2. An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 14 次引用
  3. Fully Verified Instruction SchedulingZiteng Yang, Jun Shirako, Vivek SarkarOOPSLA 2024 · 1 次引用
  4. Formally Verified Native Code Generation in an Effectful JIT: Turning the CompCert Backend into a Formally Verified JIT CompilerAurèle Barrière, Sandrine Blazy, David PichardiePOPL 2023 · 27 次引用
  5. Sequential reasoning for optimizing compilers under weak memory concurrencyMinki Cho, Sung-Hwan Lee, Dongjae Lee, Chung-Kil Hur 等PLDI 2022 · 11 次引用
黄昏的海面,两侧是细线勾勒的悬崖