Z3 ';未知逻辑符号map.map.const';为什么的信息3
我正在通过以下方式尝试why3,但我得到了多个验证程序的消息Z3 ';未知逻辑符号map.map.const';为什么的信息3,z3,cvc4,why3,Z3,Cvc4,Why3,我正在通过以下方式尝试why3,但我得到了多个验证程序的消息Unknown logical symbol map.map.const。以下是我试图证明的理论内容: theory List type list 'a = Nil | Cons 'a (list 'a) predicate mem(x: 'a) (l: list 'a) = match l with | Nil -> false | Cons y r -> x = y || mem x r e
Unknown logical symbol map.map.const
。以下是我试图证明的理论内容:
theory List
type list 'a = Nil | Cons 'a (list 'a)
predicate mem(x: 'a) (l: list 'a) = match l with
| Nil -> false
| Cons y r -> x = y || mem x r
end
goal G1: mem 2 (Cons 1 (Cons 2 (Cons 3 Nil)))
end
以下是各种校准仪的结果:
z3:
cvc4:
PV:
这是我的why3版本信息:
▶ why3 --version
Why3 platform, version -n 0.85+git (build date: Tue Mar 10 08:27:47 EDT 2015)
错误消息中提到的.drv文件上的时间戳与我的why3可执行文件上的时间戳匹配
我的理论或装置有问题吗
编辑添加:在教程中,它说使用why3演示逻辑。为什么要用来证明理论,但当我尝试时,我得到了以下结果:
▶ why3 demo_logic.why
'demo_logic.why' is not a Why3 command.
相反,如果我只是证明演示逻辑。为什么,结果只是(近似地)与理论的呼应:
▶ why3 prove demo_logic.why
theory List
(* use why3.BuiltIn.BuiltIn *)
type list 'a =
| Nil
| Cons 'a (list 'a)
predicate mem (x:'a) (l:list 'a) =
match l with
| Nil -> false
| Cons y r -> x = y || mem x r
end
goal G1 : mem 2 (Cons 1 (Cons 2 (Cons 3 (Nil:list int))))
end
您是否安装了why3的早期版本?验证程序执行中的问题通常是由于使用旧why3配置文件的新why3造成的。我看到您的特定实例通过以下方式得到修复:
rm ~/.why3.conf
why3 config --detect
运行why3 config--detect
确实解决了我的问题。我要注意的是,我还首先使用了env CFLAGS=“-I/usr/local/include/”opam install why3
(以及其他几个opam命令)。
▶ why3 demo_logic.why
'demo_logic.why' is not a Why3 command.
▶ why3 prove demo_logic.why
theory List
(* use why3.BuiltIn.BuiltIn *)
type list 'a =
| Nil
| Cons 'a (list 'a)
predicate mem (x:'a) (l:list 'a) =
match l with
| Nil -> false
| Cons y r -> x = y || mem x r
end
goal G1 : mem 2 (Cons 1 (Cons 2 (Cons 3 (Nil:list int))))
end
rm ~/.why3.conf
why3 config --detect