@@ -279,8 +279,9 @@ std::unique_ptr<Tableau::Polynomial> LASolver::expressionToLVarPoly(PTRef term)
279279
280280
281281//
282- // Get a possibly new LAVar for a PTRef term. We may assume that the term is of one of the following forms,
283- // where x is a real variable or ite, and p_i are products of a real variable or ite and a real constant
282+ // Registers an arithmetic Pterm (polynomial) with the solver.
283+ // We may assume that the term is of one of the following forms,
284+ // where x is a variable or ite, and p_i are products of a variable or ite and a constant
284285//
285286// (1) x
286287// (2a) (* x -1)
@@ -289,7 +290,8 @@ std::unique_ptr<Tableau::Polynomial> LASolver::expressionToLVarPoly(PTRef term)
289290// (4a) (* x -1) + p_1 + ... + p_n
290291// (4b) (* -1 x) + p_1 + ... + p_n
291292//
292- LVRef LASolver::exprToLVar (PTRef expr) {
293+ // Returns internalized reference for the term
294+ LVRef LASolver::registerArithmeticTerm (PTRef expr) {
293295 LVRef x = LVRef::Undef;
294296 if (laVarMapper.hasVar (expr)){
295297 x = getVarForTerm (expr);
@@ -345,7 +347,7 @@ void LASolver::declareAtom(PTRef leq_tr)
345347 // status = INCREMENT;
346348 assert ( status == SAT );
347349 PTRef term = logic.getPterm (leq_tr)[1 ];
348- exprToLVar (term); // MB: We need to build the representation, but we don't actually need the result
350+ registerArithmeticTerm (term);
349351 updateBound (leq_tr);
350352 }
351353 // DEBUG check
@@ -566,7 +568,7 @@ void LASolver::initSolver()
566568 PTRef term = leq_t [1 ];
567569
568570 // Ensure that all variables exists, build the polynomial, and update the occurrences.
569- exprToLVar (term); // MB: We need to build the representation, but we don't actually need the result
571+ registerArithmeticTerm (term);
570572
571573 // Assumes that the LRA variable has been already declared
572574 setBound (leq_tr);
0 commit comments