abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
deco.h File Reference

Go to the source code of this file.

Data Structures

struct  Dec_Edge_t_
 
struct  Dec_Node_t_
 
struct  Dec_Graph_t_
 
struct  Dec_Man_t_
 

Macros

#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)   for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Dec_GraphNode(pGraph, i)), 1); i++ )
 ITERATORS ///. More...
 
#define Dec_GraphForEachNode(pGraph, pAnd, i)   for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Dec_GraphNode(pGraph, i)), 1); i++ )
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Dec_Edge_t_ 
Dec_Edge_t
 INCLUDES ///. More...
 
typedef struct Dec_Node_t_ Dec_Node_t
 
typedef struct Dec_Graph_t_ Dec_Graph_t
 
typedef struct Dec_Man_t_ Dec_Man_t
 

Functions

static Dec_Edge_t Dec_EdgeCreate (int Node, int fCompl)
 FUNCTION DECLARATIONS ///. More...
 
static unsigned Dec_EdgeToInt (Dec_Edge_t eEdge)
 
static Dec_Edge_t Dec_IntToEdge (unsigned Edge)
 
static unsigned Dec_EdgeToInt_ (Dec_Edge_t m)
 
static Dec_Edge_t Dec_IntToEdge_ (unsigned m)
 
static Dec_Graph_tDec_GraphCreate (int nLeaves)
 
static Dec_Graph_tDec_GraphCreateConst0 ()
 
static Dec_Graph_tDec_GraphCreateConst1 ()
 
static Dec_Graph_tDec_GraphCreateLeaf (int iLeaf, int nLeaves, int fCompl)
 
static void Dec_GraphFree (Dec_Graph_t *pGraph)
 
static int Dec_GraphIsConst (Dec_Graph_t *pGraph)
 
static int Dec_GraphIsConst0 (Dec_Graph_t *pGraph)
 
static int Dec_GraphIsConst1 (Dec_Graph_t *pGraph)
 
static int Dec_GraphIsComplement (Dec_Graph_t *pGraph)
 
static void Dec_GraphComplement (Dec_Graph_t *pGraph)
 
static int Dec_GraphLeaveNum (Dec_Graph_t *pGraph)
 
static int Dec_GraphNodeNum (Dec_Graph_t *pGraph)
 
static Dec_Node_tDec_GraphNode (Dec_Graph_t *pGraph, int i)
 
static Dec_Node_tDec_GraphNodeLast (Dec_Graph_t *pGraph)
 
static int Dec_GraphNodeInt (Dec_Graph_t *pGraph, Dec_Node_t *pNode)
 
static int Dec_GraphIsVar (Dec_Graph_t *pGraph)
 
static int Dec_GraphNodeIsVar (Dec_Graph_t *pGraph, Dec_Node_t *pNode)
 
static Dec_Node_tDec_GraphVar (Dec_Graph_t *pGraph)
 
static int Dec_GraphVarInt (Dec_Graph_t *pGraph)
 
static void Dec_GraphSetRoot (Dec_Graph_t *pGraph, Dec_Edge_t eRoot)
 
static Dec_Node_tDec_GraphAppendNode (Dec_Graph_t *pGraph)
 
static Dec_Edge_t Dec_GraphAddNodeAnd (Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
 
static Dec_Edge_t Dec_GraphAddNodeOr (Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
 
static Dec_Edge_t Dec_GraphAddNodeXor (Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1, int Type)
 
static Dec_Edge_t Dec_GraphAddNodeMux (Dec_Graph_t *pGraph, Dec_Edge_t eEdgeC, Dec_Edge_t eEdgeT, Dec_Edge_t eEdgeE, int Type)
 

Macro Definition Documentation

#define Dec_GraphForEachLeaf (   pGraph,
  pLeaf,
 
)    for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Dec_GraphNode(pGraph, i)), 1); i++ )

ITERATORS ///.

Definition at line 98 of file deco.h.

#define Dec_GraphForEachNode (   pGraph,
  pAnd,
 
)    for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Dec_GraphNode(pGraph, i)), 1); i++ )

Definition at line 101 of file deco.h.

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t

INCLUDES ///.

CFile****************************************************************

