3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-09 16:55:47 +00:00

filter out terms that are not solved

This commit is contained in:
Nikolaj Bjorner 2025-04-30 09:40:45 -07:00
parent f89e133d52
commit dd211bade9
2 changed files with 8 additions and 5 deletions

View file

@ -95,10 +95,11 @@ extern "C"
obj_map<ast, ast*> &map_z3 = to_ast_map_ref(map);
for (auto& kv : emap) {
m.inc_ref(kv.m_key);
m.inc_ref(kv.m_value);
map_z3.insert(kv.m_key, kv.m_value);
for (auto& [k,v] : emap) {
SASSERT(v);
m.inc_ref(k);
m.inc_ref(v);
map_z3.insert(k, v);
}
return of_expr (result);

View file

@ -995,9 +995,11 @@ extern "C" {
_terms.reset();
_guards.reset();
for (solver::solution const& s : solutions) {
if (!s.term)
continue;
_vars.push_back(s.var);
_terms.push_back(s.term);
_guards.push_back(s.guard);
_guards.push_back(s.guard ? s.guard : m.mk_true());
}
Z3_CATCH;
}