mirror of https://github.com/YosysHQ/abc.git
added callbacks to bmc3 and sat solver
This commit is contained in:
parent
245532cad1
commit
bacc1bc12c
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Reference in New Issue