1DELBDDNODEASSOC(3) BDD FUNCTIONS DELBDDNODEASSOC(3)
2
3
4
6 delbddnodeassoc - deletes a bdd node in a variable association.
7
9 #include "bdd101.h"
10 int delbddnodeassoc( BddSystem, BddAssoc, Variable )
11 bddsystem ∗BddSystem;
12 bddassoc ∗BddAssoc;
13 bddvar Variable;
14
16 BddSystem The bdd system.
17
18 BddAssoc The variable association.
19
20 Variable The variable number.
21
23 delbddnodeassoc deletes the bdd node associated to the variable number
24 Variable, in the variable association BddAssoc, in the bdd system
25 BddSystem. If a null pointer is given, the default bdd system is used.
26 The number of external reference of the associated bdd node is incre‐
27 mented.
28
30 delbddnodeassoc returns 1 if the variable is found, 0 otherwise.
31
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
38 #include "bdd101.h"
39 bddsystem ∗BddSystem;
40 bddcircuit ∗BddCircuit;
41 bddnode ∗BddNode;
42 bddnode ∗BddSubst;
43 bddnode ∗BddVariable;
44 bddassoc ∗Assoc;
45 chain_list ∗Expr;
46 bddvar Variable;
47 BddSystem = createbddsystem( 100, 1000, 100, 50000 );
48 BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
49 Expr = createablbinexpr( ABL_AND,
50 createablatom( "i0" ),
51 createablatom( "i1" ) );
52 BddNode = addbddcircuitabl( BddCircuit, Expr );
53 freeablexpr( Expr );
54 Expr = createablbinexpr( ABL_OR,
55 createablatom( "i2" ),
56 createablatom( "i3" ) );
57 BddSubst = addbddcircuitabl( BddCircuit, Expr );
58 freeablexpr( Expr );
59 BddVariable = searchbddcircuitin( (bddcircuit ∗)0, "i0" );
60 Variable = getbddvarbyindex( (bddsystem ∗)0, BddVariable->INDEX );
61 Assoc = addbddassoc( (bddsystem ∗)0 );
62 addbddnodeassoc( (bddsystem ∗)0, Assoc, Variable, BddSubst );
63 BddNode = substbddnodeassoc( (bddsystem ∗)0, BddSubst, Assoc );
64 delbddnodeassoc( (bddsystem ∗)0, Assoc, Variable );
65 Expr = convertbddcircuitabl( BddCircuit, BddNode );
66 /* displays ((i3 or i2) and i1) */
67 viewablexpr( Expr, ABL_VIEW_VHDL );
68 freeablexpr( Expr );
69 destroybddassoc( (bddsystem ∗)0 );
70 destroybddsystem( (bddsystem ∗)0 );
71 destroybddcircuit( (bddcircuit ∗)0 );
72
74 bdd(1)
75
76
77
78
79
80
81ASIM/LIP6 October 1, 1997 DELBDDNODEASSOC(3)