1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
int main (int argc, char *argv[])
{
char filename[30];
DdManager *gbm; /* Global BDD manager. */
gbm = Cudd_Init(0, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0); /* Initialize a new BDD manager. */
DdNode *bdd, *x1, *x2;
x1 = Cudd_bddNewVar(gbm); /*Create a new BDD variable x1*/
x2 = Cudd_bddNewVar(gbm); /*Create a new BDD variable x2*/
bdd = Cudd_bddXor(gbm, x1, x2); /*Perform XOR Boolean operation*/
Cudd_Ref(bdd); /*Update the reference count for the node just created.*/
bdd = Cudd_BddToAdd(gbm, bdd); /*Convert BDD to ADD for display purpose*/
print_dd (gbm, bdd, 2,4); /*Print the dd to standard output*/
sprintf(filename, "./bdd/graph.dot"); /*Write .dot filename to a string*/
write_dd(gbm, bdd, filename); /*Write the resulting cascade dd to a file*/
Cudd_Quit(gbm);
return 0;
}
|