summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-12-23 00:29:26 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2011-12-23 00:29:26 -0800
commit9d2893040ea7c69f384b0735a1407e9d91f89e35 (patch)
tree2202268143c4175f7a126d820c8036c13da37ad5 /src/aig
parent844c385e2b8610ec8bdc4a55400f8efe79eac119 (diff)
downloadabc-9d2893040ea7c69f384b0735a1407e9d91f89e35.tar.gz
abc-9d2893040ea7c69f384b0735a1407e9d91f89e35.tar.bz2
abc-9d2893040ea7c69f384b0735a1407e9d91f89e35.zip
Transforming the solver to use different clause representation.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/cec/cecSolve.c1
-rw-r--r--src/aig/ivy/ivyFraig.c2
-rw-r--r--src/aig/saig/saigConstr2.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/aig/cec/cecSolve.c b/src/aig/cec/cecSolve.c
index dc1b88eb..e86c2f35 100644
--- a/src/aig/cec/cecSolve.c
+++ b/src/aig/cec/cecSolve.c
@@ -376,6 +376,7 @@ 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 );
// var 0 is not used
// var 1 is reserved for const0 node - add the clause
diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c
index b53805b4..f7c0743b 100644
--- a/src/aig/ivy/ivyFraig.c
+++ b/src/aig/ivy/ivyFraig.c
@@ -2113,6 +2113,7 @@ 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 );
// var 0 is reserved for const1 node - add the clause
@@ -2264,6 +2265,7 @@ 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 );
// var 0 is reserved for const1 node - add the clause
diff --git a/src/aig/saig/saigConstr2.c b/src/aig/saig/saigConstr2.c
index 6665d9f1..7f2eab6a 100644
--- a/src/aig/saig/saigConstr2.c
+++ b/src/aig/saig/saigConstr2.c
@@ -596,7 +596,8 @@ Vec_Vec_t * Ssw_ManFindDirectImplications( Aig_Man_t * p, int nFrames, int nConf
pReprR = Aig_Regular(pRepr);
if ( pCnf->pVarNums[Aig_ObjId(pReprR)] < 0 )
continue;
- value = pSat->assigns[ pCnf->pVarNums[Aig_ObjId(pReprR)] ];
+// value = pSat->assigns[ pCnf->pVarNums[Aig_ObjId(pReprR)] ];
+ value = sat_solver_get_var_value( pSat, pCnf->pVarNums[Aig_ObjId(pReprR)] );
if ( value == l_Undef )
continue;
// label this node as taken