Is there a website that maintains a list, or is there a list, of tools that support verification of programs written in languages supported by the GCC compiler front ends: C, C++, Objective-C, Fortran, Ada, Go, and D.
There seems to be various webpages for each project but no one curated website with a large list of up to date projects. A current copy of the list (if there are such websites, I've found none) should be included in any forthcoming answers, no link-only answers.
I presume that better answers will propose tools with human readable and executable specifications embedded in the target language, a tool that simply reads the code and proclaims a result is probably a "checker", "linter" or "unit tester"; such tools are not what I am asking about. For want of a better explanation I guess that it would be Design by Contract styled specifications, put another way, for the D language ddoc falls short; because it can't be proven or compiled.
A complete answer would include most of the above languages (that list is chosen because that's what GCC directly supports, without extension), I appreciate that Objective-C doesn't have an agreed upon specification; though a tool supporting the implementation used in GCC or Clang would be useful.
Example:
- C - Frama-C / ACSL
Example Frama-C code: (from: https://www.open-do.org/wp-content/uploads/2010/08/E-ACSL.pdf)
/* @
requires \valid ( root ) && finite_list ( root );
assigns \nothing ;
ensures mem ( \result , root );
ensures
\forall integer n ; mem (n , root ) == >
\result >= n ;
*/
int max_list ( list * root );
int max_list ( list * root ) {
int max = root - > element ;
while ( root - > next ) {
root = root - > next ;
if ( root - > element > max )
max = root - > element ;
}
return max ;
}
/* @ loop invariant \valid ( root ) &&
reachable ( \at( root , Pre ) , root ) &&
mem ( max ,\at( root , Pre )) &&
\forall int n ;
mem_sub (n , \at( root , Pre ) , root ) == >
max >= n ;
*/
while ( root - > next ) {
...
}
Note that the annotated specifications can be proven and compiled separately from the C program, and that the toolset includes modules to assist with the writing and testing of the programs; it's a complete framework.
Note: The author of this question knows very little about this subject but is interested in learning, it is his belief that this might be an easier method to both learn proof checking and be productive use of his existing programming language's knowledge. Hopefully there are no great shortcomings in this question, and that it isn't overly complicated to answer.
Distantly related questions: