diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/ivy/ivyFraig.c | 8 | ||||
-rw-r--r-- | src/proof/cec/cecSolve.c | 2 | ||||
-rw-r--r-- | src/proof/fra/fraSat.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c index 2bc6f0de..fdf6ea82 100644 --- a/src/aig/ivy/ivyFraig.c +++ b/src/aig/ivy/ivyFraig.c @@ -2119,9 +2119,9 @@ int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pN if ( p->pSat == NULL ) { p->pSat = sat_solver_new(); - p->pSat->factors = ABC_CALLOC( double, 1 ); - p->nSatVars = 1; sat_solver_setnvars( p->pSat, 1000 ); + p->pSat->factors = ABC_CALLOC( double, 1000 ); + p->nSatVars = 1; // var 0 is reserved for const1 node - add the clause // pLits[0] = toLit( 0 ); // sat_solver_addclause( p->pSat, pLits, pLits + 1 ); @@ -2271,9 +2271,9 @@ int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew ) if ( p->pSat == NULL ) { p->pSat = sat_solver_new(); - p->pSat->factors = ABC_CALLOC( double, 1 ); - p->nSatVars = 1; sat_solver_setnvars( p->pSat, 1000 ); + p->pSat->factors = ABC_CALLOC( double, 1000 ); + p->nSatVars = 1; // var 0 is reserved for const1 node - add the clause // pLits[0] = toLit( 0 ); // sat_solver_addclause( p->pSat, pLits, pLits + 1 ); diff --git a/src/proof/cec/cecSolve.c b/src/proof/cec/cecSolve.c index bd7202e4..712d5380 100644 --- a/src/proof/cec/cecSolve.c +++ b/src/proof/cec/cecSolve.c @@ -376,8 +376,8 @@ void Cec_ManSatSolverRecycle( Cec_ManSat_t * p ) sat_solver_delete( p->pSat ); } p->pSat = sat_solver_new(); - p->pSat->factors = ABC_CALLOC( double, 1 ); sat_solver_setnvars( p->pSat, 1000 ); + p->pSat->factors = ABC_CALLOC( double, 1000 ); // var 0 is not used // var 1 is reserved for const0 node - add the clause p->nSatVars = 1; diff --git a/src/proof/fra/fraSat.c b/src/proof/fra/fraSat.c index fef642f5..38702d5e 100644 --- a/src/proof/fra/fraSat.c +++ b/src/proof/fra/fraSat.c @@ -512,7 +512,7 @@ int Fra_SetActivityFactors_rec( Fra_Man_t * p, Aig_Obj_t * pObj, int LevelMin, i // set the factor of this variable // (LevelMax-LevelMin) / (pObj->Level-LevelMin) = p->pPars->dActConeBumpMax / ThisBump if ( p->pSat->factors == NULL ) - p->pSat->factors = ABC_CALLOC( double, p->pSat->size ); + p->pSat->factors = ABC_CALLOC( double, p->pSat->cap ); p->pSat->factors[Fra_ObjSatNum(pObj)] = p->pPars->dActConeBumpMax * (pObj->Level - LevelMin)/(LevelMax - LevelMin); veci_push(&p->pSat->act_vars, Fra_ObjSatNum(pObj)); // explore the fanins |