src/sat/msat/msatSolverSearch.c File Reference

#include "msatInt.h"
Include dependency graph for msatSolverSearch.c:

Go to the source code of this file.

Functions

static void Msat_SolverUndoOne (Msat_Solver_t *p)
static void Msat_SolverCancel (Msat_Solver_t *p)
static Msat_Clause_tMsat_SolverRecord (Msat_Solver_t *p, Msat_IntVec_t *vLits)
static void Msat_SolverAnalyze (Msat_Solver_t *p, Msat_Clause_t *pC, Msat_IntVec_t *vLits_out, int *pLevel_out)
static void Msat_SolverReduceDB (Msat_Solver_t *p)
bool Msat_SolverAssume (Msat_Solver_t *p, Msat_Lit_t Lit)
void Msat_SolverCancelUntil (Msat_Solver_t *p, int Level)
bool Msat_SolverEnqueue (Msat_Solver_t *p, Msat_Lit_t Lit, Msat_Clause_t *pC)
Msat_Clause_tMsat_SolverPropagate (Msat_Solver_t *p)
bool Msat_SolverSimplifyDB (Msat_Solver_t *p)
void Msat_SolverRemoveLearned (Msat_Solver_t *p)
void Msat_SolverRemoveMarked (Msat_Solver_t *p)
Msat_Type_t Msat_SolverSearch (Msat_Solver_t *p, int nConfLimit, int nLearnedLimit, int nBackTrackLimit, Msat_SearchParams_t *pPars)

Function Documentation

void Msat_SolverAnalyze ( Msat_Solver_t p,
Msat_Clause_t pC,
Msat_IntVec_t vLits_out,
int *  pLevel_out 
) [static]

Function*************************************************************

Synopsis [Analyze conflict and produce a reason clause.]

Description [Current decision level must be greater than root level.]

SideEffects [vLits_out[0] is the asserting literal at level pLevel_out.]

SeeAlso []

Definition at line 452 of file msatSolverSearch.c.

00453 {
00454     Msat_Lit_t LitQ, Lit = MSAT_LIT_UNASSIGNED;
00455     Msat_Var_t VarQ, Var;
00456     int * pReasonArray, nReasonSize;
00457     int j, pathC = 0, nLevelCur = Msat_IntVecReadSize(p->vTrailLim);
00458     int iStep = Msat_IntVecReadSize(p->vTrail) - 1;
00459 
00460     // increment the seen counter
00461     p->nSeenId++;
00462     // empty the vector array
00463     Msat_IntVecClear( vLits_out );
00464     Msat_IntVecPush( vLits_out, -1 ); // (leave room for the asserting literal)
00465     *pLevel_out = 0;
00466     do {
00467         assert( pC != NULL );  // (otherwise should be UIP)
00468         // get the reason of conflict
00469         Msat_ClauseCalcReason( p, pC, Lit, p->vReason );
00470         nReasonSize  = Msat_IntVecReadSize( p->vReason );
00471         pReasonArray = Msat_IntVecReadArray( p->vReason );
00472         for ( j = 0; j < nReasonSize; j++ ) {
00473             LitQ = pReasonArray[j];
00474             VarQ = MSAT_LIT2VAR(LitQ);
00475             if ( p->pSeen[VarQ] != p->nSeenId ) {
00476                 p->pSeen[VarQ] = p->nSeenId;
00477 
00478                 // added to better fine-tune the search
00479                 Msat_SolverVarBumpActivity( p, LitQ );
00480 
00481                 // skip all the literals on this decision level
00482                 if ( p->pLevel[VarQ] == nLevelCur )
00483                     pathC++;
00484                 else if ( p->pLevel[VarQ] > 0 ) { 
00485                     // add the literals on other decision levels but
00486                     // exclude variables from decision level 0
00487                     Msat_IntVecPush( vLits_out, MSAT_LITNOT(LitQ) );
00488                     if ( *pLevel_out < p->pLevel[VarQ] )
00489                         *pLevel_out = p->pLevel[VarQ];
00490                 }
00491             }
00492         }
00493         // Select next clause to look at:
00494         do {
00495 //            Lit = Msat_IntVecReadEntryLast(p->vTrail);
00496             Lit = Msat_IntVecReadEntry( p->vTrail, iStep-- );
00497             Var = MSAT_LIT2VAR(Lit);
00498             pC = p->pReasons[Var];
00499 //            Msat_SolverUndoOne( p );
00500         } while ( p->pSeen[Var] != p->nSeenId );
00501         pathC--;
00502     } while ( pathC > 0 );
00503     // we do not unbind the variables above
00504     // this will be done after conflict analysis
00505 
00506     Msat_IntVecWriteEntry( vLits_out, 0, MSAT_LITNOT(Lit) );
00507     if ( p->fVerbose )
00508     {
00509         printf( L_IND"Learnt {", L_ind );
00510         nReasonSize  = Msat_IntVecReadSize( vLits_out );
00511         pReasonArray = Msat_IntVecReadArray( vLits_out );
00512         for ( j = 0; j < nReasonSize; j++ ) 
00513             printf(" "L_LIT, L_lit(pReasonArray[j]));
00514         printf(" } at level %d\n", *pLevel_out); 
00515     }
00516 }

