User Error: Prover 'alt-ergo' not found in why3.conf

3.1k views Asked by At

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.
1

There are 1 answers

5
Virgile On

As mentioned in Frama-C's installation instructions, why3 must be explicitely configured to check for available provers, through the why3 config --detect command (Note that, depending on the exact version of Why3 that you have installed, you might also use why3 config --full-config instead). You should see an output like:

Found prover Alt-Ergo version 2.0.0, OK.
... possibly other provers if you have installed them
Save config to /PATH/TO/HOME/.why3.conf

After that, you will be able to use the provers in Frama-C/WP