File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed
Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ void LASolver::addBound(PTRef leq_tr) {
3838 }();
3939
4040 int const tid = Idx (logic.getPterm (leq_tr).getId ());
41+ // Must be a new inequality
42+ assert (tid >= LeqToLABoundRefPair.size () or (LeqToLABoundRefPair[tid] == LABoundRefPair{LABoundRef_Undef, LABoundRef_Undef}));
4143 if (LeqToLABoundRefPair.size () <= tid) {
4244 LeqToLABoundRefPair.growTo (tid + 1 );
4345 }
@@ -52,18 +54,6 @@ void LASolver::addBound(PTRef leq_tr) {
5254 LABoundRefToLeqAsgn[br_neg_idx] = PtAsgn (leq_tr, l_False);
5355}
5456
55- void LASolver::updateBound (PTRef tr)
56- {
57- // If the bound already exists, do nothing.
58- int id = Idx (logic.getPterm (tr).getId ());
59-
60- if ((LeqToLABoundRefPair.size () > id) &&
61- !(LeqToLABoundRefPair[id] == LABoundRefPair{LABoundRef_Undef, LABoundRef_Undef})) {
62- return ;
63- }
64- addBound (tr);
65- }
66-
6757bool LASolver::isValid (PTRef tr)
6858{
6959 return logic.isLeq (tr); // MB: LA solver expects only inequalities in LEQ form!
@@ -278,12 +268,10 @@ void LASolver::declareAtom(PTRef leq_tr)
278268
279269 if (status != INIT)
280270 {
281- // Treat the PTRef as it is pushed on-the-fly
282- // status = INCREMENT;
283- assert ( status == SAT );
271+ assert (status == SAT);
284272 PTRef term = logic.getPterm (leq_tr)[1 ];
285273 registerArithmeticTerm (term);
286- updateBound (leq_tr);
274+ addBound (leq_tr);
287275 }
288276 // DEBUG check
289277 isProperLeq (leq_tr);
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ class LASolver : public TSolver {
9393 PTRef getVarPTRef (LVRef v) const { return laVarMapper.getVarPTRef (v); }
9494
9595 void addBound (PTRef leq_tr);
96- void updateBound (PTRef leq_tr);
9796 LVRef registerArithmeticTerm (PTRef expr); // Ensures this term and all variables in it has corresponding LVAR.
9897 // Returns the LAVar for the term.
9998 void storeExplanation (Simplex::Explanation && explanationBounds);
You can’t perform that action at this time.
0 commit comments