47 if ( p->nVars == p->nVarsAlloc )
49 p->pLevel[p->nVars] = Level;
90 double dProgress = 0.0;
91 double dF = 1.0 / p->nVars;
93 for ( i = 0; i < p->nVars; i++ )
95 dProgress += pow( dF, p->pLevel[i] );
96 return dProgress / p->nVars;
112 printf(
"C solver (%d vars; %d clauses; %d learned):\n",
114 printf(
"starts : %d\n", (
int)p->Stats.nStarts);
115 printf(
"conflicts : %d\n", (
int)p->Stats.nConflicts);
116 printf(
"decisions : %d\n", (
int)p->Stats.nDecisions);
117 printf(
"propagations : %d\n", (
int)p->Stats.nPropagations);
118 printf(
"inspects : %d\n", (
int)p->Stats.nInspects);
141 double nConflictsLimit, nLearnedLimit;
150 int * pAssumps, nAssumps, i;
156 for ( i = 0; i < nAssumps; i++ )
168 nConflictsLimit = 100;
171 p->nBackTracks = (int)p->Stats.nConflicts;
175 printf(
"Solving -- conflicts=%d learnts=%d progress=%.4f %%\n",
176 (
int)nConflictsLimit, (
int)nLearnedLimit, p->dProgress*100);
177 Status =
Msat_SolverSearch( p, (
int)nConflictsLimit, (
int)nLearnedLimit, nBackTrackLimit, &Params );
178 nConflictsLimit *= 1.5;
179 nLearnedLimit *= 1.1;
181 if ( nBackTrackLimit > 0 && (
int)p->Stats.nConflicts - p->nBackTracks > nBackTrackLimit )
184 if ( nTimeLimit > 0 &&
Abc_Clock() - timeStart >= nTimeLimit * CLOCKS_PER_SEC )
188 p->nBackTracks = (int)p->Stats.nConflicts - p->nBackTracks;
int Msat_SolverReadDecisionLevel(Msat_Solver_t *p)
#define MSAT_VAR_UNASSIGNED
void Msat_QueueClear(Msat_Queue_t *p)
ABC_NAMESPACE_IMPL_START int Msat_SolverAddVar(Msat_Solver_t *p, int Level)
DECLARATIONS ///.
void Msat_SolverPrintStats(Msat_Solver_t *p)
Msat_Type_t Msat_SolverSearch(Msat_Solver_t *p, int nConfLimit, int nLearnedLimit, int nBackTrackLimit, Msat_SearchParams_t *pPars)
int Msat_SolverSolve(Msat_Solver_t *p, Msat_IntVec_t *vAssumps, int nBackTrackLimit, int nTimeLimit)
typedefABC_NAMESPACE_HEADER_START struct Msat_Clause_t_ Msat_Clause_t
INCLUDES ///.
int Msat_ClauseVecReadSize(Msat_ClauseVec_t *p)
static abctime Abc_Clock()
int Msat_IntVecReadSize(Msat_IntVec_t *p)
void Msat_SolverCancelUntil(Msat_Solver_t *p, int Level)
void Msat_ClauseVecPush(Msat_ClauseVec_t *p, Msat_Clause_t *Entry)
#define ABC_NAMESPACE_IMPL_END
void Msat_SolverResize(Msat_Solver_t *pMan, int nVarsAlloc)
#define ABC_NAMESPACE_IMPL_START
int * Msat_IntVecReadArray(Msat_IntVec_t *p)
Msat_Clause_t * Msat_SolverPropagate(Msat_Solver_t *p)
int Msat_SolverAssume(Msat_Solver_t *p, Msat_Lit_t Lit)
FUNCTION DEFINITIONS ///.
int Msat_SolverAddClause(Msat_Solver_t *p, Msat_IntVec_t *vLits)
double Msat_SolverProgressEstimate(Msat_Solver_t *p)
int Msat_ClauseCreate(Msat_Solver_t *p, Msat_IntVec_t *vLits, int fLearned, Msat_Clause_t **pClause_out)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Msat_Solver_t_ Msat_Solver_t
INCLUDES ///.