【问题标题】:The name "div" cannot be found ... Huh? Why?找不到名称“div”...嗯?为什么?
【发布时间】:2018-05-14 21:17:50
【问题描述】:

在这个模块中,我使用合金“div”:

module test

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

run {}

执行效果很好。

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

module hope

open test

sig A {}

run {}

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

找不到名称“div”。

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

【问题讨论】:

    标签: alloy


    【解决方案1】:

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

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

    【讨论】:

    • 啊!好的。谢谢@Loïc Gammaitoni
    猜你喜欢
    • 2017-08-24
    • 1970-01-01
    • 2018-09-13
    • 2012-04-25
    • 1970-01-01
    • 2013-02-20
    • 1970-01-01
    • 2016-10-08
    • 2013-11-06
    相关资源
    最近更新 更多