diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-02-02 12:44:54 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-02-02 12:44:54 -0800 |
commit | f14ee271abe8d38a6dad8789d4b4dbc207fe23c4 (patch) | |
tree | 2d53ab2e134f369c6f7c079a63c704909544c54a /src/sat/xsat/xsatSolver.c | |
parent | a226496bf9174b5d50df5a438e1ee52770492f4d (diff) | |
download | abc-f14ee271abe8d38a6dad8789d4b4dbc207fe23c4.tar.gz abc-f14ee271abe8d38a6dad8789d4b4dbc207fe23c4.tar.bz2 abc-f14ee271abe8d38a6dad8789d4b4dbc207fe23c4.zip |
Reordering if-statements in the xsat solver.
Diffstat (limited to 'src/sat/xsat/xsatSolver.c')
-rw-r--r-- | src/sat/xsat/xsatSolver.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sat/xsat/xsatSolver.c b/src/sat/xsat/xsatSolver.c index 9a98eec0..9807e1b7 100644 --- a/src/sat/xsat/xsatSolver.c +++ b/src/sat/xsat/xsatSolver.c @@ -680,12 +680,10 @@ unsigned xSAT_SolverPropagate( xSAT_Solver_t* s ) nProp++; for ( i = begin; i < end; i++ ) { - if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == xSAT_LitSign( xSAT_NegLit( i->Blocker ) ) ) - { - return i->CRef; - } - else if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == VarX ) + if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == VarX ) xSAT_SolverEnqueue( s, i->Blocker, i->CRef ); + else if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == xSAT_LitSign( xSAT_NegLit( i->Blocker ) ) ) + return i->CRef; } ws = xSAT_VecWatchListEntry( s->vWatches, p ); |