Mechanized Verification of Computing Dominators for Formalizing Compilers

One prerequisite to the formal verification of modern compilers is to formalize computing dominators, which enable SSA forms, advanced optimizations, and analysis. This paper provides an abstract specification of dominance analysis that is sufficient for formalizing modern compilers; it describes a certified implementation and instance of the specification that is simple to design and reason about, and also reasonably efficient. The paper also presents applications of dominance analysis: an SSA-form type checker, verifying SSA-based optimizations, and constructing dominator trees. This development is a part of the Vellvm project. All proofs and implementation have been carried out in Coq.

[1]  Susanne Albers,et al.  Algorithms – ESA 2004 , 2004, Lecture Notes in Computer Science.

[2]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[3]  Milo M. K. Martin,et al.  Formalizing the LLVM intermediate representation for verified program transformations , 2012, POPL '12.

[4]  Jeffrey D. Ullman,et al.  Global Data Flow Analysis and Iterative Algorithms , 1976, J. ACM.

[5]  Ken Kennedy,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[6]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

[7]  Gilles Barthe,et al.  A Formally Verified SSA-Based Middle-End - Static Single Assignment Meets CompCert , 2012, ESOP.

[8]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[9]  Xavier Leroy,et al.  A Formally Verified Compiler Back-end , 2009, Journal of Automated Reasoning.

[10]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[11]  Yves Bertot,et al.  Interactive Theorem Proving and Program Development: Coq'Art The Calculus of Inductive Constructions , 2010 .

[12]  Pierre Castéran,et al.  Interactive Theorem Proving and Program Development , 2004, Texts in Theoretical Computer Science An EATCS Series.

[13]  G. Ramalingam,et al.  On loops, dominators, and dominance frontiers , 2002, TOPL.

[14]  Robert E. Tarjan,et al.  Dominator tree verification and vertex-disjoint paths , 2005, SODA '05.

[15]  Timothy J. Harvey,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[16]  Andrew W. Appel Modern Compiler Implementation in ML: Basic Techniques , 1997 .

[17]  Robert E. Tarjan,et al.  Finding Dominators in Practice , 2004, ESA.