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

NAME

6       substbddnodeassoc  -  substitutes  a set of variables with a set of bdd
7       node.
8

SYNOPSIS

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

PARAMETERS

17       BddSystem           The bdd system.
18
19       BddNode             The bdd node to treat.
20
21       BddAssoc            The variable association.
22

DESCRIPTION

24       substbddnodeassoc substitutes in the bdd node BddNode all the variables
25       associated  to something in the variable association BddAssoc, with the
26       corresponding bdd node, in the bdd system BddSystem.  If a null pointer
27       is given, the default bdd system is used.
28

RETURN VALUE

30       substbddnodeassoc returns the computed bdd node.
31

ERRORS

33       "variable xxx out of range, error !"
34              The  Variable  parameter  must  be  less or equal to the BddSys‐
35              tem->NUMBER_VAR field.
36       "bad variable association xxx, error !"
37              The BddAssoc parameter must a valid variable association.
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           SUBSTBDDNODEASSOC(3)
Impressum