Replies: 1 comment
-
Hi, Clark, Cesare, and I have been discussing shortly this topic. We moved the issue into a discussion, to better reflect the current status of the topic. We also believe it would be nice to briefly discuss with a zoom meeting. Could you send a mail to Cesare, Clark, and Pascal with all the relevant people in cc so that we can proceed finding a suitable time? We generally meet on Wednesdays 17:00 CET (not the next two weeks). Thanks and best, Pascal |
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
-
Motivation
Some applications of SMT solvers focus on satisfiable rather than unsatisfiable problems. However, there is no standard way of defining preference rules that would guide the decisions. Sometimes, good decision strategies are application-specific, and such guidance might greatly benefit the search for satisfying assignments.
This year, I submitted planning benchmarks that are relevant to this issue here. These benchmarks were originally solved with some guidance of the decisions, but the submitted benchmarks lack this setting. As a result, none of these benchmarks was solved during this year's SMT-COMP, while originally they were solved quite easily in most cases.
Proposal
Add the following commands to the standard:
These introduce two orthogonal approaches to guide the decision heuristics:
Such a heuristic configuration is somewhat similar to the Mathsat5 command
msat_add_preferred_for_branching
, but (Boolean) variables and values are not separated there.My proposal is more general. It also allows to configure a list of values for a given variable without affecting the selection of candidates for decisions.
Also, the proposal is not restricted to Boolean variables.
Semantics
Appends variable
<var>
to the list of variables preferred for selecting a candidate for decisions.When the SMT solver arrives at a point of a decision, it must first try the variables from the list, starting from the first position. Only if none of the variables is viable for the decision (i.e. they are already assigned to a value), the solver is allowed to select a variable on its own.
Variable
<var>
must be declared before issuing this command within the current context of the assertion stack. The lifetime of variable<var>
within the list of preferred variables corresponds to the lifetime of the variable itself (i.e. to the preceding commanddeclare-fun
), also respecting the option:global-declarations
.Issuing the command for the second time for the same variable within the current context must result in an error (the same way as declaring a variable twice).
The command is not treated separately from the declarations wrt. the assertion stack because one would usually not want to do sth. like
because both results must be the same, only the models may differ.
However, if one is indeed interested in retrieving such different models, we can provide an option that would allow such behavior.
Variable
<var>
is not restricted to Boolean variables. SMT solvers that would implement also the cases with non-Boolean variables (e.g. MCSat solvers) must ensure that the preference of these variables within decisions is obeyed as well. In the case of CDCL solvers, this might be more difficult to implement.Clears the list of preferred variables regardless of the assertion stack.
This is also issued by
(reset-assertions)
and(reset)
.Sets the list of preferred candidate values for decisions for variable
<var>
to(<value>*)
. The values must not repeat, otherwise it is an error.When the SMT solver arrives at a point of a decision to variable
<var>
, it must first try the values from the list, starting from the first position. Only if none of the values is viable for the decision, the solver is allowed to select a value on its own.The command does not affect the selection of a candidate variable for decisions.
It overwrites any previous list of preferred values for the variable. Hence, it is not possible to consecutively append multiple such values - but I do not consider such cases useful.
Issuing
(set-preferred-values <var> ())
clears the preferred values for variable<var>
.Note that in the case of Boolean variables, for example
(set-preferred-values a (true false))
is equivalent to(set-preferred-values a (true))
.The command is independent of the assertion stack.
Clears the list of preferred values of all variables.
This is also issued by
(reset)
.Boolean example
The response must be
Note that the preferred value for
b
was ignored because it was not the subject of a decision.This would not be possible to achieve using e.g.
check-sat-assuming
.If the order of the variables was reversed, the values would have to be
((a false) (b true))
.Arithmetic example
The response must be
Beta Was this translation helpful? Give feedback.
All reactions