FileName [deco.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [A simple decomposition tree/node data structure and its APIs.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
deco.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 42 of file deco.h.

typedef struct Dec_Graph_t_ Dec_Graph_t

Definition at line 68 of file deco.h.

typedef struct Dec_Man_t_ Dec_Man_t

Definition at line 79 of file deco.h.

typedef struct Dec_Node_t_ Dec_Node_t

Definition at line 49 of file deco.h.

Function Documentation

static Dec_Edge_t Dec_EdgeCreate ( int  Node,
int  fCompl 
)
inlinestatic

FUNCTION DECLARATIONS ///.

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

Synopsis [Creates an edge pointing to the node in the given polarity.]

Description []

SideEffects []

SeeAlso []

Definition at line 123 of file deco.h.

124 {
125  Dec_Edge_t eEdge = { fCompl, Node };
126  return eEdge;
127 }
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42
static unsigned Dec_EdgeToInt ( Dec_Edge_t  eEdge)
inlinestatic

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

Synopsis [Converts the edge into unsigned integer.]

Description []

SideEffects []

SeeAlso []

Definition at line 140 of file deco.h.

141 {
142  return (eEdge.Node << 1) | eEdge.fCompl;
143 }
static unsigned Dec_EdgeToInt_ ( Dec_Edge_t  m)
inlinestatic

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

Synopsis [Converts the edge into unsigned integer.]

Description []

SideEffects []

SeeAlso []

Definition at line 172 of file deco.h.

172 { union { Dec_Edge_t x; unsigned y; } v; v.x = m; return v.y; }
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42
static Dec_Edge_t Dec_GraphAddNodeAnd ( Dec_Graph_t pGraph,
Dec_Edge_t  eEdge0,
Dec_Edge_t  eEdge1 
)
inlinestatic

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

Synopsis [Creates an AND node.]

Description []

SideEffects []

SeeAlso []

Definition at line 580 of file deco.h.

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 }
static Dec_Node_t * Dec_GraphAppendNode(Dec_Graph_t *pGraph)
Definition: deco.h:556
int nSize
Definition: dec.h:73
static Dec_Edge_t Dec_EdgeCreate(int Node, int fCompl)
FUNCTION DECLARATIONS ///.
Definition: deco.h:123
unsigned fCompl1
Definition: dec.h:61
Dec_Edge_t eEdge0
Definition: dec.h:52
unsigned fCompl0
Definition: dec.h:60
Dec_Edge_t eEdge1
Definition: dec.h:53
static Dec_Edge_t Dec_GraphAddNodeMux ( Dec_Graph_t pGraph,
Dec_Edge_t  eEdgeC,
Dec_Edge_t  eEdgeT,
Dec_Edge_t  eEdgeE,
int  Type 
)
inlinestatic

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

Synopsis [Creates an XOR node.]

Description []

SideEffects []

SeeAlso []

Definition at line 673 of file deco.h.

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 }
static Dec_Edge_t Dec_GraphAddNodeOr(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: deco.h:604
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42
static Dec_Edge_t Dec_GraphAddNodeAnd(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: deco.h:580
static Dec_Edge_t Dec_GraphAddNodeOr ( Dec_Graph_t pGraph,
Dec_Edge_t  eEdge0,
Dec_Edge_t  eEdge1 
)
inlinestatic

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

Synopsis [Creates an OR node.]

Description []

SideEffects []

SeeAlso []

Definition at line 604 of file deco.h.

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 }
static Dec_Node_t * Dec_GraphAppendNode(Dec_Graph_t *pGraph)
Definition: deco.h:556
int nSize
Definition: dec.h:73
static Dec_Edge_t Dec_EdgeCreate(int Node, int fCompl)
FUNCTION DECLARATIONS ///.
Definition: deco.h:123
unsigned fCompl1
Definition: dec.h:61
Dec_Edge_t eEdge0
Definition: dec.h:52
unsigned fCompl0
Definition: dec.h:60
unsigned fNodeOr
Definition: dec.h:59
Dec_Edge_t eEdge1
Definition: dec.h:53
static Dec_Edge_t Dec_GraphAddNodeXor ( Dec_Graph_t pGraph,
Dec_Edge_t  eEdge0,
Dec_Edge_t  eEdge1,
int  Type 
)
inlinestatic

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

Synopsis [Creates an XOR node.]

Description []

SideEffects []

SeeAlso []

Definition at line 632 of file deco.h.

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 }
static Dec_Edge_t Dec_GraphAddNodeOr(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: deco.h:604
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42
static Dec_Edge_t Dec_GraphAddNodeAnd(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
Definition: deco.h:580
static Dec_Node_t* Dec_GraphAppendNode ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Appends a new node to the graph.]

Description [This procedure is meant for internal use.]

SideEffects []

SeeAlso []

Definition at line 556 of file deco.h.

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 }
char * memset()
#define ABC_REALLOC(type, obj, num)
Definition: abc_global.h:233
int nCap
Definition: dec.h:74
int nSize
Definition: dec.h:73
Dec_Node_t * pNodes
Definition: dec.h:75
static void Dec_GraphComplement ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Checks if the graph is complemented.]

