diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2006-03-03 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2006-03-03 08:01:00 -0800 |
commit | 0e57e953062cd2d97573d8428f6f77853ba8535e (patch) | |
tree | 44eb008801aae04cd834aa0c02efd6cdd67a64b5 /src/sat/msat | |
parent | 9e6f8406e80c55455c464b01033040a88fd12c40 (diff) | |
download | abc-0e57e953062cd2d97573d8428f6f77853ba8535e.tar.gz abc-0e57e953062cd2d97573d8428f6f77853ba8535e.tar.bz2 abc-0e57e953062cd2d97573d8428f6f77853ba8535e.zip |
Version abc60303
Diffstat (limited to 'src/sat/msat')
-rw-r--r-- | src/sat/msat/msat.h | 11 | ||||
-rw-r--r-- | src/sat/msat/msatSolverCore.c | 2 | ||||
-rw-r--r-- | src/sat/msat/msatSolverSearch.c | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/sat/msat/msat.h b/src/sat/msat/msat.h index 40028784..94416a5d 100644 --- a/src/sat/msat/msat.h +++ b/src/sat/msat/msat.h @@ -21,6 +21,10 @@ #ifndef __MSAT_H__ #define __MSAT_H__ +#ifdef __cplusplus +extern "C" { +#endif + //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -154,8 +158,13 @@ extern double Msat_VarHeapReadMaxWeight( Msat_VarHeap_t * p ); extern int Msat_VarHeapCountNodes( Msat_VarHeap_t * p, double WeightLimit ); extern int Msat_VarHeapReadMax( Msat_VarHeap_t * p ); extern int Msat_VarHeapGetMax( Msat_VarHeap_t * p ); + +#ifdef __cplusplus +} +#endif + +#endif //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// -#endif diff --git a/src/sat/msat/msatSolverCore.c b/src/sat/msat/msatSolverCore.c index 091a0c55..397dbcdc 100644 --- a/src/sat/msat/msatSolverCore.c +++ b/src/sat/msat/msatSolverCore.c @@ -176,7 +176,7 @@ bool Msat_SolverSolve( Msat_Solver_t * p, Msat_IntVec_t * vAssumps, int nBackTra nConflictsLimit *= 1.5; nLearnedLimit *= 1.1; // if the limit on the number of backtracks is given, quit the restart loop - if ( nBackTrackLimit > 0 ) + if ( nBackTrackLimit > 0 && (int)p->Stats.nConflicts - p->nBackTracks > nBackTrackLimit ) break; // if the runtime limit is exceeded, quit the restart loop if ( nTimeLimit > 0 && clock() - timeStart >= nTimeLimit * CLOCKS_PER_SEC ) diff --git a/src/sat/msat/msatSolverSearch.c b/src/sat/msat/msatSolverSearch.c index e594d9c3..4b73d6b3 100644 --- a/src/sat/msat/msatSolverSearch.c +++ b/src/sat/msat/msatSolverSearch.c @@ -599,7 +599,7 @@ Msat_Type_t Msat_SolverSearch( Msat_Solver_t * p, int nConfLimit, int nLearnedLi Msat_SolverCancelUntil( p, p->nLevelRoot ); return MSAT_UNKNOWN; } - else if ( nBackTrackLimit > 0 && nConfs > nBackTrackLimit ) { + else if ( nBackTrackLimit > 0 && (int)p->Stats.nConflicts - p->nBackTracks > nBackTrackLimit ) { // Reached bound on number of conflicts: Msat_QueueClear( p->pQueue ); Msat_SolverCancelUntil( p, p->nLevelRoot ); |