[英]Alloy - Irreflexivity
我剛開始使用合金。 我對以下最小示例有疑問:
module test
abstract sig MySig {
my_rel : set MySig
}
//fact my_rel_irrefl {no iden & my_rel } // this works
fact my_rel_irrelfl {my_rel not in iden} // this does not work
run {}
為什么第二個 my_rel_irrelfl 不起作用? 我的想法是,例如
MySig = {N0,N1,N2} 同義詞 = {(N0,N0),(N1,N1),(N2,N2)}
如果有一個元素 (x,x),其中 MySig 中的 x 在關系 my_rel 中,那么它也必須在 iden 中。
但是,我得到了這個 model:
即 my_rel 是自反的。
my_rel not in iden
表示my_rel
不是iden
的子集。 由於N0 -> N1 in my_rel
N0 -> N1 和N0 -> N1 not in iden
iden 中, my_rel
不是子集,事實仍然成立。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.