Commit 85428a60 by Bruno Schmitt

Enables FXCH to handle Distance-1 cubes (D1C) and Single Cube Containment (SCC)…

Enables FXCH to handle Distance-1 cubes (D1C) and Single Cube Containment (SCC) as by product of extraction.

D1C: Whenever they appear a constant divisor (x! + x)  will be created and handle as any other divisor.
SCC: Will be taken care of as soon as they appear.
parent 3c3a770a
...@@ -112,6 +112,7 @@ struct Fxch_Man_t_ ...@@ -112,6 +112,7 @@ struct Fxch_Man_t_
Vec_Int_t* vPairs; /* cube pairs for the given double cube divisor */ Vec_Int_t* vPairs; /* cube pairs for the given double cube divisor */
Vec_Int_t* vCubeFree; // cube-free divisor Vec_Int_t* vCubeFree; // cube-free divisor
Vec_Int_t* vDiv; // selected divisor Vec_Int_t* vDiv; // selected divisor
Vec_Int_t* vSCC;
/* Statistics */ /* Statistics */
abctime timeInit; /* Initialization time */ abctime timeInit; /* Initialization time */
...@@ -145,6 +146,7 @@ int Fxch_DivRemove( Fxch_Man_t* pFxchMan, int fUpdate, int fSingleCube, int fBa ...@@ -145,6 +146,7 @@ int Fxch_DivRemove( Fxch_Man_t* pFxchMan, int fUpdate, int fSingleCube, int fBa
void Fxch_DivSepareteCubes( Vec_Int_t* vDiv, Vec_Int_t* vCube0, Vec_Int_t* vCube1 ); void Fxch_DivSepareteCubes( Vec_Int_t* vDiv, Vec_Int_t* vCube0, Vec_Int_t* vCube1 );
int Fxch_DivRemoveLits( Vec_Int_t* vCube0, Vec_Int_t* vCube1, Vec_Int_t* vDiv, int *fCompl ); int Fxch_DivRemoveLits( Vec_Int_t* vCube0, Vec_Int_t* vCube1, Vec_Int_t* vDiv, int *fCompl );
void Fxch_DivPrint( Fxch_Man_t* pFxchMan, int iDiv ); void Fxch_DivPrint( Fxch_Man_t* pFxchMan, int iDiv );
int Fxch_DivIsNotConstant1( Vec_Int_t* vDiv );
/*===== FxchMan.c ====================================================================================================*/ /*===== FxchMan.c ====================================================================================================*/
Fxch_Man_t* Fxch_ManAlloc( Vec_Wec_t* vCubes ); Fxch_Man_t* Fxch_ManAlloc( Vec_Wec_t* vCubes );
......
...@@ -457,6 +457,17 @@ void Fxch_DivPrint( Fxch_Man_t* pFxchMan, ...@@ -457,6 +457,17 @@ void Fxch_DivPrint( Fxch_Man_t* pFxchMan,
printf( "Divs =%8d \n", Hsh_VecSize( pFxchMan->pDivHash ) ); printf( "Divs =%8d \n", Hsh_VecSize( pFxchMan->pDivHash ) );
} }
int Fxch_DivIsNotConstant1( Vec_Int_t* vDiv )
{
int Lit0 = Abc_Lit2Var( Vec_IntEntry( vDiv, 0 ) ),
Lit1 = Abc_Lit2Var( Vec_IntEntry( vDiv, 1 ) );
if ( ( Vec_IntSize( vDiv ) == 2 ) && ( Lit0 == Abc_LitNot( Lit1 ) ) )
return 0;
return 1;
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -182,10 +182,6 @@ static inline int Fxch_SCHashTableEntryCompare( Fxch_SCHashTable_t* pSCHashTable ...@@ -182,10 +182,6 @@ static inline int Fxch_SCHashTableEntryCompare( Fxch_SCHashTable_t* pSCHashTable
Vec_IntClear( &pSCHashTable->vSubCube0 ); Vec_IntClear( &pSCHashTable->vSubCube0 );
Vec_IntClear( &pSCHashTable->vSubCube1 ); Vec_IntClear( &pSCHashTable->vSubCube1 );
if ( pSCData0->iLit1 == 0 && pSCData1->iLit1 == 0 &&
Vec_IntEntry( vCube0, pSCData0->iLit0 ) == Abc_LitNot( Vec_IntEntry( vCube1, pSCData1->iLit0 ) ) )
return 0;
if ( pSCData0->iLit1 > 0 && pSCData1->iLit1 > 0 && if ( pSCData0->iLit1 > 0 && pSCData1->iLit1 > 0 &&
( Vec_IntEntry( vCube0, pSCData0->iLit0 ) == Vec_IntEntry( vCube1, pSCData1->iLit0 ) || ( Vec_IntEntry( vCube0, pSCData0->iLit0 ) == Vec_IntEntry( vCube1, pSCData1->iLit0 ) ||
Vec_IntEntry( vCube0, pSCData0->iLit0 ) == Vec_IntEntry( vCube1, pSCData1->iLit1 ) || Vec_IntEntry( vCube0, pSCData0->iLit0 ) == Vec_IntEntry( vCube1, pSCData1->iLit1 ) ||
...@@ -270,14 +266,16 @@ int Fxch_SCHashTableInsert( Fxch_SCHashTable_t* pSCHashTable, ...@@ -270,14 +266,16 @@ int Fxch_SCHashTableInsert( Fxch_SCHashTable_t* pSCHashTable,
if ( !Fxch_SCHashTableEntryCompare( pSCHashTable, vCubes, &( pEntry->SCData ), &( pNewEntry->SCData ) ) ) if ( !Fxch_SCHashTableEntryCompare( pSCHashTable, vCubes, &( pEntry->SCData ), &( pNewEntry->SCData ) ) )
continue; continue;
if ( pEntry->SCData.iLit0 == 0 ) if ( ( pEntry->SCData.iLit0 == 0 ) || ( pNewEntry->SCData.iLit0 == 0 ) )
{
printf("[FXCH] SCC detected\n");
continue;
}
if ( pNewEntry->SCData.iLit0 == 0 )
{ {
printf("[FXCH] SCC detected\n"); Vec_Int_t* vCube0 = Fxch_ManGetCube( pSCHashTable->pFxchMan, pEntry->SCData.iCube ),
* vCube1 = Fxch_ManGetCube( pSCHashTable->pFxchMan, pEntry->SCData.iCube );
if ( Vec_IntSize( vCube0 ) > Vec_IntSize( vCube1 ) )
Vec_IntPush( pSCHashTable->pFxchMan->vSCC, pEntry->SCData.iCube );
else
Vec_IntPush( pSCHashTable->pFxchMan->vSCC, pNewEntry->SCData.iCube );
continue; continue;
} }
......
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