在以下合金模型中:
sig Family{
father: one Member,
mother: one Member,
daughter: set Member,
son: set Member
}
sig Member{}
fact {
all m:Member | one m.~(father+mother+daughter+son)
(none->none) = (mother & son) + (daughter & son) +(father & mother) + (father & daughter) + (father & son) + (mother & daughter)
}
pred show(){}
run show for 12 but exactly 2 Family, exactly 5 Member
son 和 daughter 关系在它们的约束意义上没有区别(至少据我所知)但是当我运行这个模型时,它给了我3个实例:它在两个家庭之间置换 son ,但它不会让女儿感到失望!为什么会这样?
PS: 当我为1个家庭尝试它时,分析仪不会区分儿子和女儿,但当我将家庭增加到2或3时,歧视就会发生!