Replies: 1 comment
-
There's no way around calling If you know a priori all the concrete values you care about, you can do: Then get a model. It has a=2, for example. Then assert on the same solver a != 2. Continue until it's unsat. You'll do n+1 queries, where n is the number of concrete values of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
May I ask what could be the fastest way to evaluate a constraint? The scenario I encountered is that, assuming I have a constraint (say
C
) and a concrete value (say100
) of a symbol (saya
) inC
, and I want to evaluate whether the concrete value100
of the symbola
could make the constraintC
true or false, i.e., sat or unsat.Currently, my solution (using C++ APIs) is to encode the constraint
a == 100
intoC
and invokesolver.check()
to check the satisfiability of the new constraintC && (a == 100)
. Such a solution can work as intended but I found it's pretty slow---every time it needs to invokecheck()
to evaluate it. I have tried to find a faster way to do the evaluation but failed. Are there any other solutions that could make this evaluation faster, e.g., the one without calling thesolver.check()
?Thanks and look forward to your suggestions.
Best regards,
Haoxin
Beta Was this translation helpful? Give feedback.
All reactions