From 2340d279bd7f1d53f12a2e5b0913d30d9aa98220 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 15 Jun 2014 22:58:25 -0700 Subject: Adding support of multi-output problems in &splitprove. --- src/proof/cec/cecSplit.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src/proof/cec/cecSplit.c') diff --git a/src/proof/cec/cecSplit.c b/src/proof/cec/cecSplit.c index 5279570e..ece365bc 100644 --- a/src/proof/cec/cecSplit.c +++ b/src/proof/cec/cecSplit.c @@ -558,7 +558,7 @@ void * Cec_GiaSplitWorkerThread( void * pArg ) assert( 0 ); return NULL; } -int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int LookAhead, int fVerbose, int fVeryVerbose ) +int Cec_GiaSplitTestInt( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int LookAhead, int fVerbose, int fVeryVerbose ) { abctime clkTotal = Abc_Clock(); Par_ThData_t ThData[PAR_THR_MAX]; @@ -721,6 +721,36 @@ finish: fflush( stdout ); return RetValue; } +int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int LookAhead, int fVerbose, int fVeryVerbose ) +{ + Abc_Cex_t * pCex = NULL; + Gia_Man_t * pOne; + Gia_Obj_t * pObj; + int i, RetValue1, fOneUndef = 0, RetValue = -1; + Abc_CexFreeP( &p->pCexComb ); + Gia_ManForEachPo( p, pObj, i ) + { + pOne = Gia_ManDupOutputGroup( p, i, i+1 ); + if ( fVerbose ) + printf( "\nSolving output %d:\n", i ); + RetValue1 = Cec_GiaSplitTestInt( pOne, nProcs, nTimeOut, nIterMax, LookAhead, fVerbose, fVeryVerbose ); + Gia_ManStop( pOne ); + // collect the result + if ( RetValue1 == 0 && RetValue == -1 ) + { + pCex = pOne->pCexComb; pOne->pCexComb = NULL; + pCex->iPo = i; + RetValue = 0; + } + if ( RetValue1 == -1 ) + fOneUndef = 1; + } + if ( RetValue == -1 ) + RetValue = fOneUndef ? -1 : 1; + else + p->pCexComb = pCex; + return RetValue; +} //////////////////////////////////////////////////////////////////////// /// END OF FILE /// -- cgit v1.2.3