找不到名字"div"...嗯?为什么?

The name "div" cannot be found ... Huh? Why?

在这个模块中我使用 Alloy "div":

module test

one sig Test {
     t: Int
} {
   t = div[4,2]
}

run {}

执行效果很好。

我创建了另一个模块,它使用了第一个模块:

module hope

open test

sig A {}

run {}

执行会导致以下错误消息:

The name "div" cannot be found.

为什么我会收到错误消息?如何解决?

这是一个已知错误,有一个简单的解决方法。您需要在第一个模型中显式导入 util/integer 模块。

Alloy built-in integer math functions don't work in imported files