bool Msat_SolverAssume ( Msat_Solver_t p,
Msat_Lit_t  Lit 
)

FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis [Makes the next assumption (Lit).]

Description [Returns FALSE if immediate conflict.]

SideEffects []

SeeAlso []

Definition at line 48 of file msatSolverSearch.c.

00049 {
00050     assert( Msat_QueueReadSize(p->pQueue) == 0 );
00051     if ( p->fVerbose )
00052         printf(L_IND"assume("L_LIT")\n", L_ind, L_lit(Lit));
00053     Msat_IntVecPush( p->vTrailLim, Msat_IntVecReadSize(p->vTrail) );
00054 //    assert( Msat_IntVecReadSize(p->vTrailLim) <= Msat_IntVecReadSize(p->vTrail) + 1 );
00055 //    assert( Msat_IntVecReadSize( p->vTrailLim ) < p->nVars );
00056     return Msat_SolverEnqueue( p, Lit, NULL );
00057 }

void Msat_SolverCancel ( Msat_Solver_t p  )  [static]

Function*************************************************************

Synopsis [Reverts to the state before last Msat_SolverAssume().]

Description []

SideEffects []

SeeAlso []

Definition at line 97 of file msatSolverSearch.c.

00098 {
00099     int c;
00100     assert( Msat_QueueReadSize(p->pQueue) == 0 );
00101     if ( p->fVerbose )
00102     {
00103         if ( Msat_IntVecReadSize(p->vTrail) != Msat_IntVecReadEntryLast(p->vTrailLim) )
00104         {
00105             Msat_Lit_t Lit;
00106             Lit = Msat_IntVecReadEntry( p->vTrail, Msat_IntVecReadEntryLast(p->vTrailLim) ); 
00107             printf(L_IND"cancel("L_LIT")\n", L_ind, L_lit(Lit));
00108         }
00109     }
00110     for ( c = Msat_IntVecReadSize(p->vTrail) - Msat_IntVecPop( p->vTrailLim ); c != 0; c-- )
00111         Msat_SolverUndoOne( p );
00112 }

void Msat_SolverCancelUntil ( Msat_Solver_t p,
int  Level 
)

Function*************************************************************

Synopsis [Reverts to the state at given level.]

Description []

SideEffects []

SeeAlso []

Definition at line 125 of file msatSolverSearch.c.

00126 {
00127     while ( Msat_IntVecReadSize(p->vTrailLim) > Level )
00128         Msat_SolverCancel(p);
00129 }

bool Msat_SolverEnqueue ( Msat_Solver_t p,
Msat_Lit_t  Lit,
Msat_Clause_t pC 
)

Function*************************************************************

Synopsis [Enqueues one variable assignment.]

Description [Puts a new fact on the propagation queue and immediately updates the variable value. Should a conflict arise, FALSE is returned. Otherwise returns TRUE.]

SideEffects []

SeeAlso []

Definition at line 170 of file msatSolverSearch.c.

