4 ms·
Empirically, we can look at something like CompCert, which formally verified a substantial section of a C compiler. Subsequent high volume random testing with
by pfdietz 2mo ago
Empirically, we can look at something like CompCert, which formally verified a substantial section of a C compiler.
Subsequent high volume random testing with Csmith found no bugs in the formally verified section (unlike in every other C compiler tested with Csmith).
It should be noted that the verification performed was specifically about whether the compiler would produce incorrect code; cases where it would crash or error and not produce code would not be considered errors of verification. This would enable (for example) a coloring register allocator to be adjoined with some code that checked whether the coloring was correct and abort if not.
- pseudohadamard 2mo agoThe problem with CompCert is that it produces really bad code, below the level of gcc -O0, about the level of the eternally-in-progress compiler project you worked on in your Programming Languages 370 course. So you can get most of the benefits of CompCert by running a standard compiler with -O0.
- pfdietz 2mo agoNevertheless, this is a demonstration that verification can produced apparently bug-free code.