我正在按照他们的教程尝试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
end
goal G1: mem 2 (Cons 1 (Cons 2 (Cons 3 Nil)))
end
以下是各种证明者的结果:
z3:
▶ why3 prove -P z3 demo_logic.why
File "/usr/local/share/why3/drivers/z3_bare.drv", line 172, characters 36-41:
Unknown logical symbol map.Map.const
cvc4:
▶ why3 prove -P cvc4 demo_logic.why
File "/usr/local/share/why3/drivers/cvc4_bare.drv", line 180, characters 36-41:
Unknown logical symbol map.Map.const
光伏:
▶ why3 prove -P pvs demo_logic.why
File "/usr/local/share/why3/drivers/pvs-common.gen", line 41, characters 18-23:
Unknown logical symbol map.Map.const
这是我的why3版本信息:
▶ why3 --version
Why3 platform, version -n 0.85+git (build date: Tue Mar 10 08:27:47 EDT 2015)
错误消息中提到的 .drv 文件上的时间戳与我的 why3 可执行文件上的时间戳相匹配。
我的理论或我的安装有问题吗?
编辑添加:在教程本身中,它说用来why3 demo_logic.why
证明理论,但是当我尝试得到这个结果时:
▶ why3 demo_logic.why
'demo_logic.why' is not a Why3 command.
相反,如果我只是这样做why3 prove demo_logic.why
,则结果只是(大约)该理论的回声:
▶ 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