00171 {
00172     Msat_Var_t Var = MSAT_LIT2VAR(Lit);
00173 
00174     // skip literals that are not in the current cone
00175     if ( !Msat_IntVecReadEntry( p->vVarsUsed, Var ) )
00176         return 1;
00177 
00178 //    assert( Msat_QueueReadSize(p->pQueue) == Msat_IntVecReadSize(p->vTrail) );
00179     // if the literal is assigned
00180     // return 1 if the assignment is consistent
00181     // return 0 if the assignment is inconsistent (conflict)
00182     if ( p->pAssigns[Var] != MSAT_VAR_UNASSIGNED )
00183         return p->pAssigns[Var] == Lit;
00184     // new fact - store it
00185     if ( p->fVerbose )
00186     {
00187 //        printf(L_IND"bind("L_LIT")\n", L_ind, L_lit(Lit));
00188         printf(L_IND"bind("L_LIT")  ", L_ind, L_lit(Lit));
00189         Msat_ClausePrintSymbols( pC );
00190     }
00191     p->pAssigns[Var] = Lit;
00192     p->pLevel[Var]   = Msat_IntVecReadSize(p->vTrailLim);
00193 //    p->pReasons[Var] = p->pLevel[Var]? pC: NULL;
00194     p->pReasons[Var] = pC;
00195     Msat_IntVecPush( p->vTrail, Lit );
00196     Msat_QueueInsert( p->pQueue, Lit );
00197 
00198     Msat_OrderVarAssigned( p->pOrder, Var );
00199     return 1;
00200 }

Msat_Clause_t* Msat_SolverPropagate ( Msat_Solver_t p  ) 

Function*************************************************************

Synopsis [Propagates the assignments in the queue.]

Description [Propagates all enqueued facts. If a conflict arises, the conflicting clause is returned, otherwise NULL.]

SideEffects [The propagation queue is empty, even if there was a conflict.]

SeeAlso []

Definition at line 214 of file msatSolverSearch.c.

00215 {
00216     Msat_ClauseVec_t ** pvWatched = p->pvWatched;
00217     Msat_Clause_t ** pClauses;
00218     Msat_Clause_t * pConflict;
00219     Msat_Lit_t Lit, Lit_out;
00220     int i, j, nClauses;
00221 
00222     // propagate all the literals in the queue
00223     while ( (Lit = Msat_QueueExtract( p->pQueue )) >= 0 )
00224     {
00225         p->Stats.nPropagations++;
00226         // get the clauses watched by this literal
00227         nClauses = Msat_ClauseVecReadSize( pvWatched[Lit] );
00228         pClauses = Msat_ClauseVecReadArray( pvWatched[Lit] );
00229         // go through the watched clauses and decide what to do with them
00230         for ( i = j = 0; i < nClauses; i++ )
00231         {
00232             p->Stats.nInspects++;
00233             // clear the returned literal
00234             Lit_out = -1;
00235             // propagate the clause
00236             if ( !Msat_ClausePropagate( pClauses[i], Lit, p->pAssigns, &Lit_out ) )
00237             {   // the clause is unit
00238                 // "Lit_out" contains the new assignment to be enqueued
00239                 if ( Msat_SolverEnqueue( p, Lit_out, pClauses[i] ) ) 
00240                 { // consistent assignment 
00241                     // no changes to the implication queue; the watch is the same too
00242                     pClauses[j++] = pClauses[i];
00243                     continue;
00244                 }
00245                 // remember the reason of conflict (will be returned)
00246                 pConflict = pClauses[i];
00247                 // leave the remaning clauses in the same watched list
00248                 for ( ; i < nClauses; i++ )
00249                     pClauses[j++] = pClauses[i];
00250                 Msat_ClauseVecShrink( pvWatched[Lit], j );
00251                 // clear the propagation queue
00252                 Msat_QueueClear( p->pQueue );
00253                 return pConflict;
00254             }
00255             // the clause is not unit
00256             // in this case "Lit_out" contains the new watch if it has changed
00257             if ( Lit_out >= 0 )
00258                 Msat_ClauseVecPush( pvWatched[Lit_out], pClauses[i] );
00259             else // the watch did not change
00260                 pClauses[j++] = pClauses[i];
00261         }
00262         Msat_ClauseVecShrink( pvWatched[Lit], j );
00263     }
00264     return NULL;
00265 }

Msat_Clause_t * Msat_SolverRecord ( Msat_Solver_t p,
Msat_IntVec_t vLits 
) [static]

Function*************************************************************

Synopsis [Record a clause and drive backtracking.]

Description [vLits[0] must contain the asserting literal.]

SideEffects []

SeeAlso []

Definition at line 143 of file msatSolverSearch.c.

00144 {
00145     Msat_Clause_t * pC;
00146     int Value;
00147     assert( Msat_IntVecReadSize(vLits) != 0 );
00148     Value = Msat_ClauseCreate( p, vLits, 1, &pC );
00149     assert( Value );
00150     Value = Msat_SolverEnqueue( p, Msat_IntVecReadEntry(vLits,0), pC );
00151     assert( Value );
00152     if ( pC )
00153         Msat_ClauseVecPush( p->vLearned, pC );
00154     return pC;
00155 }

