3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

simplify getting explanations functionality

Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
Lev 2018-09-26 10:20:28 -07:00 committed by Lev Nachmanson
parent da700c7cff
commit 51e08188f5
4 changed files with 68 additions and 57 deletions

View file

@ -6,16 +6,16 @@
#include "util/lp/mon_eq.h"
namespace nra {
bool check_assignment(mon_eq const& m, variable_map_type & vars) {
rational r1 = vars[m.m_v];
rational r1 = vars[m.var()];
if (r1.is_zero()) {
for (auto w : m.m_vs) {
for (auto w : m) {
if (vars[w].is_zero())
return true;
}
return false;
}
rational r2(1);
for (auto w : m.m_vs) {
for (auto w : m) {
r2 *= vars[w];
}
return r1 == r2;