void MCBModule<Settings>::updateModel() const { clearModel(); if (solverState() == SAT || (solverState() != UNSAT && appliedPreprocessing())) { getBackendsModel(); mModel.update(mAssignments); mAssignments.clear(); } }
void CoCoAGBModule<Settings>::updateModel() const { mModel.clear(); if( solverState() == Answer::SAT ) { // Your code. } }
void CubeLIAModule<Settings>::updateModel() const { if( !mModelComputed && !mModelUpdated ) { clearModel(); if( solverState() != UNSAT ) { getBackendsModel(); } mModelUpdated = true; } }
Answer CNFerModule::checkCore() { auto receivedSubformula = firstUncheckedReceivedSubformula(); while( receivedSubformula != rReceivedFormula().end() ) { /* * Add the currently considered formula of the received constraint as clauses * to the passed formula. */ FormulaT formulaToAssertInCnf = receivedSubformula->formula().toCNF( true, true, true ); if( formulaToAssertInCnf.getType() == TRUE ) { // No need to add it. } else if( formulaToAssertInCnf.getType() == FALSE ) { receivedFormulasAsInfeasibleSubset( receivedSubformula ); return UNSAT; } else { if( formulaToAssertInCnf.getType() == AND ) { for( const FormulaT& subFormula : formulaToAssertInCnf.subformulas() ) { #ifdef SMTRAT_DEVOPTION_Statistics mpStatistics->addClauseOfSize( subFormula.size() ); #endif addSubformulaToPassedFormula( subFormula, receivedSubformula->formula() ); } } else { #ifdef SMTRAT_DEVOPTION_Statistics mpStatistics->addClauseOfSize( receivedSubformula->formula().size() ); #endif addSubformulaToPassedFormula( formulaToAssertInCnf, receivedSubformula->formula() ); } } ++receivedSubformula; } //No given formulas is SAT but only if no other run was before if( rPassedFormula().empty() && solverState() == UNKNOWN ) { return SAT; } else { #ifdef SMTRAT_DEVOPTION_Statistics carl::Variables avars; rPassedFormula().arithmeticVars( avars ); mpStatistics->nrOfArithVariables() = avars.size(); carl::Variables bvars; rPassedFormula().booleanVars( bvars ); mpStatistics->nrOfBoolVariables() = bvars.size(); #endif Answer a = runBackends(); if( a == UNSAT ) { getInfeasibleSubsets(); } return a; } }