summaryrefslogtreecommitdiffstats
path: root/src/proof/cec/cecSplit.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-06-15 22:58:25 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-06-15 22:58:25 -0700
commit2340d279bd7f1d53f12a2e5b0913d30d9aa98220 (patch)
tree709fb4ce7d7713336e0f1a83db8567db45ed3506 /src/proof/cec/cecSplit.c
parent3d3384865996b7ff1453c7e41949dc56dab0a7e0 (diff)
downloadabc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.tar.gz
abc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.tar.bz2
abc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.zip
Adding support of multi-output problems in &splitprove.
Diffstat (limited to 'src/proof/cec/cecSplit.c')
-rw-r--r--src/proof/cec/cecSplit.c32
1 files changed, 31 insertions, 1 deletions
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 ///