我对 Ada/SPARK 很陌生。我试图从这里学习一些教程——
http://docs.adacore.com/spark2014-docs/html/ug/gnatprove.html
假设我正在运行此处给出的 ISQRT 示例 ( http://docs.adacore.com/spark2014-docs/html/ug/gnatprove.html#id19 )。所有代码(*.ads
和*.adb
)都捆绑为一个名为的项目isqrt.gpr
,我正在运行的命令是——
:~$ gnatprove -gnato13 -P isqrt.gpr
我得到的输出是——
Phase 1 of 3: frame condition computation ...
Phase 2 of 3: analysis and translation to intermediate language ...
Phase 3 of 3: generation and proof of VCs ...
analyzing isqrtsubtyped, 0 checks
analyzing isqrtsubtyped.ISQRT, 13 checks
isqrtsubtyped.ads:7:31: warning: overflow check might fail
gprbuild: *** compilation phase failed
gnatprove: error during generation and proof of VCs, aborting.
该教程说我需要提供一个调用证明者的开关-gnato13
,以便它跳过一些溢出检查。但显然这个开关是不可接受的。
任何想法?