变量state
代表系统的状态,例如state \in {"ready", "prepare", "do", "cleanup", "done"}
。如何表达state
最终应该通过所有五个状态(以任何顺序)的条件?
工作示例(接受的答案):
EXTENDS Naturals
VARIABLE n
Init == n = 1
Next == IF n < 3 THEN n' = n + 1 ELSE n' = n
Spec == Init /\ [][Next]_<<n>> /\ WF_<<n>>(Next)
Check == \A s \in {1,2,3}: <>(s = n) \* This goes: Model Overview >
\* > "What to check?" > Properties
答案 0 :(得分:2)
给定$related_categories_posts = Post::whereHas('categories', function ($query) use ($post){
$query->where('category_name', $post->categories->category_name);
})
,您可以使用
States = {"ready", "prepare", "do", "cleanup", "done"}
你可以通过
检查它是否到达所有州<>(state = "ready")