I have installed frama-c using opam and homebrew, following the instructions from the frama-c site. I'm on Mac OS X (El Capitan), and the versions are:
- frama-c: Magnesium-20151002
- alt-ergo: 1.01
- ocaml: 4.02.3
When I attempt to run with the swap.c tutorial, it fails to verify. Here's the error I get:
[ frama-c ]> frama-c -wp -wp-out temp swap.c swap1.h
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing swap.c (with preprocessing)
[kernel] Parsing swap1.h (with preprocessing)
[wp] warning: Missing RTE guards
[wp] 2 goals scheduled
------------------------------------------------------------
--- Alt-Ergo (stdout) :
------------------------------------------------------------
File "temp/typed/swap_post_A_Alt-Ergo.mlw", line 786, characters 1-299:Valid (0.0093) (12 steps)
------------------------------------------------------------
[wp] [Alt-Ergo] Goal typed_swap_post_A : Failed
Error: Can not understand Alt-Ergo output.
[wp] Proved goals: 1 / 2
Qed: 1
Alt-Ergo: 0 (failed: 1)
The output message seems to suggest that alt-ergo could prove the assertion, but then frama-c could not parse the output. Could this be because the alt-ergo version is too new? Here is the goal on line 786 of the generated file, referenced in the above output:
goal swap_post_A:
forall t : (addr,int) farray.
forall a_1,a : addr.
let x = t[a] : int in
let x_1 = t[a_1] : int in
let x_2 = t[a_1 <- x][a <- x_1][a_1] : int in
is_sint32(x) ->
is_sint32(x_1) ->
(region(a.base) <= 0) ->
(region(a_1.base) <= 0) ->
is_sint32(x_2) ->
(x = x_2)
If I run alt-ergo on this generated file directly, it returns with code 0.