abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dec.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [dec.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [A simple decomposition tree/node data structure and its APIs.]
8 
9  Synopsis [External declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: dec.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__opt__dec__dec_h
22 #define ABC__opt__dec__dec_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 ////////////////////////////////////////////////////////////////////////
30 /// PARAMETERS ///
31 ////////////////////////////////////////////////////////////////////////
32 
33 
34 
36 
37 
38 ////////////////////////////////////////////////////////////////////////
39 /// BASIC TYPES ///
40 ////////////////////////////////////////////////////////////////////////
41 
42 typedef struct Dec_Edge_t_ Dec_Edge_t;
44 {
45  unsigned fCompl : 1; // the complemented bit
46  unsigned Node : 30; // the decomposition node pointed by the edge
47 };
48 
49 typedef struct Dec_Node_t_ Dec_Node_t;
51 {
52  Dec_Edge_t eEdge0; // the left child of the node
53  Dec_Edge_t eEdge1; // the right child of the node
54  // other info
55  union { int iFunc; // the literal of the node (AIG)
56  void * pFunc; }; // the function of the node (BDD or AIG)
57  unsigned Level : 14; // the level of this node in the global AIG
58  // printing info
59  unsigned fNodeOr : 1; // marks the original OR node
60  unsigned fCompl0 : 1; // marks the original complemented edge
61  unsigned fCompl1 : 1; // marks the original complemented edge
62  // latch info
63  unsigned nLat0 : 5; // the number of latches on the first edge
64  unsigned nLat1 : 5; // the number of latches on the second edge
65  unsigned nLat2 : 5; // the number of latches on the output edge
66 };
67 
68 typedef struct Dec_Graph_t_ Dec_Graph_t;
70 {
71  int fConst; // marks the constant 1 graph
72  int nLeaves; // the number of leaves
73  int nSize; // the number of nodes (including the leaves)
74  int nCap; // the number of allocated nodes
75  Dec_Node_t * pNodes; // the array of leaves and internal nodes
76  Dec_Edge_t eRoot; // the pointer to the topmost node
77 };
78 
79 typedef struct Dec_Man_t_ Dec_Man_t;
80 struct Dec_Man_t_
81 {
82  void * pMvcMem; // memory manager for MVC cover (used for factoring)
83  Vec_Int_t * vCubes; // storage for cubes
84  Vec_Int_t * vLits; // storage for literals
85  // precomputation information about 4-variable functions
86  unsigned short * puCanons; // canonical forms
87  char * pPhases; // canonical phases
88  char * pPerms; // canonical permutations
89  unsigned char * pMap; // mapping of functions into class numbers
90 };
91 
92 
93 ////////////////////////////////////////////////////////////////////////
94 /// ITERATORS ///
95 ////////////////////////////////////////////////////////////////////////
96 
97 // interator throught the leaves
98 #define Dec_GraphForEachLeaf( pGraph, pLeaf, i ) \
99  for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Dec_GraphNode(pGraph, i)), 1); i++ )
100 // interator throught the internal nodes
101 #define Dec_GraphForEachNode( pGraph, pAnd, i ) \
102  for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Dec_GraphNode(pGraph, i)), 1); i++ )
103 
104 ////////////////////////////////////////////////////////////////////////
105 /// FUNCTION DECLARATIONS ///
106 ////////////////////////////////////////////////////////////////////////
107 
108 /*=== decAbc.c ========================================================*/
109 /*=== decFactor.c ========================================================*/
110 extern Dec_Graph_t * Dec_Factor( char * pSop );
111 /*=== decMan.c ========================================================*/
112 extern Dec_Man_t * Dec_ManStart();
113 extern void Dec_ManStop( Dec_Man_t * p );
114 /*=== decPrint.c ========================================================*/
115 extern void Dec_GraphPrint( FILE * pFile, Dec_Graph_t * pGraph, char * pNamesIn[], char * pNameOut );
116 /*=== decUtil.c ========================================================*/
117 extern unsigned Dec_GraphDeriveTruth( Dec_Graph_t * pGraph );
118 
119 ////////////////////////////////////////////////////////////////////////
120 /// FUNCTION DEFINITIONS ///
121 ////////////////////////////////////////////////////////////////////////
122 
123 /**Function*************************************************************
124 
125  Synopsis [Creates an edge pointing to the node in the given polarity.]
126 
127  Description []
128 
129  SideEffects []
130 
131  SeeAlso []
132 
133 ***********************************************************************/
134 static inline Dec_Edge_t Dec_EdgeCreate( int Node, int fCompl )
135 {
136  Dec_Edge_t eEdge = { fCompl, Node };
137  return eEdge;
138 }
139 
140 /**Function*************************************************************
141 
142  Synopsis [Converts the edge into unsigned integer.]
143 
144  Description []
145 
146  SideEffects []
147 
148  SeeAlso []
149 
150 ***********************************************************************/
151 static inline unsigned Dec_EdgeToInt( Dec_Edge_t eEdge )
152 {
153  return (eEdge.Node << 1) | eEdge.fCompl;
154 }
155 
156 /**Function*************************************************************
157 
158  Synopsis [Converts unsigned integer into the edge.]
159 
160  Description []
161 
162  SideEffects []
163 
164  SeeAlso []
165 
166 ***********************************************************************/
167 static inline Dec_Edge_t Dec_IntToEdge( unsigned Edge )
168 {
169  return Dec_EdgeCreate( Edge >> 1, Edge & 1 );
170 }
171 
172 /**Function*************************************************************
173 
174  Synopsis [Converts the edge into unsigned integer.]
175 
176  Description []
177 
178  SideEffects []
179 
180  SeeAlso []
181 
182 ***********************************************************************/
183 static inline unsigned Dec_EdgeToInt_( Dec_Edge_t m ) { union { Dec_Edge_t x; unsigned y; } v; v.x = m; return v.y; }
184 /*
185 static inline unsigned Dec_EdgeToInt_( Dec_Edge_t eEdge )
186 {
187  return *(unsigned *)&eEdge;
188 }
189 */
190 
191 /**Function*************************************************************
192 
193  Synopsis [Converts unsigned integer into the edge.]
194 
195  Description []
196 
197  SideEffects []
198 
199  SeeAlso []
200 
201 ***********************************************************************/
202 static inline Dec_Edge_t Dec_IntToEdge_( unsigned m ) { union { Dec_Edge_t x; unsigned y; } v; v.y = m; return v.x; }
203 /*
204 static inline Dec_Edge_t Dec_IntToEdge_( unsigned Edge )
205 {
206  return *(Dec_Edge_t *)&Edge;
207 }
208 */
209 
210 /**Function*************************************************************
211 
212  Synopsis [Creates a graph with the given number of leaves.]
213 
214  Description []
215 
216  SideEffects []
217 
218  SeeAlso []
219 
220 ***********************************************************************/
221 static inline Dec_Graph_t * Dec_GraphCreate( int nLeaves )
222 {
223  Dec_Graph_t * pGraph;
224  pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
225  memset( pGraph, 0, sizeof(Dec_Graph_t) );
226  pGraph->nLeaves = nLeaves;
227  pGraph->nSize = nLeaves;
228  pGraph->nCap = 2 * nLeaves + 50;
229  pGraph->pNodes = ABC_ALLOC( Dec_Node_t, pGraph->nCap );
230  memset( pGraph->pNodes, 0, sizeof(Dec_Node_t) * pGraph->nSize );
231  return pGraph;
232 }
233 
234 /**Function*************************************************************
235 
236  Synopsis [Creates constant 0 graph.]
237 
238  Description []
239 
240  SideEffects []
241 
242  SeeAlso []
243 
244 ***********************************************************************/
246 {
247  Dec_Graph_t * pGraph;
248  pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
249  memset( pGraph, 0, sizeof(Dec_Graph_t) );
250  pGraph->fConst = 1;
251  pGraph->eRoot.fCompl = 1;
252  return pGraph;
253 }
254 
255 /**Function*************************************************************
256 
257  Synopsis [Creates constant 1 graph.]
258 
259  Description []
260 
261  SideEffects []
262 
263  SeeAlso []
264 
265 ***********************************************************************/
267 {
268  Dec_Graph_t * pGraph;
269  pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
270  memset( pGraph, 0, sizeof(Dec_Graph_t) );
271  pGraph->fConst = 1;
272  return pGraph;
273 }
274 
275 /**Function*************************************************************
276 
277  Synopsis [Creates the literal graph.]
278 
279  Description []
280 
281  SideEffects []
282 
283  SeeAlso []
284 
285 ***********************************************************************/
286 static inline Dec_Graph_t * Dec_GraphCreateLeaf( int iLeaf, int nLeaves, int fCompl )
287 {
288  Dec_Graph_t * pGraph;
289  assert( 0 <= iLeaf && iLeaf < nLeaves );
290  pGraph = Dec_GraphCreate( nLeaves );
291  pGraph->eRoot.Node = iLeaf;
292  pGraph->eRoot.fCompl = fCompl;
293  return pGraph;
294 }
295 
296 /**Function*************************************************************
297 
298  Synopsis [Creates a graph with the given number of leaves.]
299 
300  Description []
301 
302  SideEffects []
303 
304  SeeAlso []
305 
306 ***********************************************************************/
307 static inline void Dec_GraphFree( Dec_Graph_t * pGraph )
308 {
309  ABC_FREE( pGraph->pNodes );
310  ABC_FREE( pGraph );
311 }
312 
313 /**Function*************************************************************
314 
315  Synopsis [Returns 1 if the graph is a constant.]
316 
317  Description []
318 
319  SideEffects []
320 
321  SeeAlso []
322 
323 ***********************************************************************/
324 static inline int Dec_GraphIsConst( Dec_Graph_t * pGraph )
325 {
326  return pGraph->fConst;
327 }
328 
329 /**Function*************************************************************
330 
331  Synopsis [Returns 1 if the graph is constant 0.]
332 
333  Description []
334 
335  SideEffects []
336 
337  SeeAlso []
338 
339 ***********************************************************************/
340 static inline int Dec_GraphIsConst0( Dec_Graph_t * pGraph )
341 {
342  return pGraph->fConst && pGraph->eRoot.fCompl;
343 }
344 
345 /**Function*************************************************************
346 
347  Synopsis [Returns 1 if the graph is constant 1.]
348 
349  Description []
350 
351  SideEffects []
352 
353  SeeAlso []
354 
355 ***********************************************************************/
356 static inline int Dec_GraphIsConst1( Dec_Graph_t * pGraph )
357 {
358  return pGraph->fConst && !pGraph->eRoot.fCompl;
359 }
360 
361 /**Function*************************************************************
362 
363  Synopsis [Returns 1 if the graph is complemented.]
364 
365  Description []
366 
367  SideEffects []
368 
369  SeeAlso []
370 
371 ***********************************************************************/
372 static inline int Dec_GraphIsComplement( Dec_Graph_t * pGraph )
373 {
374  return pGraph->eRoot.fCompl;
375 }
376 
377 /**Function*************************************************************
378 
379  Synopsis [Checks if the graph is complemented.]
380 
381  Description []
382 
383  SideEffects []
384 
385  SeeAlso []
386 
387 ***********************************************************************/
388 static inline void Dec_GraphComplement( Dec_Graph_t * pGraph )
389 {
390  pGraph->eRoot.fCompl ^= 1;
391 }
392 
393 
394 /**Function*************************************************************
395 
396  Synopsis [Returns the number of leaves.]
397 
398  Description []
399 
400  SideEffects []
401 
402  SeeAlso []
403 
404 ***********************************************************************/
405 static inline int Dec_GraphLeaveNum( Dec_Graph_t * pGraph )
406 {
407  return pGraph->nLeaves;
408 }
409 
410 /**Function*************************************************************
411 
412  Synopsis [Returns the number of internal nodes.]
413 
414  Description []
415 
416  SideEffects []
417 
418  SeeAlso []
419 
420 ***********************************************************************/
421 static inline int Dec_GraphNodeNum( Dec_Graph_t * pGraph )
422 {
423  return pGraph->nSize - pGraph->nLeaves;
424 }
425 
426 /**Function*************************************************************
427 
428  Synopsis [Returns the pointer to the node.]
429 
430  Description []
431 
432  SideEffects []
433 
434  SeeAlso []
435 
436 ***********************************************************************/
437 static inline Dec_Node_t * Dec_GraphNode( Dec_Graph_t * pGraph, int i )
438 {
439  return pGraph->pNodes + i;
440 }
441 
442 /**Function*************************************************************
443 
444  Synopsis [Returns the pointer to the node.]
445 
446  Description []
447 
448  SideEffects []
449 
450  SeeAlso []
451 
452 ***********************************************************************/
453 static inline Dec_Node_t * Dec_GraphNodeLast( Dec_Graph_t * pGraph )
454 {
455  return pGraph->pNodes + pGraph->nSize - 1;
456 }
457 
458 /**Function*************************************************************
459 
460  Synopsis [Returns the number of the given node.]
461 
462  Description []
463 
464  SideEffects []
465 
466  SeeAlso []
467 
468 ***********************************************************************/
469 static inline int Dec_GraphNodeInt( Dec_Graph_t * pGraph, Dec_Node_t * pNode )
470 {
471  return pNode - pGraph->pNodes;
472 }
473 
474 /**Function*************************************************************
475 
476  Synopsis [Check if the graph represents elementary variable.]
477 
478  Description []
479 
480  SideEffects []
481 
482  SeeAlso []
483 
484 ***********************************************************************/
485 static inline int Dec_GraphIsVar( Dec_Graph_t * pGraph )
486 {
487  return pGraph->eRoot.Node < (unsigned)pGraph->nLeaves;
488 }
489 
490 /**Function*************************************************************
491 
492  Synopsis [Check if the graph represents elementary variable.]
493 
494  Description []
495 
496  SideEffects []
497 
498  SeeAlso []
499 
500 ***********************************************************************/
501 static inline int Dec_GraphNodeIsVar( Dec_Graph_t * pGraph, Dec_Node_t * pNode )
502 {
503  return Dec_GraphNodeInt(pGraph,pNode) < pGraph->nLeaves;
504 }
505 
506 /**Function*************************************************************
507 
508  Synopsis [Returns the elementary variable elementary variable.]
509 
510  Description []
511 
512  SideEffects []
513 
514  SeeAlso []
515 
516 ***********************************************************************/
517 static inline Dec_Node_t * Dec_GraphVar( Dec_Graph_t * pGraph )
518 {
519  assert( Dec_GraphIsVar( pGraph ) );
520  return Dec_GraphNode( pGraph, pGraph->eRoot.Node );
521 }
522 
523 /**Function*************************************************************
524 
525  Synopsis [Returns the number of the elementary variable.]
526 
527  Description []
528 
529  SideEffects []
530 
531  SeeAlso []
532 
533 ***********************************************************************/
534 static inline int Dec_GraphVarInt( Dec_Graph_t * pGraph )
535 {
536  assert( Dec_GraphIsVar( pGraph ) );
537  return Dec_GraphNodeInt( pGraph, Dec_GraphVar(pGraph) );
538 }
539 
540 /**Function*************************************************************
541 
542  Synopsis [Sets the root of the graph.]
543 
544  Description []
545 
546  SideEffects []
547 
548  SeeAlso []
549 
550 ***********************************************************************/
551 static inline void Dec_GraphSetRoot( Dec_Graph_t * pGraph, Dec_Edge_t eRoot )
552 {
553  pGraph->eRoot = eRoot;
554 }
555 
556 /**Function*************************************************************
557 
558  Synopsis [Appends a new node to the graph.]
559 
560  Description [This procedure is meant for internal use.]
561 
562  SideEffects []
563 
564  SeeAlso []
565 
566 ***********************************************************************/
567 static inline Dec_Node_t * Dec_GraphAppendNode( Dec_Graph_t * pGraph )
568 {
569  Dec_Node_t * pNode;
570  if ( pGraph->nSize == pGraph->nCap )
571  {
572  pGraph->pNodes = ABC_REALLOC( Dec_Node_t, pGraph->pNodes, 2 * pGraph->nCap );
573  pGraph->nCap = 2 * pGraph->nCap;
574  }
575  pNode = pGraph->pNodes + pGraph->nSize++;
576  memset( pNode, 0, sizeof(Dec_Node_t) );
577  return pNode;
578 }
579 
580 /**Function*************************************************************
581 
582  Synopsis [Creates an AND node.]
583 
584  Description []
585 
586  SideEffects []
587 
588  SeeAlso []
589 
590 ***********************************************************************/
591 static inline Dec_Edge_t Dec_GraphAddNodeAnd( Dec_Graph_t * pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1 )
592 {
593  Dec_Node_t * pNode;
594  // get the new node
595  pNode = Dec_GraphAppendNode( pGraph );
596  // set the inputs and other info
597  pNode->eEdge0 = eEdge0;
598  pNode->eEdge1 = eEdge1;
599  pNode->fCompl0 = eEdge0.fCompl;
600  pNode->fCompl1 = eEdge1.fCompl;
601  return Dec_EdgeCreate( pGraph->nSize - 1, 0 );
602 }
603 
604 /**Function*************************************************************
605 
606  Synopsis [Creates an OR node.]
607 
608  Description []
609 
610  SideEffects []
611 
612  SeeAlso []
613 
614 ***********************************************************************/
615 static inline Dec_Edge_t Dec_GraphAddNodeOr( Dec_Graph_t * pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1 )
616 {
617  Dec_Node_t * pNode;
618  // get the new node
619  pNode = Dec_GraphAppendNode( pGraph );
620  // set the inputs and other info
621  pNode->eEdge0 = eEdge0;
622  pNode->eEdge1 = eEdge1;
623  pNode->fCompl0 = eEdge0.fCompl;
624  pNode->fCompl1 = eEdge1.fCompl;
625  // make adjustments for the OR gate
626  pNode->fNodeOr = 1;
627  pNode->eEdge0.fCompl = !pNode->eEdge0.fCompl;
628  pNode->eEdge1.fCompl = !pNode->eEdge1.fCompl;
629  return Dec_EdgeCreate( pGraph->nSize - 1, 1 );
630 }
631 
632 /**Function*************************************************************
633 
634  Synopsis [Creates an XOR node.]
635 
636  Description []
637 
638  SideEffects []
639 
640  SeeAlso []
641 
642 ***********************************************************************/
643 static inline Dec_Edge_t Dec_GraphAddNodeXor( Dec_Graph_t * pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1, int Type )
644 {
645  Dec_Edge_t eNode0, eNode1, eNode;
646  if ( Type == 0 )
647  {
648  // derive the first AND
649  eEdge0.fCompl ^= 1;
650  eNode0 = Dec_GraphAddNodeAnd( pGraph, eEdge0, eEdge1 );
651  eEdge0.fCompl ^= 1;
652  // derive the second AND
653  eEdge1.fCompl ^= 1;
654  eNode1 = Dec_GraphAddNodeAnd( pGraph, eEdge0, eEdge1 );
655  // derive the final OR
656  eNode = Dec_GraphAddNodeOr( pGraph, eNode0, eNode1 );
657  }
658  else
659  {
660  // derive the first AND
661  eNode0 = Dec_GraphAddNodeAnd( pGraph, eEdge0, eEdge1 );
662  // derive the second AND
663  eEdge0.fCompl ^= 1;
664  eEdge1.fCompl ^= 1;
665  eNode1 = Dec_GraphAddNodeAnd( pGraph, eEdge0, eEdge1 );
666  // derive the final OR
667  eNode = Dec_GraphAddNodeOr( pGraph, eNode0, eNode1 );
668  eNode.fCompl ^= 1;
669  }
670  return eNode;
671 }
672 
673 /**Function*************************************************************
674 
675  Synopsis [Creates an XOR node.]
676 
677  Description []
678 
679  SideEffects []
680 
681  SeeAlso []
682 
683 ***********************************************************************/
684 static inline Dec_Edge_t Dec_GraphAddNodeMux( Dec_Graph_t * pGraph, Dec_Edge_t eEdgeC, Dec_Edge_t eEdgeT, Dec_Edge_t eEdgeE, int Type )
685 {
686  Dec_Edge_t eNode0, eNode1, eNode;
687  if ( Type == 0 )
688  {
689  // derive the first AND
690  eNode0 = Dec_GraphAddNodeAnd( pGraph, eEdgeC, eEdgeT );
691  // derive the second AND
692  eEdgeC.fCompl ^= 1;
693  eNode1 = Dec_GraphAddNodeAnd( pGraph, eEdgeC, eEdgeE );
694  // derive the final OR
695  eNode = Dec_GraphAddNodeOr( pGraph, eNode0, eNode1 );
696  }
697  else
698  {
699  // complement the arguments
700  eEdgeT.fCompl ^= 1;
701  eEdgeE.fCompl ^= 1;
702  // derive the first AND
703  eNode0 = Dec_GraphAddNodeAnd( pGraph, eEdgeC, eEdgeT );
704  // derive the second AND
705  eEdgeC.fCompl ^= 1;
706  eNode1 = Dec_GraphAddNodeAnd( pGraph, eEdgeC, eEdgeE );
707  // derive the final OR
708  eNode = Dec_GraphAddNodeOr( pGraph, eNode0, eNode1 );
709  eNode.fCompl ^= 1;
710  }
711  return eNode;
712 }
713 
714 
715 
717 
718 
719 
720 #endif
721 
722 ////////////////////////////////////////////////////////////////////////
723 /// END OF FILE ///
724 ////////////////////////////////////////////////////////////////////////
725 
static int Dec_GraphVarInt(Dec_Graph_t *pGraph)
Definition: dec.h:534
Dec_Edge_t eRoot
Definition: dec.h:76
char * memset()
unsigned fCompl
Definition: dec.h:45
static unsigned Dec_EdgeToInt(Dec_Edge_t eEdge)
Definition: dec.h:151
static int Dec_GraphNodeInt(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
Definition: dec.h:469
static int Dec_GraphNodeNum(Dec_Graph_t *pGraph)
Definition: dec.h:421
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Dec_Edge_t Dec_GraphAddNodeMux(Dec_Graph_t *pGraph, Dec_Edge_t eEdgeC, Dec_Edge_t eEdgeT, Dec_Edge_t eEdgeE, int Type)
Definition: dec.h:684
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void * pMvcMem
Definition: dec.h:82
#define ABC_REALLOC(type, obj, num)
Definition: abc_global.h:233
Vec_Int_t * vCubes
Definition: dec.h:83
static Dec_Edge_t Dec_EdgeCreate(int Node, int fCompl)
FUNCTION DEFINITIONS ///.
Definition: dec.h:134
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
int nCap
Definition: dec.h:74
unsigned nLat2
Definition: dec.h:65
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
char * pPhases
Definition: dec.h:87
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42
Dec_Graph_t * Dec_Factor(char *pSop)
FUNCTION DECLARATIONS ///.
Definition: decFactor.c:55
unsigned char * pMap
Definition: dec.h:89
int nSize
Definition: dec.h:73
static Dec_Edge_t Dec_IntToEdge(unsigned Edge)
Definition: dec.h:167
static Dec_Graph_t * Dec_GraphCreateConst1()
Definition: dec.h:266
int fConst
Definition: dec.h:71
static Dec_Node_t * Dec_GraphAppendNode(Dec_Graph_t *pGraph)
Definition: dec.h:567
static Dec_Edge_t Dec_GraphAddNodeAnd(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: dec.h:591
unsigned Node
Definition: dec.h:46
static Dec_Edge_t Dec_IntToEdge_(unsigned m)
Definition: dec.h:202
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
Definition: dec.h:372
void Dec_GraphPrint(FILE *pFile, Dec_Graph_t *pGraph, char *pNamesIn[], char *pNameOut)
FUNCTION DEFINITIONS ///.
Definition: decPrint.c:49
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: dec.h:517
Vec_Int_t * vLits
Definition: dec.h:84
int nLeaves
Definition: dec.h:72
unsigned fCompl1
Definition: dec.h:61
static Dec_Graph_t * Dec_GraphCreateConst0()
Definition: dec.h:245
unsigned Dec_GraphDeriveTruth(Dec_Graph_t *pGraph)
Definition: decUtil.c:95
static Dec_Edge_t Dec_GraphAddNodeXor(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1, int Type)
Definition: dec.h:643
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
unsigned short * puCanons
Definition: dec.h:86
Dec_Edge_t eEdge0
Definition: dec.h:52
unsigned fCompl0
Definition: dec.h:60
unsigned nLat0
Definition: dec.h:63
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
static void Dec_GraphSetRoot(Dec_Graph_t *pGraph, Dec_Edge_t eRoot)
Definition: dec.h:551
static unsigned Dec_EdgeToInt_(Dec_Edge_t m)
Definition: dec.h:183
static int Dec_GraphIsConst0(Dec_Graph_t *pGraph)
Definition: dec.h:340
static Dec_Graph_t * Dec_GraphCreateLeaf(int iLeaf, int nLeaves, int fCompl)
Definition: dec.h:286
static Dec_Graph_t * Dec_GraphCreate(int nLeaves)
Definition: dec.h:221
void * pFunc
Definition: dec.h:56
unsigned nLat1
Definition: dec.h:64
static Dec_Edge_t Dec_GraphAddNodeOr(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: dec.h:615
static Dec_Node_t * Dec_GraphNodeLast(Dec_Graph_t *pGraph)
Definition: dec.h:453
int iFunc
Definition: dec.h:55
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Dec_GraphLeaveNum(Dec_Graph_t *pGraph)
Definition: dec.h:405
static void Dec_GraphFree(Dec_Graph_t *pGraph)
Definition: dec.h:307
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
#define assert(ex)
Definition: util_old.h:213
static int Dec_GraphNodeIsVar(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
Definition: dec.h:501
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Definition: dec.h:80
static int Dec_GraphIsConst1(Dec_Graph_t *pGraph)
Definition: dec.h:356
Dec_Node_t * pNodes
Definition: dec.h:75
unsigned fNodeOr
Definition: dec.h:59
Dec_Man_t * Dec_ManStart()
DECLARATIONS ///.
Definition: decMan.c:45
void Dec_ManStop(Dec_Man_t *p)
Definition: decMan.c:70
Dec_Edge_t eEdge1
Definition: dec.h:53
char * pPerms
Definition: dec.h:88
static void Dec_GraphComplement(Dec_Graph_t *pGraph)
Definition: dec.h:388
unsigned Level
Definition: dec.h:57