合金中的关系联接和算子 [英] Relational Join and Operators in Alloy
问题描述
我总体上一直在研究Alloy,并发现了一些需要清除的概念.
I've been going over Alloy in general and found some concepts that I need some clearance on.
首先是. (不要加入).对于简单的示例,我了解了它的工作原理,但在这样的情况下:
First of all, the . (Dot Join). I got how it works for trivial examples but in a case like this:
sig B {}
sig A {
rel: B -> C
}
sig C {
rel1: B -> A
}
rel = {(a1,b1,c1), (a2,b2,c2)}
rel1 = {(c1,b1,a1),(c2,b2,a2)}
rel.rel1 = {(a1,b1,b1,a1),(a2,b2,b2,a2)}
rel1.rel = {(c1,b1,b1,c1),(c2,b2,b2,c2)
我没有得到rel.rel1或rel1.rel的结果. 有人可以解释一下它的工作原理吗?
I don't get the result of rel.rel1 or rel1.rel. Can somebody explain how it works please?
我也遇到< ;:和>:运算符的问题.
I am also having problems with <: and >: operators.
谢谢.
推荐答案
这本书中有许多示例对此进行了详细说明(软件抽象,麻省理工学院出版社,2012年).
This is explained in detail with lots of examples in my book (Software Abstractions, MIT Press, 2012).
此外,您可能会发现旧版幻灯片说话有帮助:
Also, you might find these slides from an old talk helpful:
从幻灯片80开始,有各种点连接的扩展示例.
From slide 80 on, there's an extended example of various dot joins.
这篇关于合金中的关系联接和算子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!