diff options
Diffstat (limited to 'src/sat/bmc/bmcMaj2.c')
-rw-r--r-- | src/sat/bmc/bmcMaj2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sat/bmc/bmcMaj2.c b/src/sat/bmc/bmcMaj2.c index 23b5cf41..aed84474 100644 --- a/src/sat/bmc/bmcMaj2.c +++ b/src/sat/bmc/bmcMaj2.c @@ -735,6 +735,16 @@ static int Exa_ManAddCnfStart( Exa_Man_t * p, int fOnlyAnd ) return 0; } } + // node ordering + for ( j = p->nVars; j < i; j++ ) + for ( n = 0; n < p->nObjs; n++ ) if ( p->VarMarks[i][0][n] ) + for ( m = n+1; m < p->nObjs; m++ ) if ( p->VarMarks[j][0][m] ) + { + pLits2[0] = Abc_Var2Lit( p->VarMarks[i][0][n], 1 ); + pLits2[1] = Abc_Var2Lit( p->VarMarks[j][0][m], 1 ); + if ( !sat_solver_addclause( p->pSat, pLits2, pLits2+2 ) ) + return 0; + } // two input functions for ( k = 0; k < 3; k++ ) { @@ -1126,6 +1136,18 @@ static int Exa3_ManAddCnfStart( Exa3_Man_t * p, int fOnlyAnd ) return 0; } } + //printf( "Node %d:\n", i ); + //sat_solver_flip_print_clause( p->pSat ); + // node ordering + for ( j = p->nVars; j < i; j++ ) + for ( n = 0; n < p->nObjs; n++ ) if ( p->VarMarks[i][0][n] ) + for ( m = n+1; m < p->nObjs; m++ ) if ( p->VarMarks[j][0][m] ) + { + pLits2[0] = Abc_Var2Lit( p->VarMarks[i][0][n], 1 ); + pLits2[1] = Abc_Var2Lit( p->VarMarks[j][0][m], 1 ); + if ( !sat_solver_addclause( p->pSat, pLits2, pLits2+2 ) ) + return 0; + } if ( p->nLutSize != 2 ) continue; // two-input functions |