Description []

SideEffects []

SeeAlso []

Definition at line 377 of file deco.h.

378 {
379  pGraph->eRoot.fCompl ^= 1;
380 }
Dec_Edge_t eRoot
Definition: dec.h:76
static Dec_Graph_t* Dec_GraphCreate ( int  nLeaves)
inlinestatic

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

Synopsis [Creates a graph with the given number of leaves.]

Description []

SideEffects []

SeeAlso []

Definition at line 210 of file deco.h.

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 }
char * memset()
int nCap
Definition: dec.h:74
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int nSize
Definition: dec.h:73
int nLeaves
Definition: dec.h:72
Dec_Node_t * pNodes
Definition: dec.h:75
static Dec_Graph_t* Dec_GraphCreateConst0 ( )
inlinestatic

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

Synopsis [Creates constant 0 graph.]

Description []

SideEffects []

SeeAlso []

Definition at line 234 of file deco.h.

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 }
Dec_Edge_t eRoot
Definition: dec.h:76
char * memset()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int fConst
Definition: dec.h:71
static Dec_Graph_t* Dec_GraphCreateConst1 ( )
inlinestatic

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

Synopsis [Creates constant 1 graph.]

Description []

SideEffects []

SeeAlso []

Definition at line 255 of file deco.h.

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 }
char * memset()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int fConst
Definition: dec.h:71
static Dec_Graph_t* Dec_GraphCreateLeaf ( int  iLeaf,
int  nLeaves,
int  fCompl 
)
inlinestatic

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

Synopsis [Creates the literal graph.]

Description []

SideEffects []

SeeAlso []

Definition at line 275 of file deco.h.

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 }
Dec_Edge_t eRoot
Definition: dec.h:76
static Dec_Graph_t * Dec_GraphCreate(int nLeaves)
Definition: deco.h:210
#define assert(ex)
Definition: util_old.h:213
static void Dec_GraphFree ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Creates a graph with the given number of leaves.]

Description []

SideEffects []

SeeAlso []

Definition at line 296 of file deco.h.

297 {
298  ABC_FREE( pGraph->pNodes );
299  ABC_FREE( pGraph );
300 }
#define ABC_FREE(obj)
Definition: abc_global.h:232
Dec_Node_t * pNodes
Definition: dec.h:75
static int Dec_GraphIsComplement ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns 1 if the graph is complemented.]

Description []

SideEffects []

SeeAlso []

Definition at line 361 of file deco.h.

362 {
363  return pGraph->eRoot.fCompl;
364 }
Dec_Edge_t eRoot
Definition: dec.h:76
static int Dec_GraphIsConst ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns 1 if the graph is a constant.]

Description []

SideEffects []

SeeAlso []

Definition at line 313 of file deco.h.

314 {
315  return pGraph->fConst;
316 }
int fConst
Definition: dec.h:71
static int Dec_GraphIsConst0 ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns 1 if the graph is constant 0.]

Description []

SideEffects []

SeeAlso []

Definition at line 329 of file deco.h.

330 {
331  return pGraph->fConst && pGraph->eRoot.fCompl;
332 }
Dec_Edge_t eRoot
Definition: dec.h:76
int fConst
Definition: dec.h:71
static int Dec_GraphIsConst1 ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns 1 if the graph is constant 1.]

Description []

SideEffects []

SeeAlso []

Definition at line 345 of file deco.h.

346 {
347  return pGraph->fConst && !pGraph->eRoot.fCompl;
348 }
Dec_Edge_t eRoot
Definition: dec.h:76
int fConst
Definition: dec.h:71
static int Dec_GraphIsVar ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Check if the graph represents elementary variable.]

Description []

SideEffects []

SeeAlso []

Definition at line 474 of file deco.h.

475 {
476  return pGraph->eRoot.Node < (unsigned)pGraph->nLeaves;
477 }
Dec_Edge_t eRoot
Definition: dec.h:76
int nLeaves
Definition: dec.h:72
static int Dec_GraphLeaveNum ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns the number of leaves.]

