Formal Methods in System Design

, Volume 27, Issue 3, pp 335–360

Translation and Run-Time Validation of Loop Transformations

  • Lenore Zuck
  • Amir Pnueli
  • Benjamin Goldberg
  • Clark Barrett
  • Yi Fang
  • Ying Hu
Article

Abstract

This paper presents new approaches to the validation of loop optimizations that compilers use to obtain the highest performance from modern architectures. Rather than verify the compiler, the approach of translation validationperforms a validation check after every run of the compiler, producing a formal proof that the produced target code is a correct implementation of the source code.

As part of an active and ongoing research project on translation validation, we have previously described approaches for validating optimizations that preserve the loop structure of the code and have presented a simulation-based general technique for validating such optimizations. In this paper, for more aggressive optimizations that alter the loop structure of the code—such as distribution, fusion, tiling, and interchange—we present a set of permutation ruleswhich establish that the transformed code satisfies all the implied data dependencies necessary for the validity of the considered transformation. We describe the extensions to our tool voc-64 which are required to validate these structure-modifying optimizations.

This paper also discusses preliminary work on run-time validation of speculative loop optimizations. This involves using run-time tests to ensure the correctness of loop optimizations whose correctness cannot be guaranteed at compile time. Unlike compiler validation, run-time validation must not only determine when an optimization has generated incorrect code, but also recover from the optimization without aborting the program or producing an incorrect result. This technique has been applied to several loop optimizations, including loop interchange and loop tiling, and appears to be quite promising.

Keywords

translation validation loop transformations reordering transformations run-time validation optimizing compilers global optimizations verification conditions speculative optimizations 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Science + Business Media, Inc. 2005

Authors and Affiliations

  • Lenore Zuck
    • 1
  • Amir Pnueli
    • 2
    • 3
  • Benjamin Goldberg
    • 4
  • Clark Barrett
    • 4
  • Yi Fang
    • 4
  • Ying Hu
    • 4
  1. 1.Department of Computer ScienceUniversity of IllinoisChicagoUSA
  2. 2.Department of Computer ScienceNew York UniversityUSA
  3. 3.Weizmann Institute of ScienceRehovotIsrael
  4. 4.Department of Computer ScienceNew York UniversityUSA

Personalised recommendations