[英]Is the mach.int library a default part of why3?
我正在Simulink模型的Why3規范中嘗試使用32位整數,並且我發現mach.int庫 (即至少在一個地方被描述為標准庫的一部分)。 但是,當我嘗試將其與以下導入命令一起使用時:
use import mach.int.Int32
我收到消息:
Library file not found: mach.int
這是我的第一個帶有“。”的庫。 因此,我不確定我的語法是否錯誤,或者該庫實際上不是標准庫的一部分,或者我是否在做其他錯誤。
使用mach.int.Int32
模塊的正確方法是什么?
我的why3
版本是0.87.3:
▶ why3 --version
Why3 platform, version 0.87.3
我查看了〜/ .why3.conf文件,發現以下幾行:
[main]
loadpath = "/opt/gps/share/why3/theories"
loadpath = "/opt/gps/share/why3/modules"
loadpath = "/opt/gps/share/spark/theories"
我查看了/opt/gps/share/why3/modules
(和/opt/gps/share/why3/theories
和/opt/gps/share/spark/theories
),沒有找到mach.int.*
,所以我創建了一個/opt/gps/share/why3/modules
mach.int.mlw
文件,並確保why3
可以:
▶ why3 prove -P z3 mach.int.mlw
mach.int.mlw Int WP_parameter infix / : Valid (0.01s)
mach.int.mlw Int WP_parameter infix % : Valid (0.01s)
mach.int.mlw Refint63 WP_parameter incr : Valid (0.02s)
mach.int.mlw Refint63 WP_parameter decr : Valid (0.02s)
mach.int.mlw Refint63 WP_parameter infix += : Valid (0.02s)
mach.int.mlw Refint63 WP_parameter infix -= : Valid (0.02s)
mach.int.mlw Refint63 WP_parameter infix *= : Valid (0.02s)
mach.int.mlw MinMax63 WP_parameter min : Valid (0.01s)
mach.int.mlw MinMax63 WP_parameter max : Valid (0.02s)
結果是一樣的。
原來, int.mlw
在mach
子目錄中的int.mlw
模塊中尋找mach.int.Int32
。
把mach.int
庫中/opt/gps/share/why3/modules/mach/
目錄解決了與庫中的問題沒有被發現(其中/opt/gps/share/why3/modules
被定義為的一部分loadpath
在我的~/.why3.conf
文件)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.