简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM