From: luca gambardella (espuma_party_at_yahoo.it)
Date: Mon Oct 18 2004 - 05:51:22 MDT
I'm trying to build zdd without converting from an existent bdd, but I've got a lot of troubles. I can't obtain what I want. Suppose that you want to construct the zdd representing the formula x0x1'x2x3' (where ' stands for negative phase). According with the CUDD documentation the corrispondent code shoiuld be the following (here sign(i) return 0 if the variable xi is in negative phase and 1 otherwise):
tmp = Cudd_ReadZddOne(manager,0);
Cudd_Ref(tmp);
for (i = 3; i >= 0; i--)
{
var = Cudd_zddIthVar(manager,i);
Cudd_Ref(var);
if(sign(i)==0)
f = Cudd_zddIntersect(manager,Cudd_zddDiff(manager,Cudd_ReadZddOne(manager,0),var),tmp);
else
f = Cudd_zddIntersect(manager,var,tmp);
Cudd_Ref(f);
Cudd_RecursiveDerefZdd(manager,tmp);
Cudd_RecursiveDerefZdd(manager,var);
tmp = f;
}
Cudd_zddPrintDebug(manager,f,_ordered_vars.size(),1);
Cudd_Ref(f);
Cudd_RecursiveDerefZdd(manager,tmp);
Is there something wrong?
Thanks in advance.
Luca
---------------------------------
Nuovo Yahoo! Messenger E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
This archive was generated by hypermail 2.1.7 : Mon Oct 18 2004 - 05:55:28 MDT