1ISBDDVARINSUPPORT(3) BDD FUNCTIONS ISBDDVARINSUPPORT(3)
2
3
4
6 isbddvarinsupport - tests if a variable appears in a bdd.
7
9 #include "bdd101.h"
10 int isbddvarinsupport( BddSystem, BddNode, Variable )
11 bddsystem ∗BddSystem;
12 bddnode ∗BddNode;
13 bddvar Variable;
14
16 BddSystem The bdd system.
17
18 BddNode The bdd node.
19
20 Variable The variable number.
21
23 isbddvarinsupport tests if the variable number Variable appears in the
24 support of the bdd node BddNode, in the bdd system BddSystem. If a
25 null pointer is given, the default bdd system is used.
26
28 isbddvarinsupport returns 1 if Variable appears, 0 otherwise.
29
31 "variable xxx out of range, error !"
32 The Variable parameter must be less or equal to the BddSys‐
33 tem->NUMBER_VAR field.
34
36 #include "bdd101.h"
37 bddsystem ∗BddSystem;
38 bddcircuit ∗BddCircuit;
39 bddnode ∗BddNode;
40 bddnode ∗BddVariable;
41 chain_list ∗Expr;
42 bddvar Variable;
43 BddSystem = createbddsystem( 100, 1000, 100, 50000 );
44 BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
45 Expr = createablbinexpr( ABL_AND,
46 createablatom( "i0" ),
47 createablatom( "i1" ) );
48 BddNode = addbddcircuitabl( BddCircuit, Expr );
49 freeablexpr( Expr );
50 BddVariable = searchbddcircuitin( (bddcircuit ∗)0, "i0" );
51 Variable = getbddvarbyindex( (bddsystem ∗ 0), BddVariable->INDEX ) );
52 /* displays 1 */
53 printf( "%d", isbddvarinsupport( (bddsystem ∗)0, BddNode, Variable ) );
54 destroybddsystem( (bddsystem ∗)0 );
55 destroybddcircuit( (bddcircuit ∗)0 );
56
58 bdd(1)
59
60
61
62
63
64
65ASIM/LIP6 October 1, 1997 ISBDDVARINSUPPORT(3)