src/sat/msat/msatActivity.c File Reference

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

Go to the source code of this file.

Functions

void Msat_SolverVarBumpActivity (Msat_Solver_t *p, Msat_Lit_t Lit)
void Msat_SolverVarDecayActivity (Msat_Solver_t *p)
void Msat_SolverVarRescaleActivity (Msat_Solver_t *p)
void Msat_SolverClaBumpActivity (Msat_Solver_t *p, Msat_Clause_t *pC)
void Msat_SolverClaDecayActivity (Msat_Solver_t *p)
void Msat_SolverClaRescaleActivity (Msat_Solver_t *p)

Function Documentation

void Msat_SolverClaBumpActivity ( Msat_Solver_t p,
Msat_Clause_t pC 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 102 of file msatActivity.c.

00103 {
00104     float Activ;
00105     Activ = Msat_ClauseReadActivity(pC);
00106     if ( Activ + p->dClaInc > 1e20 )
00107     {
00108         Msat_SolverClaRescaleActivity( p );
00109         Activ = Msat_ClauseReadActivity( pC );
00110     }
00111     Msat_ClauseWriteActivity( pC, Activ + (float)p->dClaInc );
00112 }

void Msat_SolverClaDecayActivity ( Msat_Solver_t p  ) 

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 125 of file msatActivity.c.

00126 {
00127     p->dClaInc *= p->dClaDecay;
00128 }

void Msat_SolverClaRescaleActivity ( Msat_Solver_t p  ) 

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

Synopsis [Divide all constraint activities by 1e20.]

Description []

SideEffects []

SeeAlso []

Definition at line 141 of file msatActivity.c.

00142 {
00143     Msat_Clause_t ** pLearned;
00144     int nLearned, i;
00145     float Activ;
00146     nLearned = Msat_ClauseVecReadSize( p->vLearned );
00147     pLearned = Msat_ClauseVecReadArray( p->vLearned );
00148     for ( i = 0; i < nLearned; i++ )
00149     {
00150         Activ = Msat_ClauseReadActivity( pLearned[i] );
00151         Msat_ClauseWriteActivity( pLearned[i], Activ * (float)1e-20 );
00152     }
00153     p->dClaInc *= 1e-20;
00154 }

void Msat_SolverVarBumpActivity ( Msat_Solver_t p,
Msat_Lit_t  Lit 
)

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

FileName [msatActivity.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 [Procedures controlling activity of variables and clauses.]

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

Affiliation [UC Berkeley]

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

Revision [

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

] DECLARATIONS /// FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 42 of file msatActivity.c.

00043 {
00044     Msat_Var_t Var;
00045     if ( p->dVarDecay < 0 ) // (negative decay means static variable order -- don't bump)
00046         return;
00047     Var = MSAT_LIT2VAR(Lit);
00048     p->pdActivity[Var] += p->dVarInc;
00049 //    p->pdActivity[Var] += p->dVarInc * p->pFactors[Var];
00050     if ( p->pdActivity[Var] > 1e100 )
00051         Msat_SolverVarRescaleActivity( p );
00052     Msat_OrderUpdate( p->pOrder, Var );
00053 }

void Msat_SolverVarDecayActivity ( Msat_Solver_t p  ) 

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 66 of file msatActivity.c.

00067 {
00068     if ( p->dVarDecay >= 0 )
00069         p->dVarInc *= p->dVarDecay;
00070 }

void Msat_SolverVarRescaleActivity ( Msat_Solver_t p  ) 

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

Synopsis [Divide all variable activities by 1e100.]

Description []

SideEffects []

SeeAlso []

Definition at line 83 of file msatActivity.c.

00084 {
00085     int i;
00086     for ( i = 0; i < p->nVars; i++ )
00087         p->pdActivity[i] *= 1e-100;
00088     p->dVarInc *= 1e-100;
00089 }


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