Description []

SideEffects []

SeeAlso []

Definition at line 394 of file deco.h.

395 {
396  return pGraph->nLeaves;
397 }
int nLeaves
Definition: dec.h:72
static Dec_Node_t* Dec_GraphNode ( Dec_Graph_t pGraph,
int  i 
)
inlinestatic

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

Synopsis [Returns the pointer to the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 426 of file deco.h.

427 {
428  return pGraph->pNodes + i;
429 }
Dec_Node_t * pNodes
Definition: dec.h:75
static int Dec_GraphNodeInt ( Dec_Graph_t pGraph,
Dec_Node_t pNode 
)
inlinestatic

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

Synopsis [Returns the number of the given node.]

Description []

SideEffects []

SeeAlso []

Definition at line 458 of file deco.h.

459 {
460  return pNode - pGraph->pNodes;
461 }
Dec_Node_t * pNodes
Definition: dec.h:75
static int Dec_GraphNodeIsVar ( Dec_Graph_t pGraph,
Dec_Node_t pNode 
)
inlinestatic

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

Synopsis [Check if the graph represents elementary variable.]

Description []

SideEffects []

SeeAlso []

Definition at line 490 of file deco.h.

491 {
492  return Dec_GraphNodeInt(pGraph,pNode) < pGraph->nLeaves;
493 }
static int Dec_GraphNodeInt(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
Definition: deco.h:458
int nLeaves
Definition: dec.h:72
static Dec_Node_t* Dec_GraphNodeLast ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns the pointer to the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 442 of file deco.h.

443 {
444  return pGraph->pNodes + pGraph->nSize - 1;
445 }
int nSize
Definition: dec.h:73
Dec_Node_t * pNodes
Definition: dec.h:75
static int Dec_GraphNodeNum ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns the number of internal nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 410 of file deco.h.

411 {
412  return pGraph->nSize - pGraph->nLeaves;
413 }
int nSize
Definition: dec.h:73
int nLeaves
Definition: dec.h:72
static void Dec_GraphSetRoot ( Dec_Graph_t pGraph,
Dec_Edge_t  eRoot 
)
inlinestatic

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

Synopsis [Sets the root of the graph.]

Description []

SideEffects []

SeeAlso []

Definition at line 540 of file deco.h.

541 {
542  pGraph->eRoot = eRoot;
543 }
Dec_Edge_t eRoot
Definition: dec.h:76
static Dec_Node_t* Dec_GraphVar ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns the elementary variable elementary variable.]

Description []

SideEffects []

SeeAlso []

Definition at line 506 of file deco.h.

507 {
508  assert( Dec_GraphIsVar( pGraph ) );
509  return Dec_GraphNode( pGraph, pGraph->eRoot.Node );
510 }
Dec_Edge_t eRoot
Definition: dec.h:76
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: deco.h:426
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: deco.h:474
#define assert(ex)
Definition: util_old.h:213
static int Dec_GraphVarInt ( Dec_Graph_t pGraph)
inlinestatic

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

Synopsis [Returns the number of the elementary variable.]

Description []

SideEffects []

SeeAlso []

Definition at line 523 of file deco.h.

524 {
525  assert( Dec_GraphIsVar( pGraph ) );
526  return Dec_GraphNodeInt( pGraph, Dec_GraphVar(pGraph) );
527 }
static int Dec_GraphNodeInt(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
Definition: deco.h:458
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: deco.h:474
#define assert(ex)
Definition: util_old.h:213
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: deco.h:506
static Dec_Edge_t Dec_IntToEdge ( unsigned  Edge)
inlinestatic

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

Synopsis [Converts unsigned integer into the edge.]

Description []

SideEffects []

SeeAlso []

Definition at line 156 of file deco.h.

157 {
158  return Dec_EdgeCreate( Edge >> 1, Edge & 1 );
159 }
static Dec_Edge_t Dec_EdgeCreate(int Node, int fCompl)
FUNCTION DECLARATIONS ///.
Definition: deco.h:123
static Dec_Edge_t Dec_IntToEdge_ ( unsigned  m)
inlinestatic

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

Synopsis [Converts unsigned integer into the edge.]

Description []

SideEffects []

SeeAlso []

Definition at line 191 of file deco.h.

191 { union { Dec_Edge_t x; unsigned y; } v; v.y = m; return v.x; }
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
Definition: dec.h:42