I am trying to test a function with Frama-c:
/*@
ensures \result >= x && \result >= y;
ensures \result == x || \result == y;
*/
int max( int x, int y){
return (x>y) ? x : y;
}
After I installed all the requirements: OPAM, why3, alt-ergo Whenever I execute frama-c -wp fct.c I receive:
[kernel] Parsing fct.c (with preprocessing)
[wp] Warning: Missing RTE guards
[wp] User Error: Prover 'alt-ergo' not found in why3.conf
[wp] Goal typed_max_ensures : not tried
[wp] Goal typed_max_ensures_2 : not tried
[wp] User Error: Deferred error message was emitted during execution.
See above messages for more information.
[kernel] Plug-in wp aborted: invalid user input.
As mentioned in Frama-C's installation instructions,
why3
must be explicitely configured to check for available provers, through thewhy3 config --detect
command (Note that, depending on the exact version of Why3 that you have installed, you might also usewhy3 config --full-config
instead). You should see an output like:After that, you will be able to use the provers in Frama-C/WP