mirror of
https://github.com/Z3Prover/z3
synced 2025-06-02 20:31:21 +00:00
parent
9c9ce0b920
commit
bb1fe358c1
1 changed files with 6 additions and 7 deletions
|
@ -329,7 +329,6 @@ namespace smt {
|
||||||
template<typename Ext>
|
template<typename Ext>
|
||||||
bool theory_utvpi<Ext>::internalize_atom(app * n, bool) {
|
bool theory_utvpi<Ext>::internalize_atom(app * n, bool) {
|
||||||
context & ctx = get_context();
|
context & ctx = get_context();
|
||||||
std::cout << mk_pp(n, ctx.get_manager()) << "\n";
|
|
||||||
if (!a.is_le(n) && !a.is_ge(n) && !a.is_lt(n) && !a.is_gt(n)) {
|
if (!a.is_le(n) && !a.is_ge(n) && !a.is_lt(n) && !a.is_gt(n)) {
|
||||||
found_non_utvpi_expr(n);
|
found_non_utvpi_expr(n);
|
||||||
return false;
|
return false;
|
||||||
|
@ -351,20 +350,20 @@ namespace smt {
|
||||||
coeffs coeffs;
|
coeffs coeffs;
|
||||||
mk_coeffs(m_test.get_linearization(), coeffs, w);
|
mk_coeffs(m_test.get_linearization(), coeffs, w);
|
||||||
|
|
||||||
bool_var bv = ctx.mk_bool_var(n);
|
|
||||||
ctx.set_var_theory(bv, get_id());
|
|
||||||
literal l(bv);
|
|
||||||
|
|
||||||
|
|
||||||
if (coeffs.empty()) {
|
if (coeffs.empty()) {
|
||||||
throw default_exception("utvi formulas require pre-processing and dont work with quantifiers");
|
throw default_exception("utvi formulas require pre-processing and dont work with quantifiers");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool_var bv = ctx.mk_bool_var(n);
|
||||||
|
ctx.set_var_theory(bv, get_id());
|
||||||
|
literal l(bv);
|
||||||
|
m_bool_var2atom.insert(bv, m_atoms.size());
|
||||||
|
|
||||||
numeral w1 = mk_weight(a.is_real(e1), is_strict, w);
|
numeral w1 = mk_weight(a.is_real(e1), is_strict, w);
|
||||||
edge_id pos = add_ineq(coeffs, w1, l);
|
edge_id pos = add_ineq(coeffs, w1, l);
|
||||||
negate(coeffs, w);
|
negate(coeffs, w);
|
||||||
numeral w2 = mk_weight(a.is_real(e1), !is_strict, w);
|
numeral w2 = mk_weight(a.is_real(e1), !is_strict, w);
|
||||||
edge_id neg = add_ineq(coeffs, w2, ~l);
|
edge_id neg = add_ineq(coeffs, w2, ~l);
|
||||||
m_bool_var2atom.insert(bv, m_atoms.size());
|
|
||||||
m_atoms.push_back(atom(bv, pos, neg));
|
m_atoms.push_back(atom(bv, pos, neg));
|
||||||
|
|
||||||
TRACE("utvpi",
|
TRACE("utvpi",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue