abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
msatActivity.c File Reference
#include "msatInt.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Msat_SolverVarBumpActivity (Msat_Solver_t *p, Msat_Lit_t Lit)
 DECLARATIONS ///. More...
 
void Msat_SolverVarDecayActivity (Msat_Solver_t *p)
 GLOBAL VARIABLES ///. More...
 
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 105 of file msatActivity.c.

106 {
107  float Activ;
108  Activ = Msat_ClauseReadActivity(pC);
109  if ( Activ + p->dClaInc > 1e20 )
110  {
112  Activ = Msat_ClauseReadActivity( pC );
113  }
114  Msat_ClauseWriteActivity( pC, Activ + (float)p->dClaInc );
115 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Msat_ClauseWriteActivity(Msat_Clause_t *pC, float Num)
Definition: msatClause.c:314
void Msat_SolverClaRescaleActivity(Msat_Solver_t *p)
Definition: msatActivity.c:144
float Msat_ClauseReadActivity(Msat_Clause_t *pC)
Definition: msatClause.c:295
void Msat_SolverClaDecayActivity ( Msat_Solver_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 128 of file msatActivity.c.

129 {
130  p->dClaInc *= p->dClaDecay;
131 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Msat_SolverClaRescaleActivity ( Msat_Solver_t p)

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

Synopsis [Divide all constraint activities by 1e20.]

Description []

SideEffects []

SeeAlso []

Definition at line 144 of file msatActivity.c.

145 {
146  Msat_Clause_t ** pLearned;
147  int nLearned, i;
148  float Activ;
149  nLearned = Msat_ClauseVecReadSize( p->vLearned );
150  pLearned = Msat_ClauseVecReadArray( p->vLearned );
151  for ( i = 0; i < nLearned; i++ )
152  {
153  Activ = Msat_ClauseReadActivity( pLearned[i] );
154  Msat_ClauseWriteActivity( pLearned[i], Activ * (float)1e-20 );
155  }
156  p->dClaInc *= 1e-20;
157 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct Msat_Clause_t_ Msat_Clause_t
INCLUDES ///.
Definition: msatInt.h:57
int Msat_ClauseVecReadSize(Msat_ClauseVec_t *p)
void Msat_ClauseWriteActivity(Msat_Clause_t *pC, float Num)
Definition: msatClause.c:314
Msat_Clause_t ** Msat_ClauseVecReadArray(Msat_ClauseVec_t *p)
Definition: msatClauseVec.c:85
float Msat_ClauseReadActivity(Msat_Clause_t *pC)
Definition: msatClause.c:295
ABC_NAMESPACE_IMPL_START void Msat_SolverVarBumpActivity ( Msat_Solver_t p,
Msat_Lit_t  Lit 
)

DECLARATIONS ///.

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 alanm.nosp@m.i@ee.nosp@m.cs.be.nosp@m.rkel.nosp@m.ey.ed.nosp@m.u]

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

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file msatActivity.c.

46 {
48  if ( p->dVarDecay < 0 ) // (negative decay means static variable order -- don't bump)
49  return;
50  Var = MSAT_LIT2VAR(Lit);
51  p->pdActivity[Var] += p->dVarInc;
52 // p->pdActivity[Var] += p->dVarInc * p->pFactors[Var];
53  if ( p->pdActivity[Var] > 1e100 )
55  Msat_OrderUpdate( p->pOrder, Var );
56 }
int Msat_Var_t
Definition: msatInt.h:66
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define MSAT_LIT2VAR(l)
Definition: msat.h:59
int Var
Definition: SolverTypes.h:42
void Msat_OrderUpdate(Msat_Order_t *p, int Var)
Definition: msatOrderH.c:257
void Msat_SolverVarRescaleActivity(Msat_Solver_t *p)
Definition: msatActivity.c:86
void Msat_SolverVarDecayActivity ( Msat_Solver_t p)

GLOBAL VARIABLES ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 69 of file msatActivity.c.

70 {
71  if ( p->dVarDecay >= 0 )
72  p->dVarInc *= p->dVarDecay;
73 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Msat_SolverVarRescaleActivity ( Msat_Solver_t p)

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

Synopsis [Divide all variable activities by 1e100.]

Description []

SideEffects []

SeeAlso []

Definition at line 86 of file msatActivity.c.

87 {
88  int i;
89  for ( i = 0; i < p->nVars; i++ )
90  p->pdActivity[i] *= 1e-100;
91  p->dVarInc *= 1e-100;
92 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int nVars
Definition: llb3Image.c:58