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

NAME

6       composebddnode - substitutes a variable by a bdd in another bdd.
7
8

SYNOPSIS

10       #include "bdd101.h"
11       bddnode ∗composebddnode( BddSystem, BddNode, Variable, BddSubst )
12         bddsystem ∗BddSystem;
13         bddnode   ∗BddNode;
14         bddvar     Variable;
15         bddnode   ∗BddSubst;
16

PARAMETERS

18       BddSystem           The bdd system.
19
20       BddNode             The bdd node.
21
22       Variable            The variable to find.
23
24       BddSubst            The bdd to substitute with.
25

DESCRIPTION

27       composebddnode  substitutes  all the occurency of the variable Variable
28       in the bdd node BddNode by the bdd node BddSubst,  in  the  bdd  system
29       BddSystem.  If a null pointer is given, the default bdd system is used.
30

RETURN VALUE

32       composebddnode returns the resulting bdd node.
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    ∗BddVariable;
44          bddnode    ∗BddNode;
45          bddnode    ∗BddSubst;
46          chain_list ∗Expr;
47          bddvar         Variable;
48          BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
49          BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
50          Expr = createablbinexpr( ABL_AND,
51                                   createablatom( "i0" ),
52                                   createablatom( "i1" ) );
53          BddNode = addbddcircuitabl( BddCircuit, Expr );
54          freeablexpr( Expr );
55          Expr = createablbinexpr( ABL_OR,
56                                   createablatom( "i2" ),
57                                   createablatom( "i3" ) );
58          BddSubst = addbddcircuitabl( BddCircuit, Expr );
59          freeablexpr( Expr );
60          BddVariable = searchbddcircuitin( (bddcircuit ∗)0, "i0" );
61          Variable = getbddvarbyindex( (bddsystem ∗)0, BddVariable->INDEX );
62          BddNode = composebddnode( (bddsystem ∗)0, BddNode, Variable, BddSubst );
63          Expr = convertbddcircuitabl( BddCircuit, BddNode );
64          /* displays (i1 and (i2 or i3)) */
65          viewablexpr( Expr, ABL_VIEW_VHDL );
66          freeablexpr( Expr );
67          destroybddsystem( (bddsystem ∗)0 );
68          destroybddcircuit( (bddcircuit ∗)0 );
69

SEE ALSO

71       bdd(1)
72
73
74
75
76
77
78ASIM/LIP6                       October 1, 1997              COMPOSEBDDNODE(3)
Impressum