Commit 9ebcd9ec by Alan Mishchenko

Various changes to enable sensitization-based refinement in &gla.

parent c9210580
......@@ -1674,6 +1674,12 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Vga_ManRollBack( p, nObjOld );
goto finish;
}
// check timeout
if ( p->pSat->nRuntimeLimit && time(NULL) > p->pSat->nRuntimeLimit )
{
Vga_ManRollBack( p, nObjOld );
goto finish;
}
if ( vCore != NULL )
{
p->timeUnsat += clock() - clk2;
......
......@@ -252,7 +252,7 @@ Abs_VfaMan_t * Abs_VfaManStart( Aig_Man_t * pAig )
Vec_IntPush( p->vVec2Var, -1 );
// transfer values from CNF
p->pCnf = Cnf_DeriveOther( pAig );
p->pCnf = Cnf_DeriveOther( pAig, 0 );
for ( i = 0; i < Aig_ManObjNumMax(pAig); i++ )
if ( p->pCnf->pObj2Clause[i] == -1 )
Vec_IntWriteEntry( p->vObj2Vec, i, -1 );
......
......@@ -91,7 +91,7 @@ extern void Dar_BalancePrintStats( Aig_Man_t * p );
/*=== darCore.c ========================================================*/
extern void Dar_ManDefaultRwrParams( Dar_RwrPar_t * pPars );
extern int Dar_ManRewrite( Aig_Man_t * pAig, Dar_RwrPar_t * pPars );
extern Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fVerbose );
extern Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fSkipTtMin, int fVerbose );
/*=== darRefact.c ========================================================*/
extern void Dar_ManDefaultRefParams( Dar_RefPar_t * pPars );
extern int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars );
......
......@@ -281,7 +281,7 @@ int Dar_ManCutCount( Aig_Man_t * pAig, int * pnCutsK )
SeeAlso []
***********************************************************************/
Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fVerbose )
Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fSkipTtMin, int fVerbose )
{
Dar_Man_t * p;
Dar_RwrPar_t Pars, * pPars = &Pars;
......@@ -306,7 +306,7 @@ Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fVerbose
Dar_ObjPrepareCuts( p, pObj );
// compute cuts for each nodes in the topological order
Aig_ManForEachNode( pAig, pObj, i )
Dar_ObjComputeCuts( p, pObj );
Dar_ObjComputeCuts( p, pObj, fSkipTtMin );
// print verbose stats
if ( fVerbose )
{
......
......@@ -735,14 +735,14 @@ void Dar_ManCutsRestart( Dar_Man_t * p, Aig_Obj_t * pRoot )
SeeAlso []
***********************************************************************/
Dar_Cut_t * Dar_ObjComputeCuts( Dar_Man_t * p, Aig_Obj_t * pObj )
Dar_Cut_t * Dar_ObjComputeCuts( Dar_Man_t * p, Aig_Obj_t * pObj, int fSkipTtMin )
{
Aig_Obj_t * pFanin0 = Aig_ObjReal_rec( Aig_ObjChild0(pObj) );
Aig_Obj_t * pFanin1 = Aig_ObjReal_rec( Aig_ObjChild1(pObj) );
Aig_Obj_t * pFaninR0 = Aig_Regular(pFanin0);
Aig_Obj_t * pFaninR1 = Aig_Regular(pFanin1);
Dar_Cut_t * pCutSet, * pCut0, * pCut1, * pCut;
int i, k, RetValue;
int i, k;
assert( !Aig_IsComplement(pObj) );
assert( Aig_ObjIsNode(pObj) );
......@@ -779,9 +779,9 @@ Dar_Cut_t * Dar_ObjComputeCuts( Dar_Man_t * p, Aig_Obj_t * pObj )
pCut->uTruth = 0xFFFF & Dar_CutTruth( pCut, pCut0, pCut1, Aig_IsComplement(pFanin0), Aig_IsComplement(pFanin1) );
// minimize support of the cut
if ( Dar_CutSuppMinimize( pCut ) )
if ( !fSkipTtMin && Dar_CutSuppMinimize( pCut ) )
{
RetValue = Dar_CutFilter( pObj, pCut );
int RetValue = Dar_CutFilter( pObj, pCut );
assert( !RetValue );
}
......@@ -825,7 +825,7 @@ Dar_Cut_t * Dar_ObjComputeCuts_rec( Dar_Man_t * p, Aig_Obj_t * pObj )
return Dar_ObjComputeCuts_rec( p, Aig_ObjFanin0(pObj) );
Dar_ObjComputeCuts_rec( p, Aig_ObjFanin0(pObj) );
Dar_ObjComputeCuts_rec( p, Aig_ObjFanin1(pObj) );
return Dar_ObjComputeCuts( p, pObj );
return Dar_ObjComputeCuts( p, pObj, 0 );
}
////////////////////////////////////////////////////////////////////////
......
......@@ -137,7 +137,7 @@ extern void Dar_ManCutsRestart( Dar_Man_t * p, Aig_Obj_t * pRoot );
extern void Dar_ManCutsFree( Dar_Man_t * p );
extern Dar_Cut_t * Dar_ObjPrepareCuts( Dar_Man_t * p, Aig_Obj_t * pObj );
extern Dar_Cut_t * Dar_ObjComputeCuts_rec( Dar_Man_t * p, Aig_Obj_t * pObj );
extern Dar_Cut_t * Dar_ObjComputeCuts( Dar_Man_t * p, Aig_Obj_t * pObj );
extern Dar_Cut_t * Dar_ObjComputeCuts( Dar_Man_t * p, Aig_Obj_t * pObj, int fSkipTtMin );
extern void Dar_ObjCutPrint( Aig_Man_t * p, Aig_Obj_t * pObj );
/*=== darData.c ===========================================================*/
extern Vec_Int_t * Dar_LibReadNodes();
......
......@@ -637,7 +637,7 @@ ABC_PRT( "Lat-cla", clock() - clk );
// generate cuts for all nodes, assign cost, and find best cuts
clk = clock();
pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 1 );
pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 0, 1 );
// pManCut = Aig_ComputeCuts( p->pAig, 10, 4, 0, 1 );
if ( p->fVerbose )
{
......@@ -771,7 +771,7 @@ if ( p->fVerbose )
// generate cuts for all nodes, assign cost, and find best cuts
clk = clock();
// pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 1 );
// pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 0, 1 );
pManCut = Aig_ComputeCuts( p->pAig, p->nCutsMax, p->nLutSize, 0, p->fVerbose );
if ( p->fVerbose )
{
......
......@@ -300,7 +300,7 @@ static inline sat_solver * Pdr_ManNewSolver2( sat_solver * pSat, Pdr_Man_t * p,
assert( pSat );
if ( p->pCnf2 == NULL )
{
p->pCnf2 = Cnf_DeriveOther( p->pAig );
p->pCnf2 = Cnf_DeriveOther( p->pAig, 0 );
p->pvId2Vars = ABC_CALLOC( Vec_Int_t *, Aig_ManObjNumMax(p->pAig) );
p->vVar2Ids = Vec_PtrAlloc( 256 );
}
......
......@@ -128,7 +128,7 @@ static inline void Cnf_ObjSetBestCut( Aig_Obj_t * pObj, Cnf_Cut_t * pCut
/*=== cnfCore.c ========================================================*/
extern Vec_Int_t * Cnf_DeriveMappingArray( Aig_Man_t * pAig );
extern Cnf_Dat_t * Cnf_Derive( Aig_Man_t * pAig, int nOutputs );
extern Cnf_Dat_t * Cnf_DeriveOther( Aig_Man_t * pAig );
extern Cnf_Dat_t * Cnf_DeriveOther( Aig_Man_t * pAig, int fSkipTtMin );
extern Cnf_Man_t * Cnf_ManRead();
extern void Cnf_ClearMemory();
/*=== cnfCut.c ========================================================*/
......
......@@ -60,7 +60,7 @@ Vec_Int_t * Cnf_DeriveMappingArray( Aig_Man_t * pAig )
// generate cuts for all nodes, assign cost, and find best cuts
clk = clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0 );
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0, 0 );
p->timeCuts = clock() - clk;
// find the mapping
......@@ -113,7 +113,7 @@ Cnf_Dat_t * Cnf_Derive( Aig_Man_t * pAig, int nOutputs )
// generate cuts for all nodes, assign cost, and find best cuts
clk = clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0 );
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0, 0 );
p->timeCuts = clock() - clk;
// find the mapping
......@@ -150,7 +150,7 @@ p->timeSave = clock() - clk;
SeeAlso []
***********************************************************************/
Cnf_Dat_t * Cnf_DeriveOther( Aig_Man_t * pAig )
Cnf_Dat_t * Cnf_DeriveOther( Aig_Man_t * pAig, int fSkipTtMin )
{
Cnf_Man_t * p;
Cnf_Dat_t * pCnf;
......@@ -166,7 +166,7 @@ Cnf_Dat_t * Cnf_DeriveOther( Aig_Man_t * pAig )
// generate cuts for all nodes, assign cost, and find best cuts
clk = clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0 );
pMemCuts = Dar_ManComputeCuts( pAig, 10, fSkipTtMin, 0 );
p->timeCuts = clock() - clk;
// find the mapping
......
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