cudd icon indicating copy to clipboard operation
cudd copied to clipboard

C++ interface functions

Open glarange opened this issue 5 years ago • 1 comments

Hi, @ivmai

I've been using the cudd classic (in C), but wanted to try the C++ because of the much greater facility in constructing Boolean functions. I've been using it mainly to convert coherent (non-decreasing) Booleans to BDD to find all the minterms. So I would like to do something such as below (at much larger scale, with 1000s of vars). I was using the C function Cudd_PrintDebug(gbm, BDD, 2, 4); -- which gave me everything I needed, minterms and the var mapping.

Can you help me with the equivalent C++ interface function? Or refer me to the documentation? I've found function descriptors for C but not for C++.

`/* Top=a(b+c+de)./ int main() { Cudd mgr(0, 0); BDD a = mgr.bddVar(); BDD b = mgr.bddVar(); BDD c = mgr.bddVar(); BDD d = mgr.bddVar(); BDD e = mgr.bddVar(); BDD top = a(b + c + d*e);

Cudd_PrintSummary(mgr, top, 2, 4); 
/*Cudd_PrintMinterm(mgr, top)*/
/*int Cudd_EpdPrintMinterm(DdManager const * dd, DdNode * node, int nvars);*/
/*Cudd_EpdPrintMinterm(mgr, top, 5)*/
return 0 

}`

The above doesn't work. Any pointers much appreciated!

Gui

glarange avatar Jul 16 '20 20:07 glarange

Hello @glarange, I'm sorry, I'm neither maintainer nor author of this library. Let the issue be open - maybe someone else has an advice.

ivmai avatar Jul 18 '20 21:07 ivmai