1GCNODEBDD(3)                     BDD functions                    GCNODEBDD(3)
2
3
4

NAME

6       gcNodeBdd - does a garbage collection
7

SYNOPSIS

9       #include "logmmm.h"
10       void gcNodeBdd(pt)
11       chain_list *pt;
12

PARAMETER

14       pt                  chained list of BDD to rescue
15

DESCRIPTION

17       gcNodeBdd()  removes  all the nodes that aren't used in the BDD pointed
18       in the chained list pt.
19

EXAMPLE

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

SEE ALSO

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)
Impressum