排序谓词是不可满足的
Ordering predicate is unsatisfiable
对于这个 alloy 模型的 ff_next
中的排序谓词的第一个分支,我似乎有些不明白。
open util/ordering[Exposure]
open util/ordering[Tile]
open util/ordering[Point]
sig Exposure {}
sig Tile {}
sig Point {
ex: one Exposure,
tl: one Tile
} fact {
// Uncommenting the line below makes the model unsatisfiable
// Point.ex = Exposure
Point.tl = Tile
}
pred ff_next[p, p': Point] {
(p.tl = last) => (p'.ex = next[p.ex] and p'.tl = first)
else (p'.ex = p.ex and p'.tl = next[p.tl])
}
fact ff_ordering {
first.ex = first
first.tl = first
all p: Point - last | ff_next[p, next[p]]
}
run {}
这里的直觉是我有很多次曝光,我想在多个平铺位置执行每一次曝光。考虑制作全景图像然后将它们拼接在一起,但是使用不同的相机设置多次这样做。
注释掉注释掉的第一个实例是这样的:
这相当于一次曝光通过全景图,然后将其他曝光放在地板上。
问题似乎是 ff_next
中 =>
之后的第一个分支,但我不明白哪里出了问题。该分支永远不会满足,这将移动到下一个曝光和全景图的开始。如果我取消注释 Point.ex = Exposure
行,模型将变得无法满足,因为它需要那个分支。
关于为什么该分支不可满足的任何帮助?
您似乎在尝试表达 "every tile must correspond to point with the current exposure before we move to the next exposure." 这个问题是 ordering
的一个主要缺陷:它强制签名是准确的。如果你写
run {} for 6 but 3 Tile, 2 Exposure
然后按预期工作。只有 #Point = #Exposure * #Tile
时的模型。如果这对您来说是个问题,您可以编写自己的简化版本 ordering
。
对于这个 alloy 模型的 ff_next
中的排序谓词的第一个分支,我似乎有些不明白。
open util/ordering[Exposure]
open util/ordering[Tile]
open util/ordering[Point]
sig Exposure {}
sig Tile {}
sig Point {
ex: one Exposure,
tl: one Tile
} fact {
// Uncommenting the line below makes the model unsatisfiable
// Point.ex = Exposure
Point.tl = Tile
}
pred ff_next[p, p': Point] {
(p.tl = last) => (p'.ex = next[p.ex] and p'.tl = first)
else (p'.ex = p.ex and p'.tl = next[p.tl])
}
fact ff_ordering {
first.ex = first
first.tl = first
all p: Point - last | ff_next[p, next[p]]
}
run {}
这里的直觉是我有很多次曝光,我想在多个平铺位置执行每一次曝光。考虑制作全景图像然后将它们拼接在一起,但是使用不同的相机设置多次这样做。
注释掉注释掉的第一个实例是这样的:
这相当于一次曝光通过全景图,然后将其他曝光放在地板上。
问题似乎是 ff_next
中 =>
之后的第一个分支,但我不明白哪里出了问题。该分支永远不会满足,这将移动到下一个曝光和全景图的开始。如果我取消注释 Point.ex = Exposure
行,模型将变得无法满足,因为它需要那个分支。
关于为什么该分支不可满足的任何帮助?
您似乎在尝试表达 "every tile must correspond to point with the current exposure before we move to the next exposure." 这个问题是 ordering
的一个主要缺陷:它强制签名是准确的。如果你写
run {} for 6 but 3 Tile, 2 Exposure
然后按预期工作。只有 #Point = #Exposure * #Tile
时的模型。如果这对您来说是个问题,您可以编写自己的简化版本 ordering
。