@@ -623,13 +623,32 @@ bool LASolver::setStatus( LASolverStatus s )
623623 return getStatus ( );
624624}
625625
626- bool LASolver::wouldDeduce (LABoundRef br) const {
627- LABound const & bound = boundStore[br];
626+ bool LASolver::wouldDeduce (PtAsgn asgn) const {
627+ assert (status != INIT);
628+ assert (logic.isLeq (asgn.tr ));
629+ assert (not hasPolarity (asgn.tr ));
630+ LVRef v = getVarForLeq (asgn.tr );
631+ LABoundRef boundRef = asgn.sgn == l_False ? getBoundRefPair (asgn.tr ).neg : getBoundRefPair (asgn.tr ).pos ;
632+ LABound const & bound = boundStore[boundRef];
633+
634+ auto searchForUnassignedBound = [this , &bound, &v](BoundT type) {
635+ for (int it = bound.getIdx ().x - 1 ; it >= 0 ; -- it) {
636+ LABoundRef candidateRef = boundStore.getBoundByIdx (v, it);
637+ LABound const & candidate = boundStore[candidateRef];
638+ if (candidate.getType () != type) {
639+ continue ;
640+ } else if (not hasPolarity (getAsgnByBound (candidateRef).tr )) {
641+ return true ;
642+ }
643+ }
644+ return false ;
645+ };
646+
628647 if (bound.getType () == bound_l) {
629- for (int it = bound.getIdx ().x - 1 ; it >= 0 ; -- it) {
630- LABoundRef propagatedBoundRef = boundStore.getBoundByIdx (v, it)
631- }
648+ return searchForUnassignedBound (bound_u);
632649 }
650+ assert (bound.getType () == bound_u);
651+ return searchForUnassignedBound (bound_l);
633652}
634653
635654void LASolver::getSimpleDeductions (LVRef v, LABoundRef br)
0 commit comments