Formal equivalence checking for loop optimization in C programs without unrolling

In this paper, we propose an equivalence checking method for loop optimizations. Those optimizations are effective to improve the performance of both hardware and software. In our proposed method, a symbolic simulation based method is used to check the equivalence. Before applying symbolic simulation, loops are usually unrolled by certain number of times. This causes two problems. One is that the equivalence of the whole loop executions is not guaranteed if the number of unrolling is not large enough. The other is that the verification time can be very long if the loops are unrolled many times. To solve the problems, we propose the method to verify the equivalence of programs including loops and array accesses without unrolling. In the method, we extract the relations of array indexes and iterators of loops, and find the symbolic values of the iterators, for which the loops need to be executed to compute the output arrays of arbitrary indexes. Then, symbolic simulation is applied only to the specified iterations by setting the iterators to particular symbolic values. Thus, in most cases, symbolic simulation can complete the task within very small number of iterations. Finally, we show the experimental results on several loop optimizations.

[1]  David L. Dill,et al.  CVC: A Cooperating Validity Checker , 2002, CAV.

[2]  Masahiro Fujita,et al.  An equivalence checking methodology for hardware oriented C-based specifications , 2002, Seventh IEEE International High-Level Design Validation and Test Workshop, 2002..

[3]  Gerda Janssens,et al.  Functional equivalence checking for verification of algebraic transformations on array-intensive source code , 2005, Design, Automation and Test in Europe.

[4]  Daniel D. Gajski,et al.  SPECC: Specification Language and Methodology , 2000 .

[5]  Daniel Kroening,et al.  Behavioral consistency of C and Verilog programs using bounded model checking , 2003, Proceedings 2003. Design Automation Conference (IEEE Cat. No.03CH37451).

[6]  Masahiro Fujita,et al.  Equivalence checking of C programs by locally performing symbolic simulation on dependence graphs , 2006, 7th International Symposium on Quality Electronic Design (ISQED'06).

[7]  Gerd Ritter,et al.  Formal sequential equivalence checking of digital systems by symbolic simulation , 2001 .