JUCS - Journal of Universal Computer Science 9(3): 191-222, doi: 10.3217/jucs-009-03-0191
Using Program Checking to Ensure the Correctness of Compiler Implementations
expand article infoSabine Glesner
‡ Institute for Program Structures and Data Organization University of Karlsruhe, Karlsruhe, Germany
Open Access
Abstract
We evaluate the use of program checking to ensure the correctness of compiler implementations. Our contributions in this paper are threefold: Firstly, we extend the classical notion of black-box program checking to program checking with certificates. Our checking approach with certificates relies on the observation that the correctness of solutions of NP-complete problems can be checked in polynomial time whereas their computation itself is believed to be much harder. Our second contribution is the application of program checking with certificates to optimizing compiler backends, in particular code generators, thus answering the open question of how program checking for such compiler backends can be achieved. In particular, we state a checking algorithm for code generation based on bottom-up rewrite systems from static single assignment representations. We have implemented this algorithm in a checker for a code generator used in an industrial project. Our last contribution in this paper is an integrated view on all compiler passes, in particular a comparison between frontend and backend phases, with respect to the applicable methods of program checking.
Keywords
compiler, implementation correctness, program checking, certificates, compiler architecture, compiler generators, code generation