1ADDBDDNODEASSOC(3)               BDD FUNCTIONS              ADDBDDNODEASSOC(3)
2
3
4

NAME

6       addbddnodeassoc - adds a bdd node in  a variable association.
7

SYNOPSIS

9       #include "bdd101.h"
10       bddassoc ∗addbddnodeassoc( BddSystem, BddAssoc, Variable, BddNode )
11         bddsystem  ∗BddSystem;
12         bddassoc   ∗BddAssoc;
13         bddvar      Variable;
14         bddnode    ∗BddNode;
15

PARAMETERS

17       BddSystem           The bdd system.
18
19       BddAssoc            The variable association.
20
21       Variable            The variable number.
22
23       BddNode             The bdd node to add.
24

DESCRIPTION

26       addbddnodeassoc  adds  the bdd node BddNode, associated to the variable
27       number Variable, in the variable association BddAssoc, in the bdd  sys‐
28       tem  BddSystem.   If a null pointer is given, the default bdd system is
29       used.  The number of external reference of BddNode is incremented.
30

RETURN VALUE

32       addbddnodeassoc returns a pointer to the variable association.
33

ERRORS

35       "variable xxx out of range, error !"
36              The Variable parameter must be less  or  equal  to  the  BddSys‐
37              tem->NUMBER_VAR field.
38

EXAMPLE

40       #include "bdd101.h"
41          bddsystem  ∗BddSystem;
42          bddcircuit ∗BddCircuit;
43          bddnode    ∗BddNode;
44          bddnode    ∗BddSubst;
45          bddnode    ∗BddVariable;
46          bddassoc   ∗Assoc;
47          chain_list ∗Expr;
48          bddvar         Variable;
49          BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
50          BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
51          Expr = createablbinexpr( ABL_AND,
52                                   createablatom( "i0" ),
53                                   createablatom( "i1" ) );
54          BddNode = addbddcircuitabl( BddCircuit, Expr );
55          freeablexpr( Expr );
56          Expr = createablbinexpr( ABL_OR,
57                                   createablatom( "i2" ),
58                                   createablatom( "i3" ) );
59          BddSubst = addbddcircuitabl( BddCircuit, Expr );
60          freeablexpr( Expr );
61          BddVariable = searchbddcircuitin( (bddcircuit ∗)0, "i0" );
62          Variable = getbddvarbyindex( (bddsystem ∗)0, BddVariable->INDEX );
63          Assoc = addbddassoc( (bddsystem ∗)0 );
64          addbddnodeassoc( (bddsystem ∗)0, Assoc, Variable, BddSubst );
65          BddNode = substbddnodeassoc( (bddsystem ∗)0, BddSubst, Assoc );
66          Expr = convertbddcircuitabl( BddCircuit, BddNode );
67          /* displays ((i3 or i2) and i1) */
68          viewablexpr( Expr, ABL_VIEW_VHDL );
69          freeablexpr( Expr );
70          destroybddassoc( (bddsystem ∗)0 );
71          destroybddsystem( (bddsystem ∗)0 );
72          destroybddcircuit( (bddcircuit ∗)0 );
73

SEE ALSO

75       bdd(1)
76
77
78
79
80
81
82ASIM/LIP6                       October 1, 1997             ADDBDDNODEASSOC(3)
Impressum