134 int LargeNum = -100000000;
142 for ( v = 0; v < (int)pClause->
nLits; v++ )
152 for ( v = 0; v < (int)pClause->
nLits; v++ )
288 for ( i = 0; i < (int)pClause->
nLits; i++ )
289 printf(
" %d", pClause->
pLits[i] );
307 printf(
"Resolvent: {" );
309 printf(
" %d", Entry );
326 printf(
"Clause %2d : ", pClause->
Id );
347 if ( pClause->
pLits[0] == Lit )
396 for ( i = p->
nTrailSize - 1; i >= Level; i-- )
425 for ( pCur = p->
pWatches[Lit]; pCur; pCur = *ppPrev )
428 if ( pCur->
pLits[0] == LitF )
431 pCur->
pLits[1] = LitF;
446 for ( i = 2; i < (int)pCur->
nLits; i++ )
453 pCur->
pLits[i] = LitF;
460 if ( i < (
int)pCur->
nLits )
525 for ( v = 0; v < (int)pClause->
nLits; v++ )
527 fprintf( p->
pFile,
" 0 0\n" );
545 int i, v,
Var, PrevId;
553 for ( i = 0; i < (int)pConflict->
nLits; i++ )
558 for ( v = 0; v < (int)pConflict->
nLits; v++ )
580 if ( pReason == NULL )
585 for ( v = 1; v < (int)pReason->
nLits; v++ )
606 int v1, v2, Entry = -1;
614 printf(
"Recording clause %d: Cannot find variable %d in the temporary resolvent.\n", pFinal->
Id, Var );
616 printf(
"Recording clause %d: The resolved variable %d is in the wrong polarity.\n", pFinal->
Id, Var );
621 for ( v2 = 1; v2 < (int)pReason->
nLits; v2++ )
633 if ( Entry == pReason->
pLits[v2] )
636 printf(
"Recording clause %d: Trying to resolve the clause with more than one opposite literal.\n", pFinal->
Id );
652 int v1, v2, Entry = -1;
657 for ( v2 = 0; v2 < (int)pFinal->
nLits; v2++ )
658 if ( pFinal->
pLits[v2] == Entry )
660 if ( v2 < (
int)pFinal->
nLits )
666 printf(
"Recording clause %d: The final resolvent is wrong.\n", pFinal->
Id );
677 for ( v1 = 0; v1 < (int)pFinal->
nLits; v1++ )
680 if ( pFinal->
pLits[v1] == Entry )
686 for ( v2 = v1; v2 < (int)pFinal->
nLits; v2++ )
726 if ( pClause->
nLits == 0 )
727 printf(
"Error: Empty clause is attempted.\n" );
734 for ( i = 0; i < (int)pClause->
nLits; i++ )
739 for ( i = 0; i < (int)pClause->
nLits; i++ )
748 if ( pConflict == NULL )
759 for ( i = 0; i < (int)pConflict->
nLits; i++ )
761 for ( j = 0; j < (int)pClause->
nLits; j++ )
762 if ( pConflict->
pLits[i] == pClause->
pLits[j] )
764 if ( j == (
int)pClause->
nLits )
767 if ( i == (
int)pConflict->
nLits )
782 if ( pClause->
nLits > 1 )
847 if ( pClause->
nLits > 1 )
853 if ( pClause->
nLits != 1 )
865 printf(
"Found root level conflict!\n" );
877 printf(
"Found root level conflict!\n" );
913 for ( v = 0; v < (int)pClause->
nLits; v++ )
952 if ( TimeToStop &&
Abc_Clock() > TimeToStop )
973 p->
pFile = fopen(
"proof.cnf_",
"w" );
981 if ( TimeToStop &&
Abc_Clock() > TimeToStop )
995 if ( pClause->
fRoot )
1002 if ( TimeToStop &&
Abc_Clock() > TimeToStop )
1022 printf(
"Vars = %d. Roots = %d. Learned = %d. Resol steps = %d. Ave = %.2f. Mem = %.2f MB\n",
1060 if ( fClausesA ^ pClause->
fA )
1064 for ( v = 0; v < (int)pClause->
nLits; v++ )
1075 pSum =
Aig_Or( p, pSum, pLit );
1077 pMiter =
Aig_And( p, pMiter, pSum );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
int Sto_ManMemoryReport(Sto_Man_t *p)
Inta_Man_t * Inta_ManAlloc()
FUNCTION DEFINITIONS ///.
int Inta_ManProofRecordOne(Inta_Man_t *p, Sto_Cls_t *pClause)
static int lit_check(lit l, int n)
void Inta_ManPrepareInter(Inta_Man_t *p)
void * Inta_ManInterpolate(Inta_Man_t *p, Sto_Man_t *pCnf, abctime TimeToStop, void *vVarsAB, int fVerbose)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Inta_ManAigOrNot(Inta_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
void Aig_ManStop(Aig_Man_t *p)
void Inta_ManPrintInterOne(Inta_Man_t *p, Sto_Cls_t *pClause)
#define ABC_REALLOC(type, obj, num)
int Inta_ManProcessRoots(Inta_Man_t *p)
static int lit_var(lit l)
void Inta_ManPrintClause(Inta_Man_t *p, Sto_Cls_t *pClause)
static Aig_Obj_t ** Inta_ManAigRead(Inta_Man_t *pMan, Sto_Cls_t *pCls)
static Sto_Cls_t * Inta_ManPropagateOne(Inta_Man_t *p, lit Lit)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static void Inta_ManAigFill(Inta_Man_t *pMan, Aig_Obj_t **p)
void Inta_ManPrintResolvent(Vec_Int_t *vResLits)
int Inta_ManGlobalVars(Inta_Man_t *p)
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
#define ABC_ALLOC(type, num)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static abctime Abc_Clock()
static void Inta_ManProofSet(Inta_Man_t *p, Sto_Cls_t *pCls, int n)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static int Inta_ManProofGet(Inta_Man_t *p, Sto_Cls_t *pCls)
static int Inta_ManEnqueue(Inta_Man_t *p, lit Lit, Sto_Cls_t *pReason)
static lit lit_neg(lit l)
static ABC_NAMESPACE_IMPL_START const lit LIT_UNDEF
DECLARATIONS ///.
void Inta_ManResize(Inta_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Inta_ManDeriveClauses(Inta_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
Aig_Obj_t * Aig_Or(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static void Inta_ManAigOr(Inta_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static void Inta_ManAigOrVar(Inta_Man_t *pMan, Aig_Obj_t **p, int v)
static void Inta_ManAigCopy(Inta_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
static int Vec_IntRemove(Vec_Int_t *p, int Entry)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static int Vec_IntSize(Vec_Int_t *p)
static int lit_sign(lit l)
void Inta_ManFree(Inta_Man_t *p)
int Inta_ManProofTraceOne(Inta_Man_t *p, Sto_Cls_t *pConflict, Sto_Cls_t *pFinal)
static void Inta_ManAigClear(Inta_Man_t *pMan, Aig_Obj_t **p)
static void Inta_ManAigAnd(Inta_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
#define Sto_ManForEachClause(p, pCls)
Sto_Cls_t * Inta_ManPropagate(Inta_Man_t *p, int Start)
#define Sto_ManForEachClauseRoot(p, pCls)
void Inta_ManProofWriteOne(Inta_Man_t *p, Sto_Cls_t *pClause)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
static void Inta_ManWatchClause(Inta_Man_t *p, Sto_Cls_t *pClause, lit Lit)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static void Inta_ManCancelUntil(Inta_Man_t *p, int Level)
int Aig_ManCleanup(Aig_Man_t *p)
static void Inta_ManAigOrNotVar(Inta_Man_t *pMan, Aig_Obj_t **p, int v)
static int lit_print(lit l)