ivmai / cudd

CUDD: CU Decision Diagram package - unofficial git mirror of https://web.archive.org/web/20180127051756/http://vlsi.colorado.edu/~fabio/CUDD/html/index.html (intro: https://web.archive.org/web/20150215010018/http://vlsi.colorado.edu/~fabio/CUDD/cuddIntro.html)
BSD 3-Clause "New" or "Revised" License
114 stars 64 forks source link

C++ interface functions #5

Open glarange opened 4 years ago

glarange commented 4 years ago

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 + de);

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

ivmai commented 4 years ago

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.