Commit 94174d0f by Alan Mishchenko

Transforming the solver to use different clause representation.

parent 9d289304
...@@ -72,7 +72,7 @@ static const int var0 = 1; ...@@ -72,7 +72,7 @@ static const int var0 = 1;
static const int var1 = 0; static const int var1 = 0;
static const int varX = 3; static const int varX = 3;
struct varinfo_t struct varinfo2_t
{ {
// unsigned val : 2; // variable value // unsigned val : 2; // variable value
unsigned pol : 1; // last polarity unsigned pol : 1; // last polarity
...@@ -1263,7 +1263,7 @@ void sat_solver2_setnvars(sat_solver2* s,int n) ...@@ -1263,7 +1263,7 @@ void sat_solver2_setnvars(sat_solver2* s,int n)
while (s->cap < n) s->cap = s->cap*2+1; while (s->cap < n) s->cap = s->cap*2+1;
s->wlists = ABC_REALLOC(veci, s->wlists, s->cap*2); s->wlists = ABC_REALLOC(veci, s->wlists, s->cap*2);
s->vi = ABC_REALLOC(varinfo, s->vi, s->cap); s->vi = ABC_REALLOC(varinfo2, s->vi, s->cap);
s->levels = ABC_REALLOC(int, s->levels, s->cap); s->levels = ABC_REALLOC(int, s->levels, s->cap);
s->assigns = ABC_REALLOC(char, s->assigns, s->cap); s->assigns = ABC_REALLOC(char, s->assigns, s->cap);
s->trail = ABC_REALLOC(lit, s->trail, s->cap); s->trail = ABC_REALLOC(lit, s->trail, s->cap);
......
...@@ -80,7 +80,7 @@ extern void Sat_ProofCheck( sat_solver2 * s ); ...@@ -80,7 +80,7 @@ extern void Sat_ProofCheck( sat_solver2 * s );
// Solver representation: // Solver representation:
struct varinfo_t; struct varinfo_t;
typedef struct varinfo_t varinfo; typedef struct varinfo2_t varinfo2;
struct sat_solver2_t struct sat_solver2_t
{ {
...@@ -125,7 +125,7 @@ struct sat_solver2_t ...@@ -125,7 +125,7 @@ struct sat_solver2_t
veci claProofs; // clause proofs veci claProofs; // clause proofs
// internal state // internal state
varinfo * vi; // variable information varinfo2 * vi; // variable information
int* levels; // int* levels; //
char* assigns; // char* assigns; //
lit* trail; // sequence of assignment and implications lit* trail; // sequence of assignment and implications
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment