我试图了解如何在 ltl 公式中正确使用直到运算符。我发现这个定义(如下)很清楚:
直到_
A U B:如果存在 i 则为真:
B 在 [s i , s i+1 , s i+2 , ... ]中为真
对于所有满足 0 ≤ j < i 的 j,公式 A 在 [s j , s j+1 , s j+2 , ... ]中为真
意义:
B 在时间 i 为真
对于 0 和 i-1 之间的时间,公式 A 为真
仍然使用“在时间 i 时为真”的形式化
带有示例 ltl 公式的示例代码:
mtype = {Regular, Reverse, Quit}
mtype state = Regular;
init {
do ::
if
::state == Regular -> state = Reverse
::state == Reverse -> state = Quit
::state == Quit -> break
fi
od
}
ltl p0 { [] ((state == Reverse) U (state != Reverse))}
根据我给出的 until 运算符的定义,我不明白上述 ltl 公式如何没有产生任何错误。state == Reverse
直到所有时间都不需要是真的state != Reverse
吗?最初state == Regular
.
下面是运行测试后的 SPIN 输出:
(Spin Version 6.4.6 -- 2 December 2016)
+ Partial Order Reduction
Full statespace search for:
never claim + (p0)
assertion violations + (if within scope of claim)
acceptance cycles + (fairness disabled)
invalid end states - (disabled by never claim)
State-vector 28 byte, depth reached 13, errors: 0
9 states, stored (11 visited)
2 states, matched
13 transitions (= visited+matched)
0 atomic steps
hash conflicts: 0 (resolved)
Stats on memory usage (in Megabytes):
0.000 equivalent memory usage for states (stored*(State-vector + overhead))
0.288 actual memory usage for states
128.000 memory used for hash table (-w24)
0.534 memory used for DFS stack (-m10000)
128.730 total actual memory usage
unreached in init
(0 of 12 states)
unreached in claim p0
_spin_nvr.tmp:14, state 20, "-end-"
(1 of 20 states)
pan: elapsed time 0 seconds