Closed pkriens closed 3 years ago
That's because #Int
is always 0
! (mind blowing)
In Alloy, instead of specifying individual int atoms, only a bitwidth is specified. When the specified bitwidth is b
, the Int
set becomes . The cardinality of that set is
.
#Int
is 2^b
, which is exactly 0
when integers wrap around, thus #Int > 0
is unsatisfiable#Int
is 2^b
, which clearly overflows, and so #Int > 0
is unsatisfiable#Int
, the evaluator will print out 0
and say that overflow happened.stupid of me ...
While playing with the Evaluator I noticed that
#Int = 0
. This seems to also have some effect on the model since:Does not provide an instance