Example #1
0
void Solver::printClauseUsefulnessStats()
{
    vec<Clause*> backupLearnts;
    backupLearnts = learnts;
    sort(backupLearnts, gainedSorter());

    fprintf(stderr, "c Cleaning clauses (clean number %d). Current Clause usefulness stats:\n", cleanNo);
    for(int i = 0; i < backupLearnts.size(); i++) {
        Clause* c = backupLearnts[i];
        dumpFile << "INSERT INTO clean_data(runID, cleanno, idx, glue, conflicts, props, bogoprops, decisions) VALUES("
        << runID << " ,"
        << cleanNo << " ,"
        << c->getIndex() << ","
        << c->activity()  << ","
        << c->getNumConflicted()  << ","
        << c->getGainedProps()  << ","
        << c->getGainedBogoProps() << ","
        << c->getGainedDecisions()
        << ");" << std::endl;

        //c->clearStats();
    }
    fprintf(stderr, "c End of this round of database cleaning\n");
    cleanNo++;
    dumpFile << "INSERT INTO clean_run(runID, cleanno, time) VALUES("
    << runID << ","
    << cleanNo << ","
    << conflicts << ");" << std::endl;
}
Example #2
0
inline void Solver::claBumpActivity(Clause& c) {
	if ((c.activity() += cla_inc) > 1e20) {
		// Rescale:
		for (int i = 0; i < learnts.size(); i++)
			ca[learnts[i]].activity() *= 1e-20;
		cla_inc *= 1e-20;
	}
}