Fully Verified Instruction Scheduling
Ziteng Yang, Jun Shirako, Vivek Sarkar
摘要
CompCert project, the state-of-the-art compiler that achieves the first end-to-end formally verified C compiler, does not support fully verified instruction scheduling. Instead, existing research that works on such topics only implements translation validation. This means they do not have direct formal proof that the scheduling algorithm is correct, but only a posterior validation to check each compiling case. Using such a method, CompCert accepts a valid C program and compiles correctly only when the untrusted scheduler generates a correct result. However, it does not guarantee the complete correctness of the scheduler. It also causes compile-time validation overhead in the view of runtime performance. In this work, we present the first achievement in developing a mechanized library for fully verified instruction scheduling while keeping the proof workload acceptably lightweight. The idea to reduce the proof length is to exploit a simple property that the topological reordering of a topological sorted list is equal to a sequence of swapping adjacent unordered elements. Together with the transitivity of semantic simulation relation, the only burden will become proving the semantic preservation of a transition that only swaps two adjacent independent instructions inside one block. After successfully proving this result, proving the correctness of any new instruction scheduling algorithm only requires proof that it preserved the syntax-level dependence among instructions, instead of reasoning about semantics details every time. We implemented a mechanized library of such methods in the Coq proof assistant based on CompCert’s library as a framework and used the list scheduling algorithm as a case study to show the correctness can be formally proved using our theory. We show that with our method that abstracts away the semantics details, it is flexible to implement any scheduler that reorders instructions with little extra proof burden. Our scheduler in the case study also abstracts away the outside scheduling heuristic as a universal parameter so it is flexible to modify without touching any correctness proof.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
相关 Paper
- Certified and efficient instruction scheduling: application to interlocked VLIW processorsCyril Six, Sylvain Boulmé, David MonniauxOOPSLA 2020 · 被引用 21 次
- Formally Verifying Optimizations with Block SimulationsLéo Gourdin, Benjamin Bonneau, Sylvain Boulmé, David Monniaux 等OOPSLA 2023 · 被引用 13 次
- CompCertELF: verified separate compilation of C programs into ELF object filesYuting Wang, Xiangzhe Xu, Pierre Wilke, Zhong ShaoOOPSLA 2020 · 被引用 26 次
- 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 次
- Hyperblock Scheduling for Verified High-Level SynthesisYann Herklotz, John WickersonPLDI 2024 · 被引用 3 次
