教程示例失败:与alt-ergo不匹配?

时间:2016-04-04 19:29:58

标签: frama-c

我已按照frama-c网站的说明使用opam和自制程序安装了frama-c。我在Mac OS X(El Capitan)上,版本是:

  • frama-c:Magnesium-20151002
  • alt-ergo:1.01
  • ocaml:4.02.3

当我尝试使用swap.c教程运行时,它无法验证。这是我得到的错误:

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

输出消息似乎表明alt-ergo可以证明断言,但是frama-c无法解析输出。这可能是因为alt-ergo版本太新了吗?以下是生成文件的第786行的目标,在上面的输出中引用:

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)

如果我直接在此生成的文件上运行alt-ergo,则返回代码为0。

0 个答案:

没有答案