The comment line tells us that an upper bound of size 3 was inferred for relation f1. By inspecting the Kodkod output it is possible to known exactly which are these three tuples : A0->A0, A1->A1 and A2->A2.
Expecting a similar upper bound should be inferred for relation f2, I introduce the following fact to the model
fact {
f2 in A0-> 0 + A1 -> 1 + A2 ->2
}
The expected upper bound should have only three tuples : A0->0, A1->1 and A2->2. To my surprise, when I execute the run command again the result was :
Instead of inferring an upper bound of size 3, Alloy inferred an upper bound that contains 48 tuples. Looking into the Kodkod output I discover that these tuples were exactly : A0 -> Int, A1 -> Int, A2 -> Int. In other words, in the presence of integer atoms, the upper bound was over approximated.
My questions are:
* Is this a desired behavior of the Alloy Analyzer ? Why the component responsible of simplifying the bounds should ?
* Is it possible that the bound simplifier should be more accurate ?