summaryrefslogtreecommitdiffstats
path: root/src/sat/bmc
diff options
context:
space:
mode:
authorYen-Sheng Ho <ysho@berkeley.edu>2017-03-19 12:41:06 -0700
committerYen-Sheng Ho <ysho@berkeley.edu>2017-03-19 12:41:06 -0700
commit51fbf37cb42951c668e9fa4df9ddd99897a6fb4d (patch)
tree5ae3b459160d855e2234351c3796cd7f56f3516e /src/sat/bmc
parent3bddf938765c61f67d98451679670434783a7845 (diff)
downloadabc-51fbf37cb42951c668e9fa4df9ddd99897a6fb4d.tar.gz
abc-51fbf37cb42951c668e9fa4df9ddd99897a6fb4d.tar.bz2
abc-51fbf37cb42951c668e9fa4df9ddd99897a6fb4d.zip
%pdra: working on bmc3
Diffstat (limited to 'src/sat/bmc')
-rw-r--r--src/sat/bmc/bmc.h2
-rw-r--r--src/sat/bmc/bmcBmc3.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/sat/bmc/bmc.h b/src/sat/bmc/bmc.h
index a3f353c2..22ae765d 100644
--- a/src/sat/bmc/bmc.h
+++ b/src/sat/bmc/bmc.h
@@ -73,6 +73,8 @@ struct Saig_ParBmc_t_
int nDropOuts; // the number of dropped outputs
abctime timeLastSolved; // the time when the last output was solved
int(*pFuncOnFail)(int,Abc_Cex_t*); // called for a failed output in MO mode
+ int RunId; // BMC id in this run
+ int(*pFuncStop)(int); // callback to terminate
};
diff --git a/src/sat/bmc/bmcBmc3.c b/src/sat/bmc/bmcBmc3.c
index ccd0bb90..34fdf45f 100644
--- a/src/sat/bmc/bmcBmc3.c
+++ b/src/sat/bmc/bmcBmc3.c
@@ -1533,6 +1533,12 @@ clkOther += Abc_Clock() - clk2;
Abc_Print( 1, "Reached timeout (%d seconds).\n", pPars->nTimeOut );
goto finish;
}
+ if ( p->pPars->pFuncStop && p->pPars->pFuncStop(p->pPars->RunId) )
+ {
+ if ( !pPars->fSilent )
+ Abc_Print( 1, "Bmc3 got callbacks.\n" );
+ goto finish;
+ }
// skip solved outputs
if ( p->vCexes && Vec_PtrEntry(p->vCexes, i) )
continue;