abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
monotone.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [kLiveConstraints.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Liveness property checking.]
8 
9  Synopsis [Constraint analysis module for the k-Liveness algorithm
10  invented by Koen Classen, Niklas Sorensson.]
11 
12  Author [Sayak Ray]
13 
14  Affiliation [UC Berkeley]
15 
16  Date [Ver. 1.0. Started - October 31, 2012.]
17 
18  Revision [$Id: liveness.c,v 1.00 2009/01/01 00:00:00 alanmi Exp $]
19 
20 ***********************************************************************/
21 
22 #include <stdio.h>
23 #include "base/main/main.h"
24 #include "aig/aig/aig.h"
25 #include "aig/saig/saig.h"
26 #include <string.h>
27 #include "base/main/mainInt.h"
28 #include "proof/pdr/pdr.h"
29 
31 
32 extern Aig_Man_t *Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters );
33 //extern Aig_Man_t *createDisjunctiveMonotoneTester(Aig_Man_t *pAig, struct aigPoIndices *aigPoIndicesArg, struct monotoneVectorsStruct *monotoneVectorArg, int *startMonotonePropPo);
34 
35 struct aigPoIndices
36 {
41 };
42 
44 {
45  struct aigPoIndices *newAigPoIndices;
46 
47  newAigPoIndices = (struct aigPoIndices *)malloc(sizeof (struct aigPoIndices));
48  newAigPoIndices->attrPendingSignalIndex = -1;
49  newAigPoIndices->attrHintSingalBeginningMarker = -1;
50  newAigPoIndices->attrHintSingalEndMarker = -1;
51  newAigPoIndices->attrSafetyInvarIndex = -1;
52 
53  assert( newAigPoIndices != NULL );
54  return newAigPoIndices;
55 }
56 
57 void deallocAigPoIndices(struct aigPoIndices *toBeDeletedAigPoIndices)
58 {
59  assert(toBeDeletedAigPoIndices != NULL );
60  free(toBeDeletedAigPoIndices);
61 }
62 
64 {
68 };
69 
71 {
72  struct monotoneVectorsStruct *newPointersToMonotoneVectors;
73 
74  newPointersToMonotoneVectors = (struct monotoneVectorsStruct *)malloc(sizeof (struct monotoneVectorsStruct));
75 
76  newPointersToMonotoneVectors->attrKnownMonotone = NULL;
77  newPointersToMonotoneVectors->attrCandMonotone = NULL;
78  newPointersToMonotoneVectors->attrHintMonotone = NULL;
79 
80  assert( newPointersToMonotoneVectors != NULL );
81  return newPointersToMonotoneVectors;
82 }
83 
85 {
86  assert( toBeDeleted != NULL );
87  free( toBeDeleted );
88 }
89 
91 {
92  int i, numElementPush = 0;
93  Abc_Obj_t *pNode;
94  Vec_Int_t *vHintPoIntdex;
95 
96  vHintPoIntdex = Vec_IntAlloc(0);
97  Abc_NtkForEachPo( pNtk, pNode, i )
98  {
99  if( strstr( Abc_ObjName( pNode ), "hint_" ) != NULL )
100  {
101  Vec_IntPush( vHintPoIntdex, i );
102  numElementPush++;
103  }
104  }
105 
106  if( numElementPush == 0 )
107  return NULL;
108  else
109  return vHintPoIntdex;
110 }
111 
113 {
114  int i, pendingSignalIndex = -1;
115  Abc_Obj_t *pNode;
116 
117  Abc_NtkForEachPo( pNtk, pNode, i )
118  {
119  if( strstr( Abc_ObjName( pNode ), "pendingSignal" ) != NULL )
120  {
121  pendingSignalIndex = i;
122  break;
123  }
124  }
125 
126  return pendingSignalIndex;
127 }
128 
129 int checkSanityOfKnownMonotone( Vec_Int_t *vKnownMonotone, Vec_Int_t *vCandMonotone, Vec_Int_t *vHintMonotone )
130 {
131  int iElem, i;
132 
133  Vec_IntForEachEntry( vKnownMonotone, iElem, i )
134  printf("%d ", iElem);
135  printf("\n");
136  Vec_IntForEachEntry( vCandMonotone, iElem, i )
137  printf("%d ", iElem);
138  printf("\n");
139  Vec_IntForEachEntry( vHintMonotone, iElem, i )
140  printf("%d ", iElem);
141  printf("\n");
142  return 1;
143 }
144 
145 Aig_Man_t *createMonotoneTester(Aig_Man_t *pAig, struct aigPoIndices *aigPoIndicesArg, struct monotoneVectorsStruct *monotoneVectorArg, int *startMonotonePropPo)
146 {
147  Aig_Man_t *pNewAig;
148  int iElem, i, nRegCount, oldPoNum, poSerialNum, iElemHint;
149  int piCopied = 0, liCopied = 0, liCreated = 0, loCopied = 0, loCreated = 0;
150  int poCopied = 0, poCreated = 0;
151  Aig_Obj_t *pObj, *pObjPo, *pObjDriver, *pObjDriverNew, *pObjPendingDriverNew, *pObjPendingAndNextPending;
152  Aig_Obj_t *pPendingFlop, *pHintSignalLo, *pHintMonotoneFlop, *pObjTemp1, *pObjTemp2, *pObjKnownMonotoneAnd;
153  Vec_Ptr_t *vHintMonotoneLocalDriverNew;
154  Vec_Ptr_t *vHintMonotoneLocalFlopOutput;
155  Vec_Ptr_t *vHintMonotoneLocalProp;
156 
157  int pendingSignalIndexLocal = aigPoIndicesArg->attrPendingSignalIndex;
158  int hintSingalBeginningMarkerLocal = aigPoIndicesArg->attrHintSingalBeginningMarker;
159  //int hintSingalEndMarkerLocal = aigPoIndicesArg->attrHintSingalEndMarker;
160 
161  Vec_Int_t *vKnownMonotoneLocal = monotoneVectorArg->attrKnownMonotone;
162  Vec_Int_t *vCandMonotoneLocal = monotoneVectorArg->attrCandMonotone;
163  Vec_Int_t *vHintMonotoneLocal = monotoneVectorArg->attrHintMonotone;
164 
165  //****************************************************************
166  // Step1: create the new manager
167  // Note: The new manager is created with "2 * Aig_ManObjNumMax(p)"
168  // nodes, but this selection is arbitrary - need to be justified
169  //****************************************************************
170  pNewAig = Aig_ManStart( Aig_ManObjNumMax(pAig) );
171  pNewAig->pName = (char *)malloc( strlen( pAig->pName ) + strlen("_monotone") + 1 );
172  sprintf(pNewAig->pName, "%s_%s", pAig->pName, "_monotone");
173  pNewAig->pSpec = NULL;
174 
175  //****************************************************************
176  // Step 2: map constant nodes
177  //****************************************************************
178  pObj = Aig_ManConst1( pAig );
179  pObj->pData = Aig_ManConst1( pNewAig );
180 
181  //****************************************************************
182  // Step 3: create true PIs
183  //****************************************************************
184  Saig_ManForEachPi( pAig, pObj, i )
185  {
186  piCopied++;
187  pObj->pData = Aig_ObjCreateCi(pNewAig);
188  }
189 
190  //****************************************************************
191  // Step 5: create register outputs
192  //****************************************************************
193  Saig_ManForEachLo( pAig, pObj, i )
194  {
195  loCopied++;
196  pObj->pData = Aig_ObjCreateCi(pNewAig);
197  }
198 
199  //****************************************************************
200  // Step 6: create "D" register output for PENDING flop
201  //****************************************************************
202  loCreated++;
203  pPendingFlop = Aig_ObjCreateCi( pNewAig );
204 
205  //****************************************************************
206  // Step 6.a: create "D" register output for HINT_MONOTONE flop
207  //****************************************************************
208  vHintMonotoneLocalFlopOutput = Vec_PtrAlloc(Vec_IntSize(vHintMonotoneLocal));
209  Vec_IntForEachEntry( vHintMonotoneLocal, iElem, i )
210  {
211  loCreated++;
212  pHintMonotoneFlop = Aig_ObjCreateCi( pNewAig );
213  Vec_PtrPush( vHintMonotoneLocalFlopOutput, pHintMonotoneFlop );
214  }
215 
216  nRegCount = loCreated + loCopied;
217  printf("\nnRegCount = %d\n", nRegCount);
218 
219  //********************************************************************
220  // Step 7: create internal nodes
221  //********************************************************************
222  Aig_ManForEachNode( pAig, pObj, i )
223  {
224  pObj->pData = Aig_And( pNewAig, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
225  }
226 
227  //********************************************************************
228  // Step 8: mapping appropriate new flop drivers
229  //********************************************************************
230 
231  pObjPo = Aig_ManCo( pAig, pendingSignalIndexLocal );
232  pObjDriver = Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pObjPo), Aig_ObjFaninC0(pObjPo));
233  pObjPendingDriverNew = !Aig_IsComplement(pObjDriver)?
234  (Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData) :
235  Aig_Not((Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData));
236 
237  pObjPendingAndNextPending = Aig_And( pNewAig, pObjPendingDriverNew, pPendingFlop );
238 
239  oldPoNum = Aig_ManCoNum(pAig) - Aig_ManRegNum(pAig);
240  pObjKnownMonotoneAnd = Aig_ManConst1( pNewAig );
241  #if 1
242  if( vKnownMonotoneLocal )
243  {
244  assert( checkSanityOfKnownMonotone( vKnownMonotoneLocal, vCandMonotoneLocal, vHintMonotoneLocal ) );
245 
246  Vec_IntForEachEntry( vKnownMonotoneLocal, iElemHint, i )
247  {
248  iElem = (iElemHint - hintSingalBeginningMarkerLocal) + 1 + pendingSignalIndexLocal;
249  printf("\nProcessing knownMonotone = %d\n", iElem);
250  pObjPo = Aig_ManCo( pAig, iElem );
251  pObjDriver = Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pObjPo), Aig_ObjFaninC0(pObjPo));
252  pObjDriverNew = !Aig_IsComplement(pObjDriver)?
253  (Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData) :
254  Aig_Not((Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData));
255  pHintSignalLo = (Aig_Obj_t *)Vec_PtrEntry(vHintMonotoneLocalFlopOutput, iElem - oldPoNum);
256  pObjTemp1 = Aig_Or( pNewAig, Aig_And(pNewAig, pObjDriverNew, pHintSignalLo),
257  Aig_And(pNewAig, Aig_Not(pObjDriverNew), Aig_Not(pHintSignalLo)) );
258 
259  pObjKnownMonotoneAnd = Aig_And( pNewAig, pObjKnownMonotoneAnd, pObjTemp1 );
260  }
261  pObjPendingAndNextPending = Aig_And( pNewAig, pObjPendingAndNextPending, pObjKnownMonotoneAnd );
262  }
263  #endif
264 
265  vHintMonotoneLocalDriverNew = Vec_PtrAlloc(Vec_IntSize(vHintMonotoneLocal));
266  vHintMonotoneLocalProp = Vec_PtrAlloc(Vec_IntSize(vHintMonotoneLocal));
267  Vec_IntForEachEntry( vHintMonotoneLocal, iElem, i )
268  {
269  pObjPo = Aig_ManCo( pAig, iElem );
270  pObjDriver = Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pObjPo), Aig_ObjFaninC0(pObjPo));
271  pObjDriverNew = !Aig_IsComplement(pObjDriver)?
272  (Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData) :
273  Aig_Not((Aig_Obj_t *)(Aig_Regular(pObjDriver)->pData));
274 
275  if( vKnownMonotoneLocal != NULL && Vec_IntFind( vKnownMonotoneLocal, iElem ) != -1 )
276  {
277  Vec_PtrPush(vHintMonotoneLocalDriverNew, pObjDriverNew);
278  }
279  else
280  {
281  poSerialNum = Vec_IntFind( vHintMonotoneLocal, iElem );
282  pHintSignalLo = (Aig_Obj_t *)Vec_PtrEntry(vHintMonotoneLocalFlopOutput, poSerialNum );
283  pObjTemp1 = Aig_And( pNewAig, pObjPendingAndNextPending, pHintSignalLo);
284  pObjTemp2 = Aig_Or( pNewAig, Aig_Not(pObjTemp1), pObjDriverNew );
285  //pObjTemp2 = Aig_Or( pNewAig, Aig_Not(pObjTemp1), Aig_ManConst1( pNewAig ));
286  //pObjTemp2 = Aig_ManConst1( pNewAig );
287  Vec_PtrPush(vHintMonotoneLocalDriverNew, pObjDriverNew);
288  Vec_PtrPush(vHintMonotoneLocalProp, pObjTemp2);
289  }
290  }
291 
292  //********************************************************************
293  // Step 9: create primary outputs
294  //********************************************************************
295  Saig_ManForEachPo( pAig, pObj, i )
296  {
297  poCopied++;
298  pObj->pData = Aig_ObjCreateCo( pNewAig, Aig_ObjChild0Copy(pObj) );
299  }
300 
301  *startMonotonePropPo = i;
302  Vec_PtrForEachEntry( Aig_Obj_t *, vHintMonotoneLocalProp, pObj, i )
303  {
304  poCreated++;
305  pObjPo = Aig_ObjCreateCo( pNewAig, pObj );
306  }
307 
308  //********************************************************************
309  // Step 9: create latch inputs
310  //********************************************************************
311 
312  Saig_ManForEachLi( pAig, pObj, i )
313  {
314  liCopied++;
315  Aig_ObjCreateCo( pNewAig, Aig_ObjChild0Copy(pObj) );
316  }
317 
318  //********************************************************************
319  // Step 9.a: create latch input for PENDING_FLOP
320  //********************************************************************
321 
322  liCreated++;
323  Aig_ObjCreateCo( pNewAig, pObjPendingDriverNew );
324 
325  //********************************************************************
326  // Step 9.b: create latch input for MONOTONE_FLOP
327  //********************************************************************
328 
329  Vec_PtrForEachEntry( Aig_Obj_t *, vHintMonotoneLocalDriverNew, pObj, i )
330  {
331  liCreated++;
332  Aig_ObjCreateCo( pNewAig, pObj );
333  }
334 
335  printf("\npoCopied = %d, poCreated = %d\n", poCopied, poCreated);
336  printf("\nliCreated++ = %d\n", liCreated );
337  Aig_ManSetRegNum( pNewAig, nRegCount );
338  Aig_ManCleanup( pNewAig );
339 
340  assert( Aig_ManCheck( pNewAig ) );
341  assert( loCopied + loCreated == liCopied + liCreated );
342 
343  printf("\nSaig_ManPoNum = %d\n", Saig_ManPoNum(pNewAig));
344  return pNewAig;
345 }
346 
347 
348 Vec_Int_t *findNewMonotone( Aig_Man_t *pAig, struct aigPoIndices *aigPoIndicesArg, struct monotoneVectorsStruct *monotoneVectorArg )
349 {
350  Aig_Man_t *pAigNew;
351  Aig_Obj_t *pObjTargetPo;
352  int poMarker, oldPoNum;
353  int i, RetValue;
354  Pdr_Par_t Pars, * pPars = &Pars;
355  Abc_Cex_t * pCex = NULL;
356  Vec_Int_t *vMonotoneIndex;
357 
358  int pendingSignalIndexLocal = aigPoIndicesArg->attrPendingSignalIndex;
359  int hintSingalBeginningMarkerLocal = aigPoIndicesArg->attrHintSingalBeginningMarker;
360  //int hintSingalEndMarkerLocal = aigPoIndicesArg->attrHintSingalEndMarker;
361 
362  //Vec_Int_t *vKnownMonotoneLocal = monotoneVectorArg->attrKnownMonotone;
363  //Vec_Int_t *vCandMonotoneLocal = monotoneVectorArg->attrCandMonotone;
364  //Vec_Int_t *vHintMonotoneLocal = monotoneVectorArg->attrHintMonotone;
365 
366  pAigNew = createMonotoneTester(pAig, aigPoIndicesArg, monotoneVectorArg, &poMarker );
367  oldPoNum = Aig_ManCoNum(pAig) - Aig_ManRegNum(pAig);
368 
369  vMonotoneIndex = Vec_IntAlloc(0);
370  printf("\nSaig_ManPoNum(pAigNew) = %d, poMarker = %d\n", Saig_ManPoNum(pAigNew), poMarker);
371  for( i=poMarker; i<Saig_ManPoNum(pAigNew); i++ )
372  {
373  pObjTargetPo = Aig_ManCo( pAigNew, i );
374  Aig_ObjChild0Flip( pObjTargetPo );
375 
376  Pdr_ManSetDefaultParams( pPars );
377  pCex = NULL;
378  pPars->fVerbose = 0;
379  //pPars->iOutput = i;
380  //RetValue = Pdr_ManSolve( pAigNew, pPars, &pCex );
381  RetValue = Pdr_ManSolve( pAigNew, pPars );
382  if( RetValue == 1 )
383  {
384  printf("\ni = %d, RetValue = %d : %s (Frame %d)\n", i - oldPoNum + hintSingalBeginningMarkerLocal, RetValue, "Property Proved", pCex? (pCex)->iFrame : -1 );
385  Vec_IntPush( vMonotoneIndex, i - (pendingSignalIndexLocal + 1) + hintSingalBeginningMarkerLocal);
386  }
387  Aig_ObjChild0Flip( pObjTargetPo );
388  }
389 
390  if( Vec_IntSize( vMonotoneIndex ) > 0 )
391  return vMonotoneIndex;
392  else
393  return NULL;
394 }
395 
397 {
398  Vec_Int_t *vCandMonotone;
399  int iElem, i;
400 
401  if( vKnownMonotone == NULL || Vec_IntSize(vKnownMonotone) <= 0 )
402  return vHintMonotone;
403  vCandMonotone = Vec_IntAlloc(0);
404  Vec_IntForEachEntry( vHintMonotone, iElem, i )
405  {
406  if( Vec_IntFind( vKnownMonotone, iElem ) == -1 )
407  Vec_IntPush( vCandMonotone, iElem );
408  }
409 
410  return vCandMonotone;
411 }
412 
414 {
415  Aig_Man_t *pAig;
416  Vec_Int_t *vCandidateMonotoneSignals;
417  Vec_Int_t *vKnownMonotoneSignals;
418  //Vec_Int_t *vKnownMonotoneSignalsNew;
419  //Vec_Int_t *vRemainingCanMonotone;
420  int i, iElem;
421  int pendingSignalIndex;
422  Abc_Ntk_t *pNtkTemp;
423  int hintSingalBeginningMarker;
424  int hintSingalEndMarker;
425  struct aigPoIndices *aigPoIndicesInstance;
426  struct monotoneVectorsStruct *monotoneVectorsInstance;
427 
428  /*******************************************/
429  //Finding the PO index of the pending signal
430  /*******************************************/
431  pendingSignalIndex = findPendingSignal(pNtk);
432  if( pendingSignalIndex == -1 )
433  {
434  printf("\nNo Pending Signal Found\n");
435  return NULL;
436  }
437  else
438  printf("Po[%d] = %s\n", pendingSignalIndex, Abc_ObjName( Abc_NtkPo(pNtk, pendingSignalIndex) ) );
439 
440  /*******************************************/
441  //Finding the PO indices of all hint signals
442  /*******************************************/
443  vCandidateMonotoneSignals = findHintOutputs(pNtk);
444  if( vCandidateMonotoneSignals == NULL )
445  return NULL;
446  else
447  {
448  Vec_IntForEachEntry( vCandidateMonotoneSignals, iElem, i )
449  printf("Po[%d] = %s\n", iElem, Abc_ObjName( Abc_NtkPo(pNtk, iElem) ) );
450  hintSingalBeginningMarker = Vec_IntEntry( vCandidateMonotoneSignals, 0 );
451  hintSingalEndMarker = Vec_IntEntry( vCandidateMonotoneSignals, Vec_IntSize(vCandidateMonotoneSignals) - 1 );
452  }
453 
454  /**********************************************/
455  //Allocating "struct" with necessary parameters
456  /**********************************************/
457  aigPoIndicesInstance = allocAigPoIndices();
458  aigPoIndicesInstance->attrPendingSignalIndex = pendingSignalIndex;
459  aigPoIndicesInstance->attrHintSingalBeginningMarker = hintSingalBeginningMarker;
460  aigPoIndicesInstance->attrHintSingalEndMarker = hintSingalEndMarker;
461 
462  /****************************************************/
463  //Allocating "struct" with necessary monotone vectors
464  /****************************************************/
465  monotoneVectorsInstance = allocPointersToMonotoneVectors();
466  monotoneVectorsInstance->attrCandMonotone = vCandidateMonotoneSignals;
467  monotoneVectorsInstance->attrHintMonotone = vCandidateMonotoneSignals;
468 
469  /*******************************************/
470  //Generate AIG from Ntk
471  /*******************************************/
472  if( !Abc_NtkIsStrash( pNtk ) )
473  {
474  pNtkTemp = Abc_NtkStrash( pNtk, 0, 0, 0 );
475  pAig = Abc_NtkToDar( pNtkTemp, 0, 1 );
476  }
477  else
478  {
479  pAig = Abc_NtkToDar( pNtk, 0, 1 );
480  pNtkTemp = pNtk;
481  }
482 
483  /*******************************************/
484  //finding LEVEL 1 monotone signals
485  /*******************************************/
486  vKnownMonotoneSignals = findNewMonotone( pAig, aigPoIndicesInstance, monotoneVectorsInstance );
487  monotoneVectorsInstance->attrKnownMonotone = vKnownMonotoneSignals;
488 
489  /*******************************************/
490  //finding LEVEL >1 monotone signals
491  /*******************************************/
492  #if 0
493  if( vKnownMonotoneSignals )
494  {
495  printf("\nsize = %d\n", Vec_IntSize(vKnownMonotoneSignals) );
496  vRemainingCanMonotone = findRemainingMonotoneCandidates(vKnownMonotoneSignals, vCandidateMonotoneSignals);
497  monotoneVectorsInstance->attrCandMonotone = vRemainingCanMonotone;
498  vKnownMonotoneSignalsNew = findNewMonotone( pAig, aigPoIndicesInstance, monotoneVectorsInstance );
499  }
500  #endif
501 
502  deallocAigPoIndices(aigPoIndicesInstance);
503  deallocPointersToMonotoneVectors(monotoneVectorsInstance);
504  return NULL;
505 }
506 
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
int findPendingSignal(Abc_Ntk_t *pNtk)
Definition: monotone.c:112
char * malloc()
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
Definition: abc.h:251
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition: aigCheck.c:45
VOID_HACK free()
void deallocAigPoIndices(struct aigPoIndices *toBeDeletedAigPoIndices)
Definition: monotone.c:57
Vec_Int_t * findRemainingMonotoneCandidates(Vec_Int_t *vKnownMonotone, Vec_Int_t *vHintMonotone)
Definition: monotone.c:396
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Pdr_ManSetDefaultParams(Pdr_Par_t *pPars)
MACRO DEFINITIONS ///.
Definition: pdrCore.c:48
typedefABC_NAMESPACE_HEADER_START struct Pdr_Par_t_ Pdr_Par_t
INCLUDES ///.
Definition: pdr.h:40
void * pData
Definition: aig.h:87
struct monotoneVectorsStruct * allocPointersToMonotoneVectors()
Definition: monotone.c:70
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
Definition: abcStrash.c:265
void deallocPointersToMonotoneVectors(struct monotoneVectorsStruct *toBeDeleted)
Definition: monotone.c:84
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
static int Aig_IsComplement(Aig_Obj_t *p)
Definition: aig.h:249
static int Vec_IntFind(Vec_Int_t *p, int Entry)
Definition: vecInt.h:895
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Definition: aig.h:246
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
Definition: aig.h:247
int attrHintSingalBeginningMarker
Vec_Int_t * findMonotoneSignals(Abc_Ntk_t *pNtk)
Definition: monotone.c:413
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
ABC_NAMESPACE_IMPL_START Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
DECLARATIONS ///.
Definition: abcDar.c:233
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
Aig_Man_t * createMonotoneTester(Aig_Man_t *pAig, struct aigPoIndices *aigPoIndicesArg, struct monotoneVectorsStruct *monotoneVectorArg, int *startMonotonePropPo)
Definition: monotone.c:145
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
char * strstr()
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition: aigMan.c:438
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
Vec_Int_t * attrKnownMonotone
Definition: monotone.c:65
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
Aig_Obj_t * Aig_Or(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:259
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
char * sprintf()
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
Vec_Int_t * attrHintMonotone
Definition: monotone.c:67
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
static void Aig_ObjChild0Flip(Aig_Obj_t *pObj)
Definition: aig.h:316
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static int Aig_ManObjNumMax(Aig_Man_t *p)
Definition: aig.h:259
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
int Pdr_ManSolve(Aig_Man_t *p, Pdr_Par_t *pPars)
Definition: pdrCore.c:886
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:316
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
Definition: abcNames.c:48
Vec_Int_t * attrCandMonotone
Definition: monotone.c:66
Vec_Int_t * findNewMonotone(Aig_Man_t *pAig, struct aigPoIndices *aigPoIndicesArg, struct monotoneVectorsStruct *monotoneVectorArg)
Definition: monotone.c:348
int checkSanityOfKnownMonotone(Vec_Int_t *vKnownMonotone, Vec_Int_t *vCandMonotone, Vec_Int_t *vHintMonotone)
Definition: monotone.c:129
#define Saig_ManForEachPo(p, pObj, i)
Definition: saig.h:93
#define assert(ex)
Definition: util_old.h:213
int strlen()
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition: utilCex.h:39
Vec_Int_t * findHintOutputs(Abc_Ntk_t *pNtk)
Definition: monotone.c:90
#define Abc_NtkForEachPo(pNtk, pPo, i)
Definition: abc.h:517
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
Definition: aig.h:248
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
struct aigPoIndices * allocAigPoIndices()
Definition: monotone.c:43
int Aig_ManCleanup(Aig_Man_t *p)
Definition: aigMan.c:265
#define Saig_ManForEachPi(p, pObj, i)
Definition: saig.h:91