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