abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdrCnf.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [pdrCnf.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Property driven reachability.]
8 
9  Synopsis [CNF computation on demand.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - November 20, 2010.]
16 
17  Revision [$Id: pdrCnf.c,v 1.00 2010/11/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "pdrInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 /*
31  The CNF (p->pCnf2) is expressed in terms of object IDs.
32  Each node in the CNF is marked if it has clauses (p->pCnf2->pObj2Count[Id] > 0).
33  Each node in the CNF has the first clause (p->pCnf2->pObj2Clause)
34  and the number of clauses (p->pCnf2->pObj2Count).
35  Each node used in a CNF of any timeframe has its SAT var recorded.
36  Each frame has a reserve mapping of SAT variables into ObjIds.
37 */
38 
39 ////////////////////////////////////////////////////////////////////////
40 /// FUNCTION DEFINITIONS ///
41 ////////////////////////////////////////////////////////////////////////
42 
43 /**Function*************************************************************
44 
45  Synopsis [Returns SAT variable of the given object.]
46 
47  Description []
48 
49  SideEffects []
50 
51  SeeAlso []
52 
53 ***********************************************************************/
54 static inline int Pdr_ObjSatVar1( Pdr_Man_t * p, int k, Aig_Obj_t * pObj )
55 {
56  return p->pCnf1->pVarNums[ Aig_ObjId(pObj) ];
57 }
58 
59 /**Function*************************************************************
60 
61  Synopsis [Returns SAT variable of the given object.]
62 
63  Description []
64 
65  SideEffects []
66 
67  SeeAlso []
68 
69 ***********************************************************************/
70 //#define USE_PG
71 #ifdef USE_PG
72 static inline int Pdr_ObjSatVar2FindOrAdd( Pdr_Man_t * p, int k, Aig_Obj_t * pObj )
73 {
74  Vec_Int_t * vId2Vars = p->pvId2Vars + Aig_ObjId(pObj);
75  assert( p->pCnf2->pObj2Count[Aig_ObjId(pObj)] >= 0 );
76  if ( Vec_IntSize(vId2Vars) == 0 )
77  Vec_IntGrow(vId2Vars, 2 * k + 1);
78  if ( Vec_IntGetEntry(vId2Vars, k) == 0 )
79  {
80  sat_solver * pSat = Pdr_ManSolver(p, k);
81  Vec_Int_t * vVar2Ids = (Vec_Int_t *)Vec_PtrEntry(&p->vVar2Ids, k);
82  int iVarNew = Vec_IntSize( vVar2Ids );
83  assert( iVarNew > 0 );
84  Vec_IntPush( vVar2Ids, Aig_ObjId(pObj) );
85  Vec_IntWriteEntry( vId2Vars, k, iVarNew << 2 );
86  sat_solver_setnvars( pSat, iVarNew + 1 );
87  if ( k == 0 && Saig_ObjIsLo(p->pAig, pObj) ) // initialize the register output
88  {
89  int Lit = toLitCond( iVarNew, 1 );
90  int RetValue = sat_solver_addclause( pSat, &Lit, &Lit + 1 );
91  assert( RetValue == 1 );
92  (void) RetValue;
93  sat_solver_compress( pSat );
94  }
95  }
96  return Vec_IntEntry( vId2Vars, k );
97 }
98 int Pdr_ObjSatVar2( Pdr_Man_t * p, int k, Aig_Obj_t * pObj, int Level, int Pol )
99 {
100  Vec_Int_t * vLits;
101  sat_solver * pSat;
102  Vec_Int_t * vVar2Ids = (Vec_Int_t *)Vec_PtrEntry(&p->vVar2Ids, k);
103  int nVarCount = Vec_IntSize(vVar2Ids);
104  int iVarThis = Pdr_ObjSatVar2FindOrAdd( p, k, pObj );
105  int * pLit, i, iVar, iClaBeg, iClaEnd, RetValue;
106  int PolPres = (iVarThis & 3);
107  iVarThis >>= 2;
108  if ( Aig_ObjIsCi(pObj) )
109  return iVarThis;
110 // Pol = 3;
111 // if ( nVarCount != Vec_IntSize(vVar2Ids) || (Pol & ~PolPres) )
112  if ( (Pol & ~PolPres) )
113  {
114  *Vec_IntEntryP( p->pvId2Vars + Aig_ObjId(pObj), k ) |= Pol;
115  iClaBeg = p->pCnf2->pObj2Clause[Aig_ObjId(pObj)];
116  iClaEnd = iClaBeg + p->pCnf2->pObj2Count[Aig_ObjId(pObj)];
117  assert( iClaBeg < iClaEnd );
118 /*
119  if ( (Pol & ~PolPres) != 3 )
120  for ( i = iFirstClause; i < iFirstClause + nClauses; i++ )
121  {
122  printf( "Clause %5d : ", i );
123  for ( iVar = 0; iVar < 4; iVar++ )
124  printf( "%d ", ((unsigned)p->pCnf2->pClaPols[i] >> (2*iVar)) & 3 );
125  printf( " " );
126  for ( pLit = p->pCnf2->pClauses[i]; pLit < p->pCnf2->pClauses[i+1]; pLit++ )
127  printf( "%6d ", *pLit );
128  printf( "\n" );
129  }
130 */
131  pSat = Pdr_ManSolver(p, k);
132  vLits = Vec_WecEntry( p->vVLits, Level );
133  if ( (Pol & ~PolPres) == 3 )
134  {
135  assert( nVarCount + 1 == Vec_IntSize(vVar2Ids) );
136  for ( i = iClaBeg; i < iClaEnd; i++ )
137  {
138  Vec_IntClear( vLits );
139  Vec_IntPush( vLits, toLitCond( iVarThis, lit_sign(p->pCnf2->pClauses[i][0]) ) );
140  for ( pLit = p->pCnf2->pClauses[i]+1; pLit < p->pCnf2->pClauses[i+1]; pLit++ )
141  {
142  iVar = Pdr_ObjSatVar2( p, k, Aig_ManObj(p->pAig, lit_var(*pLit)), Level+1, 3 );
143  Vec_IntPush( vLits, toLitCond( iVar, lit_sign(*pLit) ) );
144  }
145  RetValue = sat_solver_addclause( pSat, Vec_IntArray(vLits), Vec_IntArray(vLits)+Vec_IntSize(vLits) );
146  assert( RetValue );
147  (void) RetValue;
148  }
149  }
150  else // if ( (Pol & ~PolPres) == 2 || (Pol & ~PolPres) == 1 ) // write pos/neg polarity
151  {
152  assert( (Pol & ~PolPres) );
153  for ( i = iClaBeg; i < iClaEnd; i++ )
154  if ( 2 - !Abc_LitIsCompl(p->pCnf2->pClauses[i][0]) == (Pol & ~PolPres) ) // taking opposite literal
155  {
156  Vec_IntClear( vLits );
157  Vec_IntPush( vLits, toLitCond( iVarThis, Abc_LitIsCompl(p->pCnf2->pClauses[i][0]) ) );
158  for ( pLit = p->pCnf2->pClauses[i]+1; pLit < p->pCnf2->pClauses[i+1]; pLit++ )
159  {
160  iVar = Pdr_ObjSatVar2( p, k, Aig_ManObj(p->pAig, lit_var(*pLit)), Level+1, ((unsigned)p->pCnf2->pClaPols[i] >> (2*(pLit-p->pCnf2->pClauses[i]-1))) & 3 );
161  Vec_IntPush( vLits, toLitCond( iVar, lit_sign(*pLit) ) );
162  }
163  RetValue = sat_solver_addclause( pSat, Vec_IntArray(vLits), Vec_IntArray(vLits)+Vec_IntSize(vLits) );
164  assert( RetValue );
165  (void) RetValue;
166  }
167  }
168  }
169  return iVarThis;
170 }
171 
172 #else
173 static inline int Pdr_ObjSatVar2FindOrAdd( Pdr_Man_t * p, int k, Aig_Obj_t * pObj, int * pfNewVar )
174 {
175  Vec_Int_t * vId2Vars = p->pvId2Vars + Aig_ObjId(pObj);
176  assert( p->pCnf2->pObj2Count[Aig_ObjId(pObj)] >= 0 );
177  if ( Vec_IntSize(vId2Vars) == 0 )
178  Vec_IntGrow(vId2Vars, 2 * k + 1);
179  if ( Vec_IntGetEntry(vId2Vars, k) == 0 )
180  {
181  sat_solver * pSat = Pdr_ManSolver(p, k);
182  Vec_Int_t * vVar2Ids = (Vec_Int_t *)Vec_PtrEntry(&p->vVar2Ids, k);
183  int iVarNew = Vec_IntSize( vVar2Ids );
184  assert( iVarNew > 0 );
185  Vec_IntPush( vVar2Ids, Aig_ObjId(pObj) );
186  Vec_IntWriteEntry( vId2Vars, k, iVarNew );
187  sat_solver_setnvars( pSat, iVarNew + 1 );
188  if ( k == 0 && Saig_ObjIsLo(p->pAig, pObj) ) // initialize the register output
189  {
190  int Lit = toLitCond( iVarNew, 1 );
191  int RetValue = sat_solver_addclause( pSat, &Lit, &Lit + 1 );
192  assert( RetValue == 1 );
193  (void) RetValue;
194  sat_solver_compress( pSat );
195  }
196  *pfNewVar = 1;
197  }
198  return Vec_IntEntry( vId2Vars, k );
199 }
200 int Pdr_ObjSatVar2( Pdr_Man_t * p, int k, Aig_Obj_t * pObj, int Level, int Pol )
201 {
202  Vec_Int_t * vLits;
203  sat_solver * pSat;
204  int fNewVar = 0, iVarThis = Pdr_ObjSatVar2FindOrAdd( p, k, pObj, &fNewVar );
205  int * pLit, i, iVar, iClaBeg, iClaEnd, RetValue;
206  if ( Aig_ObjIsCi(pObj) || !fNewVar )
207  return iVarThis;
208  iClaBeg = p->pCnf2->pObj2Clause[Aig_ObjId(pObj)];
209  iClaEnd = iClaBeg + p->pCnf2->pObj2Count[Aig_ObjId(pObj)];
210  assert( iClaBeg < iClaEnd );
211  pSat = Pdr_ManSolver(p, k);
212  vLits = Vec_WecEntry( p->vVLits, Level );
213  for ( i = iClaBeg; i < iClaEnd; i++ )
214  {
215  Vec_IntClear( vLits );
216  Vec_IntPush( vLits, toLitCond( iVarThis, lit_sign(p->pCnf2->pClauses[i][0]) ) );
217  for ( pLit = p->pCnf2->pClauses[i]+1; pLit < p->pCnf2->pClauses[i+1]; pLit++ )
218  {
219  iVar = Pdr_ObjSatVar2( p, k, Aig_ManObj(p->pAig, lit_var(*pLit)), Level+1, Pol );
220  Vec_IntPush( vLits, toLitCond( iVar, lit_sign(*pLit) ) );
221  }
222  RetValue = sat_solver_addclause( pSat, Vec_IntArray(vLits), Vec_IntArray(vLits)+Vec_IntSize(vLits) );
223  assert( RetValue );
224  (void) RetValue;
225  }
226  return iVarThis;
227 }
228 #endif
229 
230 /**Function*************************************************************
231 
232  Synopsis [Returns SAT variable of the given object.]
233 
234  Description []
235 
236  SideEffects []
237 
238  SeeAlso []
239 
240 ***********************************************************************/
241 int Pdr_ObjSatVar( Pdr_Man_t * p, int k, int Pol, Aig_Obj_t * pObj )
242 {
243  if ( p->pPars->fMonoCnf )
244  return Pdr_ObjSatVar1( p, k, pObj );
245  else
246  return Pdr_ObjSatVar2( p, k, pObj, 0, Pol );
247 }
248 
249 
250 /**Function*************************************************************
251 
252  Synopsis [Returns register number for the given SAT variable.]
253 
254  Description []
255 
256  SideEffects []
257 
258  SeeAlso []
259 
260 ***********************************************************************/
261 static inline int Pdr_ObjRegNum1( Pdr_Man_t * p, int k, int iSatVar )
262 {
263  int RegId;
264  assert( iSatVar >= 0 );
265  // consider the case of auxiliary variable
266  if ( iSatVar >= p->pCnf1->nVars )
267  return -1;
268  // consider the case of register output
269  RegId = Vec_IntEntry( p->vVar2Reg, iSatVar );
270  assert( RegId >= 0 && RegId < Aig_ManRegNum(p->pAig) );
271  return RegId;
272 }
273 
274 /**Function*************************************************************
275 
276  Synopsis [Returns register number for the given SAT variable.]
277 
278  Description []
279 
280  SideEffects []
281 
282  SeeAlso []
283 
284 ***********************************************************************/
285 static inline int Pdr_ObjRegNum2( Pdr_Man_t * p, int k, int iSatVar )
286 {
287  Aig_Obj_t * pObj;
288  int ObjId;
289  Vec_Int_t * vVar2Ids = (Vec_Int_t *)Vec_PtrEntry(&p->vVar2Ids, k);
290  assert( iSatVar > 0 && iSatVar < Vec_IntSize(vVar2Ids) );
291  ObjId = Vec_IntEntry( vVar2Ids, iSatVar );
292  if ( ObjId == -1 ) // activation variable
293  return -1;
294  pObj = Aig_ManObj( p->pAig, ObjId );
295  if ( Saig_ObjIsLi( p->pAig, pObj ) )
296  return Aig_ObjCioId(pObj)-Saig_ManPoNum(p->pAig);
297  assert( 0 ); // should be called for register inputs only
298  return -1;
299 }
300 
301 /**Function*************************************************************
302 
303  Synopsis [Returns register number for the given SAT variable.]
304 
305  Description []
306 
307  SideEffects []
308 
309  SeeAlso []
310 
311 ***********************************************************************/
312 int Pdr_ObjRegNum( Pdr_Man_t * p, int k, int iSatVar )
313 {
314  if ( p->pPars->fMonoCnf )
315  return Pdr_ObjRegNum1( p, k, iSatVar );
316  else
317  return Pdr_ObjRegNum2( p, k, iSatVar );
318 }
319 
320 
321 /**Function*************************************************************
322 
323  Synopsis [Returns the index of unused SAT variable.]
324 
325  Description []
326 
327  SideEffects []
328 
329  SeeAlso []
330 
331 ***********************************************************************/
332 int Pdr_ManFreeVar( Pdr_Man_t * p, int k )
333 {
334  if ( p->pPars->fMonoCnf )
335  return sat_solver_nvars( Pdr_ManSolver(p, k) );
336  else
337  {
338  Vec_Int_t * vVar2Ids = (Vec_Int_t *)Vec_PtrEntry( &p->vVar2Ids, k );
339  Vec_IntPush( vVar2Ids, -1 );
340  return Vec_IntSize( vVar2Ids ) - 1;
341  }
342 }
343 
344 /**Function*************************************************************
345 
346  Synopsis [Creates SAT solver.]
347 
348  Description []
349 
350  SideEffects []
351 
352  SeeAlso []
353 
354 ***********************************************************************/
355 static inline sat_solver * Pdr_ManNewSolver1( sat_solver * pSat, Pdr_Man_t * p, int k, int fInit )
356 {
357  Aig_Obj_t * pObj;
358  int i;
359  assert( pSat );
360  if ( p->pCnf1 == NULL )
361  {
362  int nRegs = p->pAig->nRegs;
363  p->pAig->nRegs = Aig_ManCoNum(p->pAig);
364  p->pCnf1 = Cnf_DeriveWithMan( p->pCnfMan, p->pAig, Aig_ManCoNum(p->pAig) );
365  p->pAig->nRegs = nRegs;
366  assert( p->vVar2Reg == NULL );
367  p->vVar2Reg = Vec_IntStartFull( p->pCnf1->nVars );
368  Saig_ManForEachLi( p->pAig, pObj, i )
369  Vec_IntWriteEntry( p->vVar2Reg, Pdr_ObjSatVar(p, k, 3, pObj), i );
370  }
371  pSat = (sat_solver *)Cnf_DataWriteIntoSolverInt( pSat, p->pCnf1, 1, fInit );
373  return pSat;
374 }
375 
376 /**Function*************************************************************
377 
378  Synopsis [Creates SAT solver.]
379 
380  Description []
381 
382  SideEffects []
383 
384  SeeAlso []
385 
386 ***********************************************************************/
387 static inline sat_solver * Pdr_ManNewSolver2( sat_solver * pSat, Pdr_Man_t * p, int k, int fInit )
388 {
389  Vec_Int_t * vVar2Ids;
390  int i, Entry;
391  assert( pSat );
392  if ( p->pCnf2 == NULL )
393  {
394  p->pCnf2 = Cnf_DeriveOtherWithMan( p->pCnfMan, p->pAig, 0 );
395 #ifdef USE_PG
397 #endif
399  Vec_PtrGrow( &p->vVar2Ids, 256 );
400  }
401  // update the variable mapping
402  vVar2Ids = (Vec_Int_t *)Vec_PtrGetEntry( &p->vVar2Ids, k );
403  if ( vVar2Ids == NULL )
404  {
405  vVar2Ids = Vec_IntAlloc( 500 );
406  Vec_PtrWriteEntry( &p->vVar2Ids, k, vVar2Ids );
407  }
408  Vec_IntForEachEntry( vVar2Ids, Entry, i )
409  {
410  if ( Entry == -1 )
411  continue;
412  assert( Vec_IntEntry( p->pvId2Vars + Entry, k ) > 0 );
413  Vec_IntWriteEntry( p->pvId2Vars + Entry, k, 0 );
414  }
415  Vec_IntClear( vVar2Ids );
416  Vec_IntPush( vVar2Ids, -1 );
417  // start the SAT solver
418 // pSat = sat_solver_new();
419  sat_solver_setnvars( pSat, 500 );
421  return pSat;
422 }
423 
424 /**Function*************************************************************
425 
426  Synopsis [Creates SAT solver.]
427 
428  Description []
429 
430  SideEffects []
431 
432  SeeAlso []
433 
434 ***********************************************************************/
435 sat_solver * Pdr_ManNewSolver( sat_solver * pSat, Pdr_Man_t * p, int k, int fInit )
436 {
437  assert( pSat != NULL );
438  if ( p->pPars->fMonoCnf )
439  return Pdr_ManNewSolver1( pSat, p, k, fInit );
440  else
441  return Pdr_ManNewSolver2( pSat, p, k, fInit );
442 }
443 
444 
445 ////////////////////////////////////////////////////////////////////////
446 /// END OF FILE ///
447 ////////////////////////////////////////////////////////////////////////
448 
449 
451 
static abctime sat_solver_set_runtime_limit(sat_solver *s, abctime Limit)
Definition: satSolver.h:233
static int * Vec_IntArray(Vec_Int_t *p)
Definition: vecInt.h:328
sat_solver * Pdr_ManNewSolver(sat_solver *pSat, Pdr_Man_t *p, int k, int fInit)
Definition: pdrCnf.c:435
Aig_Man_t * pAig
Definition: pdrInt.h:70
Vec_Int_t * vVar2Reg
Definition: pdrInt.h:74
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:84
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
Definition: satSolver.c:1492
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Cnf_Dat_t * Cnf_DeriveWithMan(Cnf_Man_t *p, Aig_Man_t *pAig, int nOutputs)
Definition: cnfCore.c:129
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
static void sat_solver_compress(sat_solver *s)
Definition: satSolver.h:217
static int lit_var(lit l)
Definition: satVec.h:145
int nVars
Definition: cnf.h:59
Cnf_Dat_t * Cnf_DeriveOtherWithMan(Cnf_Man_t *p, Aig_Man_t *pAig, int fSkipTtMin)
Definition: cnfCore.c:182
unsigned char * pClaPols
Definition: cnf.h:66
int * pVarNums
Definition: cnf.h:63
static void * Vec_PtrGetEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:494
Vec_Int_t * pvId2Vars
Definition: pdrInt.h:77
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
Definition: aig.h:270
static int Vec_IntGetEntry(Vec_Int_t *p, int i)
Definition: bblif.c:401
int Pdr_ObjSatVar(Pdr_Man_t *p, int k, int Pol, Aig_Obj_t *pObj)
Definition: pdrCnf.c:241
static Vec_Int_t * Vec_IntStartFull(int nSize)
Definition: vecInt.h:119
static sat_solver * Pdr_ManNewSolver2(sat_solver *pSat, Pdr_Man_t *p, int k, int fInit)
Definition: pdrCnf.c:387
static int Saig_ObjIsLi(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:85
Cnf_Man_t * pCnfMan
Definition: pdrInt.h:72
static sat_solver * Pdr_ManNewSolver1(sat_solver *pSat, Pdr_Man_t *p, int k, int fInit)
Definition: pdrCnf.c:355
Vec_Wec_t * vVLits
Definition: pdrInt.h:79
int * pObj2Clause
Definition: cnf.h:64
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
Definition: bblif.c:336
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static int Pdr_ObjSatVar2FindOrAdd(Pdr_Man_t *p, int k, Aig_Obj_t *pObj, int *pfNewVar)
Definition: pdrCnf.c:173
int ** pClauses
Definition: cnf.h:62
Vec_Ptr_t vVar2Ids
Definition: pdrInt.h:78
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
static lit toLitCond(int v, int c)
Definition: satVec.h:143
void sat_solver_setnvars(sat_solver *s, int n)
Definition: satSolver.c:1072
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
int Pdr_ObjSatVar2(Pdr_Man_t *p, int k, Aig_Obj_t *pObj, int Level, int Pol)
Definition: pdrCnf.c:200
Pdr_Par_t * pPars
Definition: pdrInt.h:69
int sat_solver_nvars(sat_solver *s)
Definition: satSolver.c:1896
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
void * Cnf_DataWriteIntoSolverInt(void *pSat, Cnf_Dat_t *p, int nFrames, int fInit)
Definition: cnfMan.c:370
int Pdr_ObjRegNum(Pdr_Man_t *p, int k, int iSatVar)
Definition: pdrCnf.c:312
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
unsigned char * Cnf_DataDeriveLitPolarities(Cnf_Dat_t *p)
Definition: cnfUtil.c:244
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static int Aig_ManObjNumMax(Aig_Man_t *p)
Definition: aig.h:259
abctime timeToStop
Definition: pdrInt.h:121
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
Definition: vecWec.h:142
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static sat_solver * Pdr_ManSolver(Pdr_Man_t *p, int k)
MACRO DEFINITIONS ///.
Definition: pdrInt.h:139
Cnf_Dat_t * pCnf2
Definition: pdrInt.h:76
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int lit_sign(lit l)
Definition: satVec.h:146
Cnf_Dat_t * pCnf1
Definition: pdrInt.h:73
static ABC_NAMESPACE_IMPL_START int Pdr_ObjSatVar1(Pdr_Man_t *p, int k, Aig_Obj_t *pObj)
DECLARATIONS ///.
Definition: pdrCnf.c:54
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define assert(ex)
Definition: util_old.h:213
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
Definition: vecInt.h:417
int Pdr_ManFreeVar(Pdr_Man_t *p, int k)
Definition: pdrCnf.c:332
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static int Pdr_ObjRegNum1(Pdr_Man_t *p, int k, int iSatVar)
Definition: pdrCnf.c:261
static int Aig_ObjCioId(Aig_Obj_t *pObj)
Definition: aig.h:285
static int Pdr_ObjRegNum2(Pdr_Man_t *p, int k, int iSatVar)
Definition: pdrCnf.c:285
int * pObj2Count
Definition: cnf.h:65