summaryrefslogtreecommitdiffstats
path: root/src/sat
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-09-20 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2006-09-20 08:01:00 -0700
commit0da555cb481696efd78d9c5dc6293b6a95d1ffd5 (patch)
treebac6826fd2c8650225f237ca524b8b0276c9c224 /src/sat
parent370578bf1c4504b65f49ab63fcf7ed9c88a15d69 (diff)
downloadabc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.tar.gz
abc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.tar.bz2
abc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.zip
Version abc60920
Diffstat (limited to 'src/sat')
-rw-r--r--src/sat/asat/solver.c7
-rw-r--r--src/sat/asat/solver.h2
-rw-r--r--src/sat/fraig/fraigSat.c14
3 files changed, 22 insertions, 1 deletions
diff --git a/src/sat/asat/solver.c b/src/sat/asat/solver.c
index 34b4d233..6f8fe037 100644
--- a/src/sat/asat/solver.c
+++ b/src/sat/asat/solver.c
@@ -853,9 +853,16 @@ static lbool solver_search(solver* s, int nof_conflicts, int nof_learnts)
// reset the activities
if ( s->factors )
+ {
+ s->var_inc = 1.0;
for ( i = 0; i < s->size; i++ )
+ {
s->activity[i] = (double)s->factors[i];
+// if ( s->orderpos[i] != -1 )
+// order_update(s, i );
+ }
// s->activity[i] = 1.0;
+ }
for (;;){
clause* confl = solver_propagate(s);
diff --git a/src/sat/asat/solver.h b/src/sat/asat/solver.h
index 7a5e5be6..bd6e8569 100644
--- a/src/sat/asat/solver.h
+++ b/src/sat/asat/solver.h
@@ -76,7 +76,7 @@ extern void solver_delete(solver* s);
extern bool solver_addclause(solver* s, lit* begin, lit* end);
extern bool solver_simplify(solver* s);
-extern int solver_solve(solver* s, lit* begin, lit* end, sint64 nConfLimit, sint64 nInsLimit );
+extern int solver_solve(solver* s, lit* begin, lit* end, sint64 nConfLimit, sint64 nInsLimit);
extern int * solver_get_model( solver * p, int * pVars, int nVars );
extern int solver_nvars(solver* s);
diff --git a/src/sat/fraig/fraigSat.c b/src/sat/fraig/fraigSat.c
index af0f13ce..53057fc3 100644
--- a/src/sat/fraig/fraigSat.c
+++ b/src/sat/fraig/fraigSat.c
@@ -300,6 +300,7 @@ int Fraig_NodeIsEquivalent( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t *
{
int RetValue, RetValue1, i, fComp, clk;
int fVerbose = 0;
+ int fSwitch = 0;
// make sure the nodes are not complemented
assert( !Fraig_IsComplement(pNew) );
@@ -318,6 +319,7 @@ int Fraig_NodeIsEquivalent( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t *
if ( nBTLimit <= 10 )
return 0;
nBTLimit = (int)sqrt(nBTLimit);
+// fSwitch = 1;
}
p->nSatCalls++;
@@ -417,6 +419,8 @@ PRT( "time", clock() - clk );
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
// printf( "s(%d)", pNew->Level );
+ if ( fSwitch )
+ printf( "s(%d)", pNew->Level );
p->nSatCounter++;
return 0;
}
@@ -433,6 +437,8 @@ p->time3 += clock() - clk;
pOld->fFailTfo = 1;
pNew->fFailTfo = 1;
// p->nSatFails++;
+ if ( fSwitch )
+ printf( "T(%d)", pNew->Level );
p->nSatFailsReal++;
return 0;
}
@@ -491,6 +497,8 @@ PRT( "time", clock() - clk );
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
// printf( "s(%d)", pNew->Level );
+ if ( fSwitch )
+ printf( "s(%d)", pNew->Level );
return 0;
}
else // if ( RetValue1 == MSAT_UNKNOWN )
@@ -500,6 +508,8 @@ p->time3 += clock() - clk;
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
// printf( "T(%d)", pNew->Level );
+ if ( fSwitch )
+ printf( "T(%d)", pNew->Level );
// mark the node as the failed node
pOld->fFailTfo = 1;
@@ -515,6 +525,10 @@ p->time3 += clock() - clk;
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
// printf( "u(%d)", pNew->Level );
+
+ if ( fSwitch )
+ printf( "u(%d)", pNew->Level );
+
return 1;
}