Compilers are crucial components of the computing ecosystem. They can transform source programs written in multiple languages (e.g, C/C++/Java) into multiple target architectures (e.g, x86/ARM). Compiler bugs, however, break properties enforced at the level of source programs and can lead to unintended application behavior and disasters in safety-critical domains. This project aims to develop pragmatic and lightweight formal techniques for making mainstream compilers robust, in a manner that can be easily adopted by compiler developers. The intellectual merit of this project is the development of real-world compiler verification environments drawing influence from multiple areas like programming languages, architecture, and concurrency. The project's broader significance and importance are: (1) improving the quality of a large number of software projects by improving the robustness of the compiler, (2) inculcating formal reasoning for building large systems (compilers in particular) that are correct by construction, and (3) educating high school students, undergraduates, and graduate students for developing software with lightweight formal methods.
This project aims to build new techniques and tools that can check the correctness of optimizations with the help of the developer. The project achieves this by (1) designing mathematically-precise semantics for various components of the mainstream LLVM compiler, (2) designing domain specific languages for writing and specifying LLVM optimizations, which not only check optimizations for correctness but also generate efficient C++ implementations, (3) designing techniques to build precise translation validators, which compare the source and the target code with assistance from the compiler developer. Technology developed by this research will not only improve the reliability of compilers but also the reliability of other large software systems which depend on correct compilation.