我是尝试使用 Promela 和 SPIN 的初学者。在开发一些简单的 Promela 规范时,我想使用 printf() 检查程序中变量的值。我已阅读此手册页并尝试运行一个简单的 hello world 程序,但我没有看到任何输出文本。这是示例 hello world 文件:
init {
printf("MSC: passed first test!\n")
}
我用来编译和运行的步骤是
spin -a hello.pml
cc -o run pan.c
./run
运行的输出是
hint: this search is more efficient if pan.c is compiled -DSAFETY
(Spin Version 4.2.6 -- 27 October 2005)
+ Partial Order Reduction
Full statespace search for:
never claim - (none specified)
assertion violations +
acceptance cycles - (not selected)
invalid end states +
State-vector 12 byte, depth reached 2, errors: 0
3 states, stored
0 states, matched
3 transitions (= stored+matched)
0 atomic steps
hash conflicts: 0 (resolved)
4.879 memory usage (Mbyte)
unreached in proctype :init:
(0 of 2 states)
那么,我在哪里可以找到 printf 语句的输出?我也在更复杂的 promela 文件中尝试了 printf 语句,但显然我想让它首先适用于简单的情况。任何见解将不胜感激。谢谢!