3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-17 08:42:15 +00:00

add API for setting variable activity

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-02-15 12:05:24 -08:00
parent e4c6dcd84c
commit 89bf2d4368
22 changed files with 125 additions and 1 deletions

View file

@ -341,6 +341,15 @@ public:
return result;
}
void set_activity(expr* var, double activity) override {
m.is_not(var, var);
sat::bool_var v = m_map.to_bool_var(var);
if (v == sat::null_bool_var) {
throw default_exception("literal does not correspond to a Boolean variable");
}
m_solver.set_activity(v, activity);
}
proof * get_proof() override {
UNREACHABLE();
return nullptr;