139 int LargeNum = -100000000;
147 for ( v = 0; v < (int)pClause->
nLits; v++ )
157 for ( v = 0; v < (int)pClause->
nLits; v++ )
293 for ( i = 0; i < (int)pClause->
nLits; i++ )
294 printf(
" %d", pClause->
pLits[i] );
312 printf(
"Resolvent: {" );
313 for ( i = 0; i < nResLits; i++ )
314 printf(
" %d", pResLits[i] );
331 printf(
"Clause %2d : ", pClause->
Id );
352 if ( pClause->
pLits[0] == Lit )
401 for ( i = p->
nTrailSize - 1; i >= Level; i-- )
430 for ( pCur = p->
pWatches[Lit]; pCur; pCur = *ppPrev )
433 if ( pCur->
pLits[0] == LitF )
436 pCur->
pLits[1] = LitF;
451 for ( i = 2; i < (int)pCur->
nLits; i++ )
458 pCur->
pLits[i] = LitF;
465 if ( i < (
int)pCur->
nLits )
530 for ( v = 0; v < (int)pClause->
nLits; v++ )
532 fprintf( p->
pFile,
" 0 0\n" );
571 int i, v,
Var, PrevId;
584 for ( v = 0; v < (int)pConflict->
nLits; v++ )
606 if ( pReason == NULL )
611 for ( v = 1; v < (int)pReason->
nLits; v++ )
631 for ( v = 0; v < (int)pReason->
nLits; v++ )
649 for ( v1 = 0; v1 < p->
nResLits; v1++ )
653 printf(
"Recording clause %d: Cannot find variable %d in the temporary resolvent.\n", pFinal->
Id, Var );
655 printf(
"Recording clause %d: The resolved variable %d is in the wrong polarity.\n", pFinal->
Id, Var );
662 for ( v2 = 1; v2 < (int)pReason->
nLits; v2++ )
664 for ( v1 = 0; v1 < p->
nResLits; v1++ )
671 printf(
"Recording clause %d: Ran out of space for intermediate resolvent.\n", pFinal->
Id );
679 printf(
"Recording clause %d: Trying to resolve the clause with more than one opposite literal.\n", pFinal->
Id );
698 for ( v1 = 0; v1 < p->
nResLits; v1++ )
700 for ( v2 = 0; v2 < (int)pFinal->
nLits; v2++ )
703 if ( v2 < (
int)pFinal->
nLits )
707 if ( v1 < p->nResLits )
709 printf(
"Recording clause %d: The final resolvent is wrong.\n", pFinal->
Id );
720 for ( v1 = 0; v1 < (int)pFinal->
nLits; v1++ )
722 for ( v2 = 0; v2 < p->
nResLits; v2++ )
725 if ( v2 < p->nResLits )
729 for ( v2 = v1; v2 < (int)pFinal->
nLits; v2++ )
769 if ( pClause->
nLits == 0 )
770 printf(
"Error: Empty clause is attempted.\n" );
777 for ( i = 0; i < (int)pClause->
nLits; i++ )
782 for ( i = 0; i < (int)pClause->
nLits; i++ )
791 if ( pConflict == NULL )
802 for ( i = 0; i < (int)pConflict->
nLits; i++ )
804 for ( j = 0; j < (int)pClause->
nLits; j++ )
805 if ( pConflict->
pLits[i] == pClause->
pLits[j] )
807 if ( j == (
int)pClause->
nLits )
810 if ( i == (
int)pConflict->
nLits )
825 if ( pClause->
nLits > 1 )
890 if ( pClause->
nLits > 1 )
896 if ( pClause->
nLits != 1 )
908 printf(
"Found root level conflict!\n" );
920 printf(
"Found root level conflict!\n" );
956 for ( v = 0; v < (int)pClause->
nLits; v++ )
1013 p->
pFile = fopen(
"proof.cnf_",
"w" );
1027 if ( pClause->
fRoot )
1048 printf(
"Vars = %d. Roots = %d. Learned = %d. Resol steps = %d. Ave = %.2f. Mem = %.2f MB\n",
1086 if ( fClausesA ^ pClause->
fA )
1090 for ( v = 0; v < (int)pClause->
nLits; v++ )
1101 pSum =
Aig_Or( p, pSum, pLit );
1103 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)
static void Intb_ManWatchClause(Intb_Man_t *p, Sto_Cls_t *pClause, lit Lit)
static int lit_check(lit l, int n)
void Intb_ManProofWriteOne(Intb_Man_t *p, Sto_Cls_t *pClause)
int Intb_ManGlobalVars(Intb_Man_t *p)
void Intb_ManFree(Intb_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static void Intb_ManAigClear(Intb_Man_t *pMan, Aig_Obj_t **p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Intb_ManAigCopy(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
static void Intb_ManAigOrNot(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
#define ABC_REALLOC(type, obj, num)
static int lit_var(lit l)
static void Intb_ManAigFill(Intb_Man_t *pMan, Aig_Obj_t **p)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static Sto_Cls_t * Intb_ManPropagateOne(Intb_Man_t *p, lit Lit)
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
static void Intb_ManAigMux0(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q, int v)
#define ABC_ALLOC(type, num)
Intb_Man_t * Intb_ManAlloc()
FUNCTION DEFINITIONS ///.
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static abctime Abc_Clock()
for(p=first;p->value< newval;p=p->next)
void * Intb_ManInterpolate(Intb_Man_t *p, Sto_Man_t *pCnf, void *vVarsAB, int fVerbose)
int Intb_ManProofRecordOne(Intb_Man_t *p, Sto_Cls_t *pClause)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void Intb_ManResize(Intb_Man_t *p)
static int Intb_ManEnqueue(Intb_Man_t *p, lit Lit, Sto_Cls_t *pReason)
static lit lit_neg(lit l)
void Intb_ManPrintClause(Intb_Man_t *p, Sto_Cls_t *pClause)
void Intb_ManPrepareInter(Intb_Man_t *p)
void Intb_ManPrintResolvent(lit *pResLits, int nResLits)
static ABC_NAMESPACE_IMPL_START const lit LIT_UNDEF
DECLARATIONS ///.
int Intb_ManProcessRoots(Intb_Man_t *p)
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
static void Intb_ManAigOrNotVar(Intb_Man_t *pMan, Aig_Obj_t **p, int v)
#define ABC_NAMESPACE_IMPL_END
Aig_Obj_t * Aig_Or(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Aig_Man_t * Intb_ManDeriveClauses(Intb_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
static void Intb_ManAigOr(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Sto_Cls_t * Intb_ManPropagate(Intb_Man_t *p, int Start)
#define ABC_NAMESPACE_IMPL_START
static int Vec_IntSize(Vec_Int_t *p)
static Aig_Obj_t ** Intb_ManAigRead(Intb_Man_t *pMan, Sto_Cls_t *pCls)
Aig_Obj_t * Aig_Mux(Aig_Man_t *p, Aig_Obj_t *pC, Aig_Obj_t *p1, Aig_Obj_t *p0)
static int lit_sign(lit l)
static void Intb_ManCancelUntil(Intb_Man_t *p, int Level)
static void Intb_ManAigMux1(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q, int v)
static void Intb_ManProofSet(Intb_Man_t *p, Sto_Cls_t *pCls, int n)
static void Intb_ManAigOrVar(Intb_Man_t *pMan, Aig_Obj_t **p, int v)
#define Sto_ManForEachClause(p, pCls)
static int Intb_ManProofGet(Intb_Man_t *p, Sto_Cls_t *pCls)
#define Sto_ManForEachClauseRoot(p, pCls)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Intb_ManAigAnd(Intb_Man_t *pMan, Aig_Obj_t **p, Aig_Obj_t **q)
void Intb_ManPrintInterOne(Intb_Man_t *p, Sto_Cls_t *pClause)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Aig_ManCleanup(Aig_Man_t *p)
int Intb_ManGetGlobalVar(Intb_Man_t *p, int Var)
int Intb_ManProofTraceOne(Intb_Man_t *p, Sto_Cls_t *pConflict, Sto_Cls_t *pFinal)
static int lit_print(lit l)