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

Support for unconstrained decision variables in rustsat #704

Open
Shikhar-Srivastava-16 opened this issue Mar 8, 2025 · 1 comment · May be fixed by #703
Open

Support for unconstrained decision variables in rustsat #704

Shikhar-Srivastava-16 opened this issue Mar 8, 2025 · 1 comment · May be fixed by #703
Assignees
Labels
area::rules Related to rewrite rules area::sat Related to SAT rules, SAT solvers and the KisSAT solver interface. help wanted Extra attention is needed

Comments

@Shikhar-Srivastava-16
Copy link
Contributor

The adaptation process for building SAT models does not currently support unconstrained variables, such as:

find a : bool

As far as I can tell at the moment, there is no way to do this using only rustsat. Of course, it is possible there is a way to do so and I just haven't found it. If there is, please let me know so that I can update the codebase.

In case there is indeed no way to do this, we can accomplish this using a rewriting rule which accomplishes the following type of change:

for example, this:

find a : bool

becomes this:

find a : bool
such that (a \/ !a)
@Shikhar-Srivastava-16 Shikhar-Srivastava-16 added area::rules Related to rewrite rules area::sat Related to SAT rules, SAT solvers and the KisSAT solver interface. help wanted Extra attention is needed labels Mar 8, 2025
@Shikhar-Srivastava-16 Shikhar-Srivastava-16 self-assigned this Mar 8, 2025
@Shikhar-Srivastava-16 Shikhar-Srivastava-16 linked a pull request Mar 8, 2025 that will close this issue
@niklasdewally
Copy link
Collaborator

niklasdewally commented Mar 8, 2025

One possibility: you call RustSAT for a single solution, then for each DontCare or unconstrained variable in the output, you iterate through the possible assignments for those variables, giving the user a new solution for each one.

Once you've exhausted those, then you run rustsat again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::rules Related to rewrite rules area::sat Related to SAT rules, SAT solvers and the KisSAT solver interface. help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants