Skip to content
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

cnf export does not handle mutuable signatures and fields #183

Open
goens opened this issue Jun 11, 2022 · 2 comments
Open

cnf export does not handle mutuable signatures and fields #183

goens opened this issue Jun 11, 2022 · 2 comments

Comments

@goens
Copy link

goens commented Jun 11, 2022

I was exporting some models that were taking a long time to solve to CNF to check with an external solver. I was surprised when, for models I knew instances existed, the solver returned that they were unsatisfiable.

I then noticed that the exported CNF instances are identical independent of the number of steps I give them.

A simple example to reproduce:

sig B {}
sig A{ var b : set B }

fact init { no b }
pred step { some bval : B | bval not in A.b and A.b' = A.b + bval }
pred end { A.b = B}
fact stepsuntilend { step until end and eventually end }

run {} for exactly 3 A,  exactly 2 B, 3 steps
run {} for exactly 3 A,  exactly 2 B, 1 steps

The first one will find an instance just fine, while the second one won't (as 1 step is not enough). However, exporting to CNF will produce the same SAT instance (corresponding to one step, I presume).

@goens
Copy link
Author

goens commented Jun 11, 2022

By the way, this issue does not show up when exporting to Kodkod.

@grayswandyr
Copy link
Contributor

Pinging @nmacedo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants