关于以下函数定义(list.c):
//@ type list<A> = Nil | Cons(A,list<A>);
/*@ logic integer list_length<A>(list<A> l) =
@ \match l {
@ case Nil : 0
@ case Cons(h,t) : 1 + list_length(tail)
@ };
*/frama-c在消息中失败:
$ frama-c -wp -wp-rte list.c
[jessie3] Loading Why3 configuration...
[jessie3] Why3 environment loaded.
[jessie3] Loading Why3 theories...
[jessie3] Loading Why3 modules...
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing list.c (with preprocessing)
list.c:4:[kernel] user error: unexpected token 'l'
[kernel] user error: stopping on file "list.c" that has errors. Add '-kernel-msg-key pp'
for preprocessing command.
[kernel] Frama-C aborted: invalid user input.该示例直接取自ACSL手册。为什么将l与函数的唯一参数关联起来有困难?
我使用frama-c版本:钠-20150201
发布于 2015-09-08 09:43:25
当前Frama的实现不支持模式匹配。为了检查内核是否支持特定的ACSL特性(这并不总是意味着您最喜欢的插件将处理它),请参考ACSL实施手册。如手册简介所述,当前版本的Frama不支持以红色显示的每一项。
https://stackoverflow.com/questions/32452372
复制相似问题