Compiler correctness
In computing, compiler correctness is the branch of computer science that deals with trying to show that a compiler behaves according to its language specification. Techniques include developing the compiler using formal methods and using rigorous testing (often called compiler validation) on an existing compiler. Formal verification Two main formal verification approaches for establishing correctness of compilation are proving correctness of the compiler for all inputs and proving correctness of a compilation of a particular program (translation validation). Compiler correctness for all input programs Compiler validation with formal methods involves a long chain of formal, deductive logic. However, since the tool to find the proof (theorem prover) is implemented in software and is complex, there is a high probability it will contain errors. One approach has been to use a tool that verifies the proof (a proof checker) which, because it is much simpler than a proof-finder, is less likely to contain errors. A prominent example of this approach is CompCert, which is a formally verified optimizing compiler of a large subset of C99. Another verified compiler was developed in CakeML project, which establishes correctness of a substantial subset of Standard ML programming language using the HOL (proof assistant). Another