void Msat_SolverReduceDB ( Msat_Solver_t p  )  [static]

Function*************************************************************

Synopsis [Cleans the clause databased from the useless learnt clauses.]

Description [Removes half of the learnt clauses, minus the clauses locked by the current assignment. Locked clauses are clauses that are reason to a some assignment.]

SideEffects []

SeeAlso []

Definition at line 329 of file msatSolverSearch.c.

00330 {
00331     Msat_Clause_t ** pLearned;
00332     int nLearned, i, j;
00333     double dExtraLim = p->dClaInc / Msat_ClauseVecReadSize(p->vLearned); 
00334     // Remove any clause below this activity
00335 
00336     // sort the learned clauses in the increasing order of activity
00337     Msat_SolverSortDB( p );
00338 
00339     // discard the first half the clauses (the less active ones)
00340     nLearned = Msat_ClauseVecReadSize( p->vLearned );
00341     pLearned = Msat_ClauseVecReadArray( p->vLearned );
00342     for ( i = j = 0; i < nLearned / 2; i++ )
00343         if ( !Msat_ClauseIsLocked( p, pLearned[i]) )
00344             Msat_ClauseFree( p, pLearned[i], 1 );
00345         else
00346             pLearned[j++] = pLearned[i];
00347     // filter the more active clauses and leave those above the limit
00348     for (  ; i < nLearned; i++ )
00349         if ( !Msat_ClauseIsLocked( p, pLearned[i] ) && 
00350             Msat_ClauseReadActivity(pLearned[i]) < dExtraLim )
00351             Msat_ClauseFree( p, pLearned[i], 1 );
00352         else
00353             pLearned[j++] = pLearned[i];
00354     Msat_ClauseVecShrink( p->vLearned, j );
00355 }

void Msat_SolverRemoveLearned ( Msat_Solver_t p  ) 

Function*************************************************************

Synopsis [Removes the learned clauses.]

Description []

SideEffects []

SeeAlso []

Definition at line 368 of file msatSolverSearch.c.

00369 {
00370     Msat_Clause_t ** pLearned;
00371     int nLearned, i;
00372 
00373     // discard the learned clauses
00374     nLearned = Msat_ClauseVecReadSize( p->vLearned );
00375     pLearned = Msat_ClauseVecReadArray( p->vLearned );
00376     for ( i = 0; i < nLearned; i++ )
00377     {
00378         assert( !Msat_ClauseIsLocked( p, pLearned[i]) );
00379         
00380         Msat_ClauseFree( p, pLearned[i], 1 );
00381     }
00382     Msat_ClauseVecShrink( p->vLearned, 0 );
00383     p->nClauses = Msat_ClauseVecReadSize(p->vClauses);
00384 
00385     for ( i = 0; i < p->nVarsAlloc; i++ )
00386         p->pReasons[i] = NULL;
00387 }

void Msat_SolverRemoveMarked ( Msat_Solver_t p  ) 

Function*************************************************************

Synopsis [Removes the recently added clauses.]

Description []

SideEffects []

SeeAlso []

Definition at line 400 of file msatSolverSearch.c.

00401 {
00402     Msat_Clause_t ** pLearned, ** pClauses;
00403     int nLearned, nClauses, i;
00404 
00405     // discard the learned clauses
00406     nClauses = Msat_ClauseVecReadSize( p->vClauses );
00407     pClauses = Msat_ClauseVecReadArray( p->vClauses );
00408     for ( i = p->nClausesStart; i < nClauses; i++ )
00409     {
00410 //        assert( !Msat_ClauseIsLocked( p, pClauses[i]) );
00411         Msat_ClauseFree( p, pClauses[i], 1 );
00412     }
00413     Msat_ClauseVecShrink( p->vClauses, p->nClausesStart );
00414 
00415     // discard the learned clauses
00416     nLearned = Msat_ClauseVecReadSize( p->vLearned );
00417     pLearned = Msat_ClauseVecReadArray( p->vLearned );
00418     for ( i = 0; i < nLearned; i++ )
00419     {
00420 //        assert( !Msat_ClauseIsLocked( p, pLearned[i]) );
00421         Msat_ClauseFree( p, pLearned[i], 1 );
00422     }
00423     Msat_ClauseVecShrink( p->vLearned, 0 );
00424     p->nClauses = Msat_ClauseVecReadSize(p->vClauses);
00425 /*
00426     // undo the previous data
00427     for ( i = 0; i < p->nVarsAlloc; i++ )
00428     {
00429         p->pAssigns[i]   = MSAT_VAR_UNASSIGNED;
00430         p->pReasons[i]   = NULL;
00431         p->pLevel[i]     = -1;
00432         p->pdActivity[i] = 0.0;
00433     }
00434     Msat_OrderClean( p->pOrder, p->nVars, NULL );
00435     Msat_QueueClear( p->pQueue );
00436 */
00437 }

