-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate models when enumerating #142
Comments
Can you provide an example where this is happening? |
I'll work on minimizing this to a small example that I can share. |
So the following Alloy program causes the problem, but I couldn't trigger the problem from the GUI interface:
These are the instances that get returned when iterating over the answers:
I'll work on minimizing and sharing the offending Scala program. |
I see, that happens because that problem is trivially satisfiable, Alloy doesn't even launch the underlying solver where symmetry breaking is implemented, it just iterates over all possible assignments of atoms. (Without going into details, internally those instances are not the same, they have different atoms assigned, but Alloy has a renaming procedure to paint atoms in a more friendly way that has tricky results when symmetry breaking is not performed.) |
This is also happening in a fairly non-trivial model. This is just the program that that reduced down to. Is there an easy trick to ensure the solver will be used (to prevent the minimizer from getting rid of too much)? |
Ok, that's stranger since models quickly become non-trivial. The easiest way to identify a trivial execution is that they always report "0 vars" in the log. |
I reminimized to a non-trivial model, but the result was only slightly different:
|
I just added a full reproducer for this here: https://github.com/edmcman/alloy-issue142 |
@nmacedo what do we do with this issue? (I also noticed that using the API returned a lot of identical solutions) |
I confirm that this is still an issue, but I still haven't been able to fix it. It seems to have something to do with how the remainder of a non-abstract signature with sub-signatures is encoded. Here's an even smaller example that just returns 2 isomorphic solutions: sig A {}
sig B extends A {}
run {some A-B and some B} for 2 This issue was already present in previous releases (at least Alloy 5). |
I am using Alloy to enumerate models, and it is returning the same model more than once. That is, if I write the models to XML files, the resulting files are identical. Is this a bug?
It's easy for me to work around this behavior, but I am a little surprised by it.
The text was updated successfully, but these errors were encountered: