Commit 686d38d6 by Alan Mishchenko

Changes to enable C++ compilation after recent modifications.

parent 8acd4edd
...@@ -547,11 +547,11 @@ void Aig_ObjDomCompute( Aig_Sto_t * pSto, Aig_Obj_t * pObj ) ...@@ -547,11 +547,11 @@ void Aig_ObjDomCompute( Aig_Sto_t * pSto, Aig_Obj_t * pObj )
Vec_IntPush( pSto->vFans, iFanout>>1 ); Vec_IntPush( pSto->vFans, iFanout>>1 );
if ( Vec_IntSize(pSto->vFans) == 0 ) if ( Vec_IntSize(pSto->vFans) == 0 )
return; return;
vDoms0 = Vec_PtrEntry( pSto->vDoms, Vec_IntEntry(pSto->vFans, 0) ); vDoms0 = (Vec_Ptr_t *)Vec_PtrEntry( pSto->vDoms, Vec_IntEntry(pSto->vFans, 0) );
vDoms2 = Aig_ObjDomVecDup( pSto, vDoms0, 0 ); vDoms2 = Aig_ObjDomVecDup( pSto, vDoms0, 0 );
Vec_IntForEachEntryStart( pSto->vFans, iFanout, i, 1 ) Vec_IntForEachEntryStart( pSto->vFans, iFanout, i, 1 )
{ {
vDoms1 = Vec_PtrEntry( pSto->vDoms, iFanout ); vDoms1 = (Vec_Ptr_t *)Vec_PtrEntry( pSto->vDoms, iFanout );
vDoms2 = Aig_ObjDomMerge( pSto, vDomsT = vDoms2, vDoms1 ); vDoms2 = Aig_ObjDomMerge( pSto, vDomsT = vDoms2, vDoms1 );
Aig_ObjDomVecRecycle( pSto, vDomsT ); Aig_ObjDomVecRecycle( pSto, vDomsT );
} }
...@@ -662,11 +662,11 @@ Vec_Ptr_t * Aig_ObjDomCollect( Aig_Sto_t * pSto, Vec_Int_t * vCut ) ...@@ -662,11 +662,11 @@ Vec_Ptr_t * Aig_ObjDomCollect( Aig_Sto_t * pSto, Vec_Int_t * vCut )
{ {
Vec_Ptr_t * vDoms0, * vDoms1, * vDoms2; Vec_Ptr_t * vDoms0, * vDoms1, * vDoms2;
int i, ObjId; int i, ObjId;
vDoms0 = Vec_PtrEntry( pSto->vDoms, Vec_IntEntry(vCut, 0) ); vDoms0 = (Vec_Ptr_t *)Vec_PtrEntry( pSto->vDoms, Vec_IntEntry(vCut, 0) );
vDoms2 = Aig_ObjDomVecDup( pSto, vDoms0, 1 ); vDoms2 = Aig_ObjDomVecDup( pSto, vDoms0, 1 );
Vec_IntForEachEntryStart( vCut, ObjId, i, 1 ) Vec_IntForEachEntryStart( vCut, ObjId, i, 1 )
{ {
vDoms1 = Vec_PtrEntry( pSto->vDoms, ObjId ); vDoms1 = (Vec_Ptr_t *)Vec_PtrEntry( pSto->vDoms, ObjId );
if ( vDoms1 == NULL ) if ( vDoms1 == NULL )
continue; continue;
Aig_ObjDomUnion( pSto, vDoms2, vDoms1 ); Aig_ObjDomUnion( pSto, vDoms2, vDoms1 );
......
...@@ -87,7 +87,7 @@ DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, int TimeOut ) ...@@ -87,7 +87,7 @@ DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, int TimeOut )
{ {
if ( !Aig_ObjIsNode(pObj) ) if ( !Aig_ObjIsNode(pObj) )
continue; continue;
Cudd_RecursiveDeref( dd, pObj->pData ); Cudd_RecursiveDeref( dd, (DdNode *)pObj->pData );
} }
Vec_PtrFree( vNodes ); Vec_PtrFree( vNodes );
Cudd_Deref( bResult ); Cudd_Deref( bResult );
......
...@@ -95,7 +95,6 @@ DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarInde ...@@ -95,7 +95,6 @@ DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarInde
Abc_Cex_t * Llb_CoreDeriveCex( Llb_Img_t * p ) Abc_Cex_t * Llb_CoreDeriveCex( Llb_Img_t * p )
{ {
extern Abc_Cex_t * Ssw_SmlAllocCounterExample( int nRegs, int nRealPis, int nFrames ); extern Abc_Cex_t * Ssw_SmlAllocCounterExample( int nRegs, int nRealPis, int nFrames );
extern int Ssw_SmlFindOutputCounterExample( Aig_Man_t * pAig, Abc_Cex_t * p );
Abc_Cex_t * pCex; Abc_Cex_t * pCex;
Aig_Obj_t * pObj; Aig_Obj_t * pObj;
Vec_Ptr_t * vSupps, * vQuant0, * vQuant1; Vec_Ptr_t * vSupps, * vQuant0, * vQuant1;
...@@ -118,7 +117,7 @@ Abc_Cex_t * Llb_CoreDeriveCex( Llb_Img_t * p ) ...@@ -118,7 +117,7 @@ Abc_Cex_t * Llb_CoreDeriveCex( Llb_Img_t * p )
pCex->iPo = -1; pCex->iPo = -1;
// get the last cube // get the last cube
bOneCube = Cudd_bddIntersect( p->ddR, Vec_PtrEntryLast(p->vRings), p->ddR->bFunc ); Cudd_Ref( bOneCube ); bOneCube = Cudd_bddIntersect( p->ddR, (DdNode *)Vec_PtrEntryLast(p->vRings), p->ddR->bFunc ); Cudd_Ref( bOneCube );
RetValue = Cudd_bddPickOneCube( p->ddR, bOneCube, pValues ); RetValue = Cudd_bddPickOneCube( p->ddR, bOneCube, pValues );
Cudd_RecursiveDeref( p->ddR, bOneCube ); Cudd_RecursiveDeref( p->ddR, bOneCube );
assert( RetValue ); assert( RetValue );
......
...@@ -83,7 +83,7 @@ void Llb_ManDumpReached( DdManager * ddG, DdNode * bReached, char * pModel, char ...@@ -83,7 +83,7 @@ void Llb_ManDumpReached( DdManager * ddG, DdNode * bReached, char * pModel, char
// write the file // write the file
pFile = fopen( pFileName, "wb" ); pFile = fopen( pFileName, "wb" );
Cudd_DumpBlif( ddG, 1, &bReached, (char **)Vec_PtrArray(vNamesIn), (char **)Vec_PtrArray(vNamesOut), pModel, pFile ); Cudd_DumpBlif( ddG, 1, &bReached, (char **)Vec_PtrArray(vNamesIn), (char **)Vec_PtrArray(vNamesOut), pModel, pFile, 0 );
fclose( pFile ); fclose( pFile );
// cleanup // cleanup
......
...@@ -144,7 +144,7 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp ...@@ -144,7 +144,7 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp
continue; continue;
if ( piFirst[i] == piLast[i] ) if ( piFirst[i] == piLast[i] )
{ {
vMap = Vec_PtrEntry( vMaps, piFirst[i] ); vMap = (Vec_Int_t *)Vec_PtrEntry( vMaps, piFirst[i] );
Vec_IntWriteEntry( vMap, pObj->Id, 2 ); Vec_IntWriteEntry( vMap, pObj->Id, 2 );
continue; continue;
} }
...@@ -152,7 +152,7 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp ...@@ -152,7 +152,7 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp
// set support for all in between // set support for all in between
for ( k = piFirst[i]; k <= piLast[i]; k++ ) for ( k = piFirst[i]; k <= piLast[i]; k++ )
{ {
vMap = Vec_PtrEntry( vMaps, k ); vMap = (Vec_Int_t *)Vec_PtrEntry( vMaps, k );
Vec_IntWriteEntry( vMap, pObj->Id, 1 ); Vec_IntWriteEntry( vMap, pObj->Id, 1 );
} }
} }
...@@ -165,8 +165,8 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp ...@@ -165,8 +165,8 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp
printf( "%d ", Counter ); printf( "%d ", Counter );
Vec_PtrForEachEntryStart( Vec_Int_t *, vMaps, vMap, i, 1 ) Vec_PtrForEachEntryStart( Vec_Int_t *, vMaps, vMap, i, 1 )
{ {
vPrev = Vec_PtrEntry( vMaps, i-1 ); vPrev = (Vec_Int_t *)Vec_PtrEntry( vMaps, i-1 );
vNext = (i == Vec_PtrSize(vMaps)-1)? NULL: Vec_PtrEntry( vMaps, i+1 ); vNext = (i == Vec_PtrSize(vMaps)-1)? NULL: (Vec_Int_t *)Vec_PtrEntry( vMaps, i+1 );
CounterPlus = CounterMinus = 0; CounterPlus = CounterMinus = 0;
Aig_ManForEachObj( p, pObj, k ) Aig_ManForEachObj( p, pObj, k )
...@@ -1134,7 +1134,7 @@ void Llb_ManFlowGetObjSet( Aig_Man_t * p, Vec_Ptr_t * vLower, int iStart, int nS ...@@ -1134,7 +1134,7 @@ void Llb_ManFlowGetObjSet( Aig_Man_t * p, Vec_Ptr_t * vLower, int iStart, int nS
Vec_PtrClear( vSet ); Vec_PtrClear( vSet );
for ( i = 0; i < nSize; i++ ) for ( i = 0; i < nSize; i++ )
{ {
pObj = Vec_PtrEntry( vLower, (iStart + i) % Vec_PtrSize(vLower) ); pObj = (Aig_Obj_t *)Vec_PtrEntry( vLower, (iStart + i) % Vec_PtrSize(vLower) );
Vec_PtrPush( vSet, pObj ); Vec_PtrPush( vSet, pObj );
} }
} }
...@@ -1334,7 +1334,7 @@ void Llb_ManMinCutTest( Aig_Man_t * pAig, int Num ) ...@@ -1334,7 +1334,7 @@ void Llb_ManMinCutTest( Aig_Man_t * pAig, int Num )
{ {
extern void Llb_BddConstructTest( Aig_Man_t * p, Vec_Ptr_t * vResult ); extern void Llb_BddConstructTest( Aig_Man_t * p, Vec_Ptr_t * vResult );
extern void Llb_BddExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, Vec_Ptr_t * vMaps ); extern void Llb_BddExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, Vec_Ptr_t * vMaps );
extern void Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult );
int fVerbose = 1; int fVerbose = 1;
Gia_ParLlb_t Pars, * pPars = &Pars; Gia_ParLlb_t Pars, * pPars = &Pars;
...@@ -1354,7 +1354,7 @@ void Llb_ManMinCutTest( Aig_Man_t * pAig, int Num ) ...@@ -1354,7 +1354,7 @@ void Llb_ManMinCutTest( Aig_Man_t * pAig, int Num )
// vMaps = Llb_ManCutMap( p, vResult, vSupps ); // vMaps = Llb_ManCutMap( p, vResult, vSupps );
// Llb_BddExperiment( pAig, p, pPars, vResult, vMaps ); // Llb_BddExperiment( pAig, p, pPars, vResult, vMaps );
Llb_CoreExperiment( pAig, p, pPars, vResult ); Llb_CoreExperiment( pAig, p, pPars, vResult, 0 );
// Vec_VecFree( (Vec_Vec_t *)vMaps ); // Vec_VecFree( (Vec_Vec_t *)vMaps );
// Vec_VecFree( (Vec_Vec_t *)vSupps ); // Vec_VecFree( (Vec_Vec_t *)vSupps );
......
...@@ -238,7 +238,6 @@ DdNode * Llb_NonlinComputeInitState( Aig_Man_t * pAig, DdManager * dd ) ...@@ -238,7 +238,6 @@ DdNode * Llb_NonlinComputeInitState( Aig_Man_t * pAig, DdManager * dd )
Abc_Cex_t * Llb_NonlinDeriveCex( Llb_Mnn_t * p ) Abc_Cex_t * Llb_NonlinDeriveCex( Llb_Mnn_t * p )
{ {
extern Abc_Cex_t * Ssw_SmlAllocCounterExample( int nRegs, int nRealPis, int nFrames ); extern Abc_Cex_t * Ssw_SmlAllocCounterExample( int nRegs, int nRealPis, int nFrames );
extern int Ssw_SmlFindOutputCounterExample( Aig_Man_t * pAig, Abc_Cex_t * p );
Abc_Cex_t * pCex; Abc_Cex_t * pCex;
Aig_Obj_t * pObj; Aig_Obj_t * pObj;
Vec_Int_t * vVarsNs; Vec_Int_t * vVarsNs;
...@@ -269,7 +268,7 @@ Abc_Cex_t * Llb_NonlinDeriveCex( Llb_Mnn_t * p ) ...@@ -269,7 +268,7 @@ Abc_Cex_t * Llb_NonlinDeriveCex( Llb_Mnn_t * p )
pCex->iPo = -1; pCex->iPo = -1;
// get the last cube // get the last cube
bOneCube = Cudd_bddIntersect( p->ddR, Vec_PtrEntryLast(p->vRings), p->ddR->bFunc ); Cudd_Ref( bOneCube ); bOneCube = Cudd_bddIntersect( p->ddR, (DdNode *)Vec_PtrEntryLast(p->vRings), p->ddR->bFunc ); Cudd_Ref( bOneCube );
RetValue = Cudd_bddPickOneCube( p->ddR, bOneCube, pValues ); RetValue = Cudd_bddPickOneCube( p->ddR, bOneCube, pValues );
Cudd_RecursiveDeref( p->ddR, bOneCube ); Cudd_RecursiveDeref( p->ddR, bOneCube );
assert( RetValue ); assert( RetValue );
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <stdio.h> #include <stdio.h>
#include "aig.h" #include "aig.h"
#include "saig.h" #include "saig.h"
#include "ssw.h"
#include "cuddInt.h" #include "cuddInt.h"
#include "extra.h" #include "extra.h"
#include "llb.h" #include "llb.h"
...@@ -150,6 +151,7 @@ extern DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, int ...@@ -150,6 +151,7 @@ extern DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, int
extern DdNode * Llb_BddQuantifyPis( Aig_Man_t * pInit, DdManager * dd, DdNode * bFunc ); extern DdNode * Llb_BddQuantifyPis( Aig_Man_t * pInit, DdManager * dd, DdNode * bFunc );
/*=== llb2Core.c ======================================================*/ /*=== llb2Core.c ======================================================*/
extern DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarIndex, char * pValues ); extern DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarIndex, char * pValues );
extern int Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, int TimeTarget );
/*=== llb2Driver.c ======================================================*/ /*=== llb2Driver.c ======================================================*/
extern Vec_Int_t * Llb_DriverCountRefs( Aig_Man_t * p ); extern Vec_Int_t * Llb_DriverCountRefs( Aig_Man_t * p );
extern Vec_Int_t * Llb_DriverCollectNs( Aig_Man_t * pAig, Vec_Int_t * vDriRefs ); extern Vec_Int_t * Llb_DriverCollectNs( Aig_Man_t * pAig, Vec_Int_t * vDriRefs );
......
...@@ -115,7 +115,7 @@ Aig_Man_t * Saig_ManCreateEquivMiter( Aig_Man_t * pAig, Vec_Int_t * vPairs ) ...@@ -115,7 +115,7 @@ Aig_Man_t * Saig_ManCreateEquivMiter( Aig_Man_t * pAig, Vec_Int_t * vPairs )
Aig_ManForEachNodeVec( pAig, vPairs, pObj, i ) Aig_ManForEachNodeVec( pAig, vPairs, pObj, i )
{ {
pObj2 = Aig_ManObj( pAig, Vec_IntEntry(vPairs, ++i) ); pObj2 = Aig_ManObj( pAig, Vec_IntEntry(vPairs, ++i) );
pMiter = Aig_Exor( pAigNew, pObj->pData, pObj2->pData ); pMiter = Aig_Exor( pAigNew, (Aig_Obj_t *)pObj->pData, (Aig_Obj_t *)pObj2->pData );
pMiter = Aig_NotCond( pMiter, pObj->fPhase ^ pObj2->fPhase ); pMiter = Aig_NotCond( pMiter, pObj->fPhase ^ pObj2->fPhase );
Aig_ObjCreatePo( pAigNew, pMiter ); Aig_ObjCreatePo( pAigNew, pMiter );
} }
......
...@@ -69,7 +69,7 @@ Aig_Man_t * Saig_ManTemporFrames( Aig_Man_t * pAig, int nFrames ) ...@@ -69,7 +69,7 @@ Aig_Man_t * Saig_ManTemporFrames( Aig_Man_t * pAig, int nFrames )
} }
// create POs for the flop inputs // create POs for the flop inputs
Saig_ManForEachLi( pAig, pObj, i ) Saig_ManForEachLi( pAig, pObj, i )
Aig_ObjCreatePo( pFrames, pObj->pData ); Aig_ObjCreatePo( pFrames, (Aig_Obj_t *)pObj->pData );
Aig_ManCleanup( pFrames ); Aig_ManCleanup( pFrames );
return pFrames; return pFrames;
} }
...@@ -123,7 +123,7 @@ Aig_Man_t * Saig_ManTemporDecompose( Aig_Man_t * pAig, int nFrames ) ...@@ -123,7 +123,7 @@ Aig_Man_t * Saig_ManTemporDecompose( Aig_Man_t * pAig, int nFrames )
// create flop output values // create flop output values
Saig_ManForEachLo( pAig, pObj, i ) Saig_ManForEachLo( pAig, pObj, i )
pObj->pData = Aig_Mux( pAigNew, pReset, Aig_ObjCreatePi(pAigNew), Aig_ManPo(pFrames, i)->pData ); pObj->pData = Aig_Mux( pAigNew, pReset, Aig_ObjCreatePi(pAigNew), (Aig_Obj_t *)Aig_ManPo(pFrames, i)->pData );
Aig_ManStop( pFrames ); Aig_ManStop( pFrames );
// add internal nodes of this frame // add internal nodes of this frame
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "saig.h" #include "saig.h"
#include "satSolver.h" #include "satSolver.h"
#include "ssw.h" #include "ssw.h"
#include "ioa.h"
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// PARAMETERS /// /// PARAMETERS ///
......
...@@ -331,7 +331,6 @@ p->timeBmc += clock() - clk; ...@@ -331,7 +331,6 @@ p->timeBmc += clock() - clk;
***********************************************************************/ ***********************************************************************/
void Ssw_ManDumpEquivMiter( Aig_Man_t * p, Vec_Int_t * vPairs, int Num ) void Ssw_ManDumpEquivMiter( Aig_Man_t * p, Vec_Int_t * vPairs, int Num )
{ {
extern void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int fCompact );
FILE * pFile; FILE * pFile;
char pBuffer[16]; char pBuffer[16];
Aig_Man_t * pNew; Aig_Man_t * pNew;
......
...@@ -60,6 +60,8 @@ extern void Cmd_FlagDeleteByName( Abc_Frame_t * pAbc, const char * key ); ...@@ -60,6 +60,8 @@ extern void Cmd_FlagDeleteByName( Abc_Frame_t * pAbc, const char * key );
extern void Cmd_FlagUpdateValue( Abc_Frame_t * pAbc, const char * key, char * value ); extern void Cmd_FlagUpdateValue( Abc_Frame_t * pAbc, const char * key, char * value );
/*=== cmdHist.c ========================================================*/ /*=== cmdHist.c ========================================================*/
extern void Cmd_HistoryAddCommand( Abc_Frame_t * pAbc, const char * command ); extern void Cmd_HistoryAddCommand( Abc_Frame_t * pAbc, const char * command );
/*=== cmdLoad.c ========================================================*/
extern int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv );
......
...@@ -30,8 +30,6 @@ ABC_NAMESPACE_IMPL_START ...@@ -30,8 +30,6 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS /// /// DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static int CmdCommandLoad ( Abc_Frame_t * pAbc, int argc, char ** argv );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS /// /// FUNCTION DEFINITIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -229,7 +229,7 @@ static inline void Hash_GenWriteEntry( Hash_Gen_t *p, void * key, void * data ) ...@@ -229,7 +229,7 @@ static inline void Hash_GenWriteEntry( Hash_Gen_t *p, void * key, void * data )
p->nSize++; p->nSize++;
(*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 ); (*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 );
pEntry->pNext = NULL; pEntry->pNext = NULL;
pEntry->key = key; pEntry->key = (char *)key;
pEntry->data = data; pEntry->data = data;
return; return;
...@@ -271,7 +271,7 @@ static inline Hash_Gen_Entry_t * Hash_GenEntry( Hash_Gen_t *p, void * key, int f ...@@ -271,7 +271,7 @@ static inline Hash_Gen_Entry_t * Hash_GenEntry( Hash_Gen_t *p, void * key, int f
p->nSize++; p->nSize++;
(*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 ); (*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 );
pEntry->pNext = NULL; pEntry->pNext = NULL;
pEntry->key = key; pEntry->key = (char *)key;
pEntry->data = NULL; pEntry->data = NULL;
return pEntry; return pEntry;
} }
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
SystemName [ABC: Logic synthesis and verification system.] SystemName [ABC: Logic synthesis and verification system.]
PackageName [] PackageName [Signal handling utilities.]
Synopsis [] Synopsis [Signal handling utilities.]
Author [] Author [Baruch Sterin]
Affiliation [UC Berkeley] Affiliation [UC Berkeley]
Date [] Date [Ver. 1.0. Started - February 1, 2011.]
Revision [] Revision [$Id: utilSignal.c,v 1.00 2011/02/01 00:00:00 alanmi Exp $]
***********************************************************************/ ***********************************************************************/
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <signal.h> #include <signal.h>
#include "abc_global.h" #include "abc_global.h"
#include "hashGen.h" #include "hashGen.h"
#include "utilSignal.h"
#ifndef _MSC_VER #ifndef _MSC_VER
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
SystemName [ABC: Logic synthesis and verification system.] SystemName [ABC: Logic synthesis and verification system.]
PackageName [] PackageName [Signal handling utilities.]
Synopsis [] Synopsis [Signal handling utilities.]
Author [] Author [Baruch Sterin]
Affiliation [UC Berkeley] Affiliation [UC Berkeley]
Date [] Date [Ver. 1.0. Started - February 1, 2011.]
Revision [] Revision [$Id: utilSignal.h,v 1.00 2011/02/01 00:00:00 alanmi Exp $]
***********************************************************************/ ***********************************************************************/
...@@ -44,23 +44,17 @@ ABC_NAMESPACE_HEADER_START ...@@ -44,23 +44,17 @@ ABC_NAMESPACE_HEADER_START
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/*=== utilSignal.c ==========================================================*/ /*=== utilSignal.c ==========================================================*/
extern void Util_SignalCleanup();
void Util_SignalCleanup(); extern void Util_SignalStartHandler();
extern void Util_SignalResetHandler();
void Util_SignalStartHandler(); extern void Util_SignalStopHandler();
void Util_SignalResetHandler(); extern void Util_SignalBlockSignals();
void Util_SignalStopHandler(); extern void Util_SignalUnblockSignals();
extern void Util_SignalAddChildPid(int pid);
void Util_SignalBlockSignals(); extern void Util_SignalRemoveChildPid(int pid);
void Util_SignalUnblockSignals(); extern int Util_SignalTmpFile(const char* prefix, const char* suffix, char** out_name);
extern void Util_SignalTmpFileRemove(const char* fname, int fLeave);
void Util_SignalAddChildPid(int pid); extern int Util_SignalSystem(const char* cmd);
void Util_SignalRemoveChildPid(int pid);
int Util_SignalTmpFile(const char* prefix, const char* suffix, char** out_name);
void Util_SignalTmpFileRemove(const char* fname, int fLeave);
int Util_SignalSystem(const char* cmd);
ABC_NAMESPACE_HEADER_END ABC_NAMESPACE_HEADER_END
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#ifndef __UTIL_HACK_H__ #ifndef __UTIL_HACK_H__
#define __UTIL_HACK_H__ #define __UTIL_HACK_H__
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -31,50 +30,18 @@ ...@@ -31,50 +30,18 @@
#include "abc_global.h" #include "abc_global.h"
ABC_NAMESPACE_HEADER_START ABC_NAMESPACE_HEADER_START
#ifndef EXTERN
#define EXTERN extern
#endif
#define NIL(type) ((type *) 0) #define NIL(type) ((type *) 0)
#define random rand
#define srandom srand
#define util_cpu_time Extra_CpuTime #define util_cpu_time Extra_CpuTime
#define getSoftDataLimit Extra_GetSoftDataLimit #define getSoftDataLimit Extra_GetSoftDataLimit
#define util_getopt_reset Extra_UtilGetoptReset
#define util_getopt Extra_UtilGetopt
#define util_print_time Extra_UtilPrintTime
#define util_strsav Extra_UtilStrsav
#define util_tilde_expand Extra_UtilTildeExpand
#define util_file_search Extra_UtilFileSearch
#define MMoutOfMemory Extra_UtilMMoutOfMemory #define MMoutOfMemory Extra_UtilMMoutOfMemory
#define util_optarg globalUtilOptarg
#define util_optind globalUtilOptind
#ifndef ARGS
#define ARGS(protos) protos
#endif
extern long Extra_CpuTime(); extern long Extra_CpuTime();
extern int Extra_GetSoftDataLimit(); extern int Extra_GetSoftDataLimit();
extern void Extra_UtilGetoptReset(); extern void (*Extra_UtilMMoutOfMemory)( long size );
extern int Extra_UtilGetopt( int argc, char *argv[], const char *optstring );
extern char * Extra_UtilPrintTime( long t );
extern char * Extra_UtilStrsav( char *s );
extern char * Extra_UtilTildeExpand( char *fname );
extern char * Extra_UtilFileSearch( char *file, char *path, char *mode );
extern char * globalUtilOptarg;
extern int globalUtilOptind;
ABC_NAMESPACE_HEADER_END ABC_NAMESPACE_HEADER_END
#endif #endif
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
***********************************************************************/ ***********************************************************************/
#include "pdrInt.h" #include "pdrInt.h"
#include "extra.h"
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
...@@ -44,7 +45,6 @@ ABC_NAMESPACE_IMPL_START ...@@ -44,7 +45,6 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/ ***********************************************************************/
void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, int Time ) void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, int Time )
{ {
extern int Extra_Base10Log( unsigned int Num );
static int PastSize; static int PastSize;
Vec_Ptr_t * vVec; Vec_Ptr_t * vVec;
int i, ThisSize, Length, LengthStart; int i, ThisSize, Length, LengthStart;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
***********************************************************************/ ***********************************************************************/
#include "pdrInt.h" #include "pdrInt.h"
#include "ssw.h"
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
...@@ -157,7 +158,6 @@ void Pdr_ManStop( Pdr_Man_t * p ) ...@@ -157,7 +158,6 @@ void Pdr_ManStop( Pdr_Man_t * p )
***********************************************************************/ ***********************************************************************/
Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p ) Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p )
{ {
extern Abc_Cex_t * Gia_ManAllocCounterExample( int nRegs, int nRealPis, int nFrames );
Abc_Cex_t * pCex; Abc_Cex_t * pCex;
Pdr_Obl_t * pObl; Pdr_Obl_t * pObl;
int i, f, Lit, nFrames = 0; int i, f, Lit, nFrames = 0;
...@@ -165,7 +165,7 @@ Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p ) ...@@ -165,7 +165,7 @@ Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p )
for ( pObl = p->pQueue; pObl; pObl = pObl->pNext ) for ( pObl = p->pQueue; pObl; pObl = pObl->pNext )
nFrames++; nFrames++;
// create the counter-example // create the counter-example
pCex = Gia_ManAllocCounterExample( Aig_ManRegNum(p->pAig), Saig_ManPiNum(p->pAig), nFrames ); pCex = Ssw_SmlAllocCounterExample( Aig_ManRegNum(p->pAig), Saig_ManPiNum(p->pAig), nFrames );
pCex->iPo = (p->pPars->iOutput==-1)? 0 : p->pPars->iOutput; pCex->iPo = (p->pPars->iOutput==-1)? 0 : p->pPars->iOutput;
pCex->iFrame = nFrames-1; pCex->iFrame = nFrames-1;
for ( pObl = p->pQueue, f = 0; pObl; pObl = pObl->pNext, f++ ) for ( pObl = p->pQueue, f = 0; pObl; pObl = pObl->pNext, f++ )
......
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