Msat_Type_t Msat_SolverSearch ( Msat_Solver_t p,
int  nConfLimit,
int  nLearnedLimit,
int  nBackTrackLimit,
Msat_SearchParams_t pPars 
)

Function*************************************************************

Synopsis [The search procedure called between the restarts.]

Description [Search for a satisfying solution as long as the number of conflicts does not exceed the limit (nConfLimit) while keeping the number of learnt clauses below the provided limit (nLearnedLimit). NOTE! Use negative value for nConfLimit or nLearnedLimit to indicate infinity.]

SideEffects []

SeeAlso []

Definition at line 532 of file msatSolverSearch.c.

00533 {
00534     Msat_Clause_t * pConf;
00535     Msat_Var_t Var;
00536     int nLevelBack, nConfs, nAssigns, Value;
00537     int i;
00538 
00539     assert( Msat_SolverReadDecisionLevel(p) == p->nLevelRoot );
00540     p->Stats.nStarts++;
00541     p->dVarDecay = 1 / pPars->dVarDecay;
00542     p->dClaDecay = 1 / pPars->dClaDecay;
00543 
00544     // reset the activities
00545     for ( i = 0; i < p->nVars; i++ )
00546        p->pdActivity[i] = (double)p->pFactors[i];
00547 //       p->pdActivity[i] = 0.0;
00548 
00549     nConfs = 0;
00550     while ( 1 )
00551     {
00552         pConf = Msat_SolverPropagate( p );
00553         if ( pConf != NULL ){
00554             // CONFLICT
00555             if ( p->fVerbose )
00556             {
00557 //                printf(L_IND"**CONFLICT**\n", L_ind);
00558                 printf(L_IND"**CONFLICT**  ", L_ind);
00559                 Msat_ClausePrintSymbols( pConf );
00560             }
00561             // count conflicts
00562             p->Stats.nConflicts++;
00563             nConfs++;
00564 
00565             // if top level, return UNSAT
00566             if ( Msat_SolverReadDecisionLevel(p) == p->nLevelRoot )
00567                 return MSAT_FALSE;
00568 
00569             // perform conflict analysis
00570             Msat_SolverAnalyze( p, pConf, p->vTemp, &nLevelBack );
00571             Msat_SolverCancelUntil( p, (p->nLevelRoot > nLevelBack)? p->nLevelRoot : nLevelBack );
00572             Msat_SolverRecord( p, p->vTemp );
00573 
00574             // it is important that recording is done after cancelling
00575             // because canceling cleans the queue while recording adds to it
00576             Msat_SolverVarDecayActivity( p );
00577             Msat_SolverClaDecayActivity( p );
00578 
00579         }
00580         else{
00581             // NO CONFLICT
00582             if ( Msat_IntVecReadSize(p->vTrailLim) == 0 ) {
00583                 // Simplify the set of problem clauses:
00584 //                Value = Msat_SolverSimplifyDB(p);
00585 //                assert( Value );
00586             }
00587             nAssigns = Msat_IntVecReadSize( p->vTrail );
00588             if ( nLearnedLimit >= 0 && Msat_ClauseVecReadSize(p->vLearned) >= nLearnedLimit + nAssigns ) {
00589                 // Reduce the set of learnt clauses:
00590                 Msat_SolverReduceDB(p);
00591             }
00592 
00593             Var = Msat_OrderVarSelect( p->pOrder );
00594             if ( Var == MSAT_ORDER_UNKNOWN ) {
00595                 // Model found and stored in p->pAssigns
00596                 memcpy( p->pModel, p->pAssigns, sizeof(int) * p->nVars );
00597                 Msat_QueueClear( p->pQueue );
00598                 Msat_SolverCancelUntil( p, p->nLevelRoot );
00599                 return MSAT_TRUE;
00600             }
00601             if ( nConfLimit > 0 && nConfs > nConfLimit ) {
00602                 // Reached bound on number of conflicts:
00603                 p->dProgress = Msat_SolverProgressEstimate( p );
00604                 Msat_QueueClear( p->pQueue );
00605                 Msat_SolverCancelUntil( p, p->nLevelRoot );
00606                 return MSAT_UNKNOWN; 
00607             }
00608             else if ( nBackTrackLimit > 0 && (int)p->Stats.nConflicts - p->nBackTracks > nBackTrackLimit ) {
00609                 // Reached bound on number of conflicts:
00610                 Msat_QueueClear( p->pQueue );
00611                 Msat_SolverCancelUntil( p, p->nLevelRoot );
00612                 return MSAT_UNKNOWN; 
00613             }
00614             else{
00615                 // New variable decision:
00616                 p->Stats.nDecisions++;
00617                 assert( Var != MSAT_ORDER_UNKNOWN && Var >= 0 && Var < p->nVars );
00618                 Value = Msat_SolverAssume(p, MSAT_VAR2LIT(Var,0) );
00619                 assert( Value );
00620             }
00621         }
00622     }
00623 }

