Commit bacc1bc1 by Yen-Sheng Ho

added callbacks to bmc3 and sat solver

parent 245532ca
......@@ -1416,6 +1416,8 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
p->pSat->nLearntRatio = p->pPars->nLearnedPerce;
p->pSat->nLearntMax = p->pSat->nLearntStart;
p->pSat->fNoRestarts = p->pPars->fNoRestarts;
p->pSat->RunId = p->pPars->RunId;
p->pSat->pFuncStop = p->pPars->pFuncStop;
if ( pPars->fSolveAll && p->vCexes == NULL )
p->vCexes = Vec_PtrStart( Saig_ManPoNum(pAig) );
if ( pPars->fVerbose )
......
......@@ -1956,6 +1956,8 @@ int sat_solver_solve_internal(sat_solver* s)
break;
if ( s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit )
break;
if ( s->pFuncStop && s->pFuncStop(s->RunId) )
break;
}
if (s->verbosity >= 1)
printf("==============================================================================\n");
......
......@@ -196,6 +196,10 @@ struct sat_solver_t
// CNF loading
void * pCnfMan; // external CNF manager
int(*pCnfFunc)(void * p, int); // external callback
// termination callback
int RunId; // SAT id in this run
int(*pFuncStop)(int); // callback to terminate
};
static inline clause * clause_read( sat_solver * s, cla h )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment