run command scope in alloy

依然范特西╮ 提交于 2019-12-11 11:34:19

问题


In alloy consider

sig Queue{ link : Queue, elem: Int }

consider that I have some predicate predicate-1, How would I define scope when I run predicate-1 for Queue <=1 , int ={-3,-2,0,2}. I have not listed the predicate here

run predicate-1 for 1 Queue, int scope here

don't know what would be the syntax for int scope


回答1:


The syntax is

run predicate1 for 1 Queue, 3 Int

The scope for integers is always a bitwidth, so you can't specify that the Int set contains exactly {-3. -2. 0. 2}; you can only specify a bitwidth, and all integers within that bitwidth will be used. In my example above, the Int set will contain all integers from -4 to 3.



来源:https://stackoverflow.com/questions/14665629/run-command-scope-in-alloy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!