Closed kaiyuanw closed 5 years ago
I don't have Alloy installed right now, so I can't diagnose, but you certainly need to add an int bound (see #71) which might help with the issue that you are having.
It does not solve the problem because Alloy 5 simplifies the formula to trivially false and thus no real constraint solving is invoked. This is different from Alloy 4.
The problem is this:
#priority = #pid + 1
In versions after 4.2, +
is always treated as union. Hence, you want to rewrite that as
#priority = plus[#pid, 1]
Another problem is integer overflows. If in an instance of your model you expect to have 4 priority
atoms and 3 pid
atoms, and preventing integer overflows is turned on (Options -> Prevent overflows: Yes
), then you must specify an integer bitwidth that is large enough so that 3+1
doesn't overflow (concretely, you need at least 4 bits, i.e., your run
scope must include 4 int
). Alternatively, you can turn integer overflow checking off.
I find that for the following
peterson.als
modelAlloy 5 reports that all commands are trivially false. However, Alloy 4.2 reports differently. For some commands (TwoRun, ThreeRun and NotStuck), Alloy 5 and Alloy 4.2 gives different satisfiability result.
The Alloy 5 I use is built using this repo at head 30b41ae8125f69657f118167f34dc1d675ed31db
The Alloy 4.2 I use is downloaded from http://alloytools.org/download/alloy4.2_2015-02-22.jar
Can someone check out why this is the case?
Thanks!