Proving Optimizations Correct using Parameterized Program Equivalence

Sudipta Kundu,  Zachary Tatlock,  Sorin Lerner

Programming Language Design and Implementation (PLDI) 2009

Proving Optimizations Correct using Parameterized Program Equivalence

Abstract

Translation validation is a technique for checking that, after an optimization has run, the input and output of the optimization are equivalent. Traditionally, translation validation has been used to prove concrete, fully specified programs equivalent. In this paper we present Parameterized Equivalence Checking (PEC), a generalization of translation validation that can prove the equivalence of parameterized programs. A parameterized program is a partially specified program that can represent multiple concrete programs. For example, a parameterized program may contain a section of code whose only known property is that it does not modify certain variables. By proving parameterized programs equivalent, PEC can prove the correctness of transformation rules that represent complex optimizations once and for all, before they are ever run. We implemented our PEC technique in a tool that can establish the equivalence of two parameterized programs. To highlight the power of PEC, we designed a language for implementing complex optimizations using many-to-many rewrite rules, and used this language to implement a variety of optimizations including software pipelining, loop unrolling, loop unswitching, loop interchange, and loop fusion. Finally, to demonstrate the effectiveness of PEC, we used our PEC implementation to verify that all the optimizations we implemented in our language preserve program behavior.

Talk

PLDI 2009 talk by Zachary Tatlock.

BibTeX

@inproceedings{2009-pldi-pec,
  title     = {Proving Optimizations Correct Using Parameterized Program Equivalence},
  author    = {Kundu, Sudipta and Tatlock, Zachary and Lerner, Sorin},
  series    = {PLDI 2009},
  booktitle = {Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation},
  url       = {https://doi.org/10.1145/1542476.1542513},
  doi       = {10.1145/1542476.1542513},
  publisher = {Association for Computing Machinery},
}

📝 publications index