@@ -707,15 +707,14 @@ namespace nlsat {
707
707
m_result = nullptr ;
708
708
}
709
709
710
+
710
711
void add_root_literal (atom::kind k, var y, unsigned i, poly * p) {
711
712
polynomial_ref pr (p, m_pm);
712
713
TRACE (" nlsat_explain" ,
713
714
display (tout << " x" << y << " " << k << " [" << i << " ](" , pr); tout << " )\n " ;);
714
-
715
+
715
716
if (!mk_linear_root (k, y, i, p) &&
716
- // !mk_plinear_root(k, y, i, p) &&
717
- !mk_quadratic_root (k, y, i, p)&&
718
- true ) {
717
+ !mk_quadratic_root (k, y, i, p)) {
719
718
bool_var b = m_solver.mk_root_atom (k, y, i, p);
720
719
literal l (b, true );
721
720
TRACE (" nlsat_explain" , tout << " adding literal\n " ; display (tout, l); tout << " \n " ;);
@@ -726,7 +725,7 @@ namespace nlsat {
726
725
/* *
727
726
* literal can be expressed using a linear ineq_atom
728
727
*/
729
- bool mk_linear_root (atom::kind k, var y, unsigned i, poly * p) {
728
+ bool mk_linear_root (atom::kind k, var y, unsigned i, poly * p) {
730
729
scoped_mpz c (m_pm.m ());
731
730
if (m_pm.degree (p, y) == 1 && m_pm.const_coeff (p, y, 1 , c)) {
732
731
SASSERT (!m_pm.m ().is_zero (c));
@@ -949,11 +948,9 @@ namespace nlsat {
949
948
}
950
949
951
950
if (!lower_inf) {
952
- TRACE (" nlsat_explain" , tout << " lower_inf: " << lower_inf << " upper_inf: " << upper_inf << " " << p_lower << " \n " ;);
953
951
add_root_literal (m_full_dimensional ? atom::ROOT_GE : atom::ROOT_GT, y, i_lower, p_lower);
954
952
}
955
953
if (!upper_inf) {
956
- TRACE (" nlsat_explain" , tout << " lower_inf: " << lower_inf << " upper_inf: " << upper_inf << " " << p_upper << " \n " ;);
957
954
add_root_literal (m_full_dimensional ? atom::ROOT_LE : atom::ROOT_LT, y, i_upper, p_upper);
958
955
}
959
956
}
@@ -1475,7 +1472,11 @@ namespace nlsat {
1475
1472
void operator ()(unsigned num, literal const * ls, scoped_literal_vector & result) {
1476
1473
SASSERT (check_already_added ());
1477
1474
SASSERT (num > 0 );
1478
- TRACE (" nlsat_explain" , tout << " [explain] set of literals is infeasible in the current interpretation\n " ; display (tout, num, ls) << " \n " ;);
1475
+ TRACE (" nlsat_explain" ,
1476
+ tout << " [explain] set of literals is infeasible in the current interpretation\n " ;
1477
+ display (tout, num, ls) << " \n " ;
1478
+ m_assignment.display (tout);
1479
+ );
1479
1480
m_result = &result;
1480
1481
process (num, ls);
1481
1482
reset_already_added ();
0 commit comments