1GCNODEBDD(3) BDD functions GCNODEBDD(3)
2
3
4
6 gcNodeBdd - does a garbage collection
7
9 #include "logmmm.h"
10 void gcNodeBdd(pt)
11 chain_list *pt;
12
14 pt chained list of BDD to rescue
15
17 gcNodeBdd() removes all the nodes that aren't used in the BDD pointed
18 in the chained list pt.
19
21 #include "mutnnn.h" /* mbk utilities */
22 #include "logmmm.h"
23 pNode nodeA,nodeB,nodeC;
24 pNode res1,res2;
25 chain_list *ptCL;
26
27 initializeBdd(SMALL_BDD);
28 nodeA = createNodeTermBdd(3);
29 nodeB = createNodeTermBdd(3);
30 nodeC = createNodeTermBdd(4);
31
32 res1 = applyBinBdd(OR,applyBinBdd(OR,nodeA,nodeB),nodeC);
33 res2 = applyBinBdd(AND,applyBinBdd(AND,nodeA,nodeB),nodeC);
34 printf("number of nodes in memory = %d",numberAllNodeBdd());
35
36 /* it will display
37 7
38 */
39 ptCL = addchain(NULL,res1);
40 gcNodeBdd(ptCL); /* only res1 nodes are saved */
41
42 freechain(ptCL);
43 printf("number of nodes in memory = %d",numberAllNodeBdd());
44
45 /* it will display
46 number of nodes in memory = 5
47 */
48 destroyBdd(1);
49
51 log(1), bdd(1), markBdd(3), supportChain_listBdd(3), markAllBdd(3),
52 numberNodeBdd(3),
53
54
55
56
57
58ASIM/LIP6 October 1, 1997 GCNODEBDD(3)