...
【24h】

Automatically Proving the Correctness of Compiler Optimizations

机译:自动证明编译器优化的正确性

获取原文
获取原文并翻译 | 示例

摘要

We describe a technique for automatically proving compiler optimizations sound, meaning that their transformations are always semantics-preserving. We first presented a domain-specific language, called Cobalt, for implementing optimizations as guarded rewrite rules. Cobalt optimizations operate over a C-like intermediate representation including unstructured control flow, pointers to local variables and dynamically allocated memory, and recursive procedures. Then we describe a technique for automatically proving the soundness of Cobalt optimizations. Our technique requires an automatic theorem prover to discharge a small set of simple, optimization-specific proof obligations for each optimization. We have written a variety of forward and backward intraprocedural dataflow optimizations in Cobalt, including constant propagation and folding, branch folding, full and partial redundancy elimination, full and partial dead assignment elimination, and simple forms of points-to analysis. We implemented our soundness-checking strategy using the Simplify automatic theorem prover, and we have used this implementation to automatically prove our optimizations correct. Our checker found many subtle bugs during the course of developing our optimizations. We also implemented an execution engine for Cobalt optimizations as part of the Whirlwind compiler infrastructure.
机译:我们描述了一种自动证明编译器优化声音的技术,这意味着它们的转换始终保持语义不变。我们首先提出了一种特定于域的语言,称为Cobalt,用于将优化实现为受保护的重写规则。钴优化在类似于C的中间表示上运行,包括非结构化控制流,指向局部变量和动态分配的内存的指针以及递归过程。然后,我们描述了一种自动证明Cobalt优化的正确性的技术。我们的技术要求自动定理证明者为每次优化履行一小组简单的,特定于优化的证明义务。我们在Cobalt中编写了各种正向和反向过程内数据流优化,包括恒定传播和折叠,分支折叠,完全和部分冗余消除,完全和部分死态消除以及简单的点对点分析。我们使用简化自动定理证明器实施了健全性检查策略,并且我们已经使用此实现来自动证明我们的优化正确。我们的检查人员在开发优化过程中发现了许多细微的错误。作为Whirlwind编译器基础结构的一部分,我们还实现了针对Cobalt优化的执行引擎。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号