86 int * pGroups, nGroups;
87 int nCubesC, nCubesD, nMerges, iCubeC, iCubeD;
89 int fSkipG, GroupSize, g, c, RetValue;
128 for ( c = 1; c < nCubesC; c++ )
131 pCube1 = pCover->
pCubes[c-1];
132 pCube2 = pCover->
pCubes[c ];
136 pGroups[nGroups++] = c;
139 pGroups[nGroups] = nCubesC;
144 for ( g = 0; g < nGroups; g++ )
149 GroupSize = pGroups[g+1] - pGroups[g];
150 if ( GroupSize < nCubesD )
152 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
162 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
169 pCubeD = pDiv->
pCubes[iCubeD++];
170 pCubeC = pCover->
pCubes[pGroups[g]+iCubeC++];
179 if ( RetValue == -1 )
182 if ( GroupSize - iCubeC < nCubesD - nMerges )
188 pCubeC = pCover->
pCubes[pGroups[g]+iCubeC++];
203 if ( iCubeD == nCubesD )
207 assert( iCubeD < nCubesD );
208 pCubeD = pDiv->
pCubes[iCubeD++];
211 assert( pGroups[g]+iCubeC < nCubesC );
212 pCubeC = pCover->
pCubes[pGroups[g]+iCubeC++];
218 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
228 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
230 pCubeC = pCover->
pCubes[c];
246 assert( nCubes == nCubesC );
418 printf(
"Verification OKAY!\n" );
421 printf(
"Verification FAILED!\n" );
422 printf(
"pCover:\n" );
#define Mvc_CoverAddCubeTail(pCover, pCube)
void Mvc_CoverFree(Mvc_Cover_t *pCover)
Mvc_Cube_t * Mvc_CubeDup(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
void Mvc_CoverPrint(Mvc_Cover_t *pCover)
FUNCTION DEFINITIONS ///.
Mvc_Cover_t * Mvc_CoverAlgebraicMultiply(Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
DECLARATIONS ///.
int Mvc_CoverIsOneLiteral(Mvc_Cover_t *pCover)
int Mvc_CoverFirstCubeFirstLit(Mvc_Cover_t *pCover)
void Mvc_CoverSupport(Mvc_Cover_t *pCover, Mvc_Cube_t *pSupp)
FUNCTION DEFINITIONS ///.
int Mvc_CoverAlgebraicEqual(Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
void Mvc_CoverDivideInternal(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
#define MEM_FREE(Manager, Type, Size, Pointer)
#define Mvc_CubeSetSize(Cube, Size)
Mvc_Cube_t * Mvc_CubeAlloc(Mvc_Cover_t *pCover)
DECLARATIONS ///.
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
void Mvc_CoverList2Array(Mvc_Cover_t *pCover)
#define Mvc_CubeBitRemove(Cube, Bit)
void Mvc_CoverDivideByCube(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
#define Mvc_CoverForEachCubeSafe(Cover, Cube, Cube2)
#define ABC_NAMESPACE_IMPL_END
int Mvc_CubeCompareInt(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
DECLARATIONS ///.
#define Mvc_CubeBitSharp(CubeR, Cube1, Cube2)
static ABC_NAMESPACE_IMPL_START void Mvc_CoverVerifyDivision(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t *pQuo, Mvc_Cover_t *pRem)
DECLARATIONS ///.
void Mvc_CoverDivide(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
FUNCTION DEFINITIONS ///.
int Mvc_CubeCompareIntOutsideAndUnderMask(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
#define Mvc_CoverForEachCube(Cover, Cube)
#define MEM_ALLOC(Manager, Type, Size)
int Mvc_CubeCompareIntUnderMask(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
#define ABC_NAMESPACE_IMPL_START
int Mvc_CoverCheckSuppContainment(Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
#define Mvc_CubeBitValue(Cube, Bit)
void Mvc_CoverDivideByLiteral(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
#define Mvc_Cube2BitNotImpl(Res, Cube1, Cube2)
#define Mvc_CoverDeleteCube(pCover, pPrev, pCube)
void Mvc_CubeFree(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
void Mvc_CoverSort(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask, int(*pCompareFunc)(Mvc_Cube_t *, Mvc_Cube_t *, Mvc_Cube_t *))
FuNCTION DEFINITIONS ///.
Mvc_Cover_t * Mvc_CoverAlgebraicSubtract(Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
Mvc_Cover_t * Mvc_CoverAlloc(Mvc_Manager_t *pMem, int nBits)
DECLARATIONS ///.
#define Mvc_CubeBitEqualOutsideMask(Res, Cube1, Cube2, Mask)
Mvc_Cube_t * Mvc_CoverReadCubeHead(Mvc_Cover_t *pCover)
void Mvc_CoverAllocateMask(Mvc_Cover_t *pCover)
void Mvc_CoverDivideByLiteralQuo(Mvc_Cover_t *pCover, int iLit)
#define Mvc_CubeReadSize(Cube)