bool Msat_SolverSimplifyDB ( Msat_Solver_t p  ) 

Function*************************************************************

Synopsis [Simplifies the data base.]

Description [Simplify all constraints according to the current top-level assigment (redundant constraints may be removed altogether).]

SideEffects []

SeeAlso []

Definition at line 279 of file msatSolverSearch.c.

00280 {
00281     Msat_ClauseVec_t * vClauses;
00282     Msat_Clause_t ** pClauses;
00283     int nClauses, Type, i, j;
00284     int * pAssigns;
00285     int Counter;
00286 
00287     assert( Msat_SolverReadDecisionLevel(p) == 0 );
00288     if ( Msat_SolverPropagate(p) != NULL )
00289         return 0;
00290 //Msat_SolverPrintClauses( p );
00291 //Msat_SolverPrintAssignment( p );
00292 //printf( "Simplification\n" );
00293 
00294     // simplify and reassign clause numbers
00295     Counter = 0;
00296     pAssigns = Msat_SolverReadAssignsArray( p );
00297     for ( Type = 0; Type < 2; Type++ )
00298     {
00299         vClauses = Type? p->vLearned : p->vClauses;
00300         nClauses = Msat_ClauseVecReadSize( vClauses );
00301         pClauses = Msat_ClauseVecReadArray( vClauses );
00302         for ( i = j = 0; i < nClauses; i++ )
00303             if ( Msat_ClauseSimplify( pClauses[i], pAssigns ) )
00304                 Msat_ClauseFree( p, pClauses[i], 1 );
00305             else
00306             {
00307                 pClauses[j++] = pClauses[i];
00308                 Msat_ClauseSetNum( pClauses[i], Counter++ );
00309             }
00310         Msat_ClauseVecShrink( vClauses, j );
00311     }
00312     p->nClauses = Counter;
00313     return 1;
00314 }

void Msat_SolverUndoOne ( Msat_Solver_t p  )  [static]

CFile****************************************************************

FileName [msatSolverSearch.c]

PackageName [A C version of SAT solver MINISAT, originally developed in C++ by Niklas Een and Niklas Sorensson, Chalmers University of Technology, Sweden: http://www.cs.chalmers.se/~een/Satzoo.]

Synopsis [The search part of the solver.]

Author [Alan Mishchenko <alanmi@eecs.berkeley.edu>]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - January 1, 2004.]

Revision [

Id
msatSolverSearch.c,v 1.0 2004/01/01 1:00:00 alanmi Exp

] DECLARATIONS ///

Function*************************************************************

Synopsis [Reverts one variable binding on the trail.]

Description []

SideEffects []

SeeAlso []

Definition at line 70 of file msatSolverSearch.c.

00071 {
00072     Msat_Lit_t Lit;
00073     Msat_Var_t Var;
00074     Lit = Msat_IntVecPop( p->vTrail ); 
00075     Var = MSAT_LIT2VAR(Lit);
00076     p->pAssigns[Var] = MSAT_VAR_UNASSIGNED;
00077     p->pReasons[Var] = NULL;
00078     p->pLevel[Var]   = -1;
00079 //    Msat_OrderUndo( p->pOrder, Var );
00080     Msat_OrderVarUnassigned( p->pOrder, Var );
00081 
00082     if ( p->fVerbose )
00083         printf(L_IND"unbind("L_LIT")\n", L_ind, L_lit(Lit)); 
00084 }


Generated on Tue Jan 5 12:19:40 2010 for abc70930 by  doxygen 1.6.1