a question about building bdd tree with CU Decision Diagram Package

From: 062052002_at_fudan.edu.cn
Date: Wed Oct 18 2006 - 07:24:15 MDT


Hi All,

I am new with Cudd. Maybe it is not appropriate to post my question
here but, I still have no idea after searching the internet. Sorry for
any potential disturbance caused. I would be appreciated for any help.

I want to build a BDD tree, but I encountered a strange problem that
there is only a constant "1" node in my bdd tree, and the constant "0"
node is lost.

In order to illerstate the problem clearly, I tried to build a
simpliest tree, with only one varible, such as f=x0. We know the tree
SHOULD have 3 nodes, the root is x0, the 'then' branch is constant 1,
and the 'else' branch is constant 0. However, in my case, I got both
constant 1.

My code is as below:

        DdNode *f;
        DdManager *DM;
        DM=Cudd_Init(0,0,CUDD_UNIQUE_SLOTS,CUDD_CACHE_SLOTS,0);

        f=Cudd_bddNewVar(DM);
        if(Cudd_IsConstant(Cudd_T(f))) {
           printf("The 'then' branch is contant node,
                   which value is %f.\n",Cudd_V(Cudd_T(f)));
        }
        if(Cudd_IsConstant(Cudd_E(f))) {
           printf("The 'else' branch is contant node,
                   which value is %f.\n",Cudd_V(Cudd_E(f)));
        }

And the output is:

The 'then' branch is contant node, which value is 1.000000.
The 'else' branch is contant node, which value is 1.000000.

I've tried a few different bdd trees including the example
in section "Basic BDD Manipulation" of the help document,
but I always get similar results as above. The version I
use is cudd-2.4.1.

Can anyone give me some tips? Thanks a lot!



This archive was generated by hypermail 2.1.7 : Wed Oct 18 2006 - 07:54:18 MDT