peteg / hBDD

BDD (Boolean Decision Diagram) bindings for Haskell
Other
7 stars 3 forks source link

for large numbers of variables cuddGarbageCollect fails because dead count != deleted #3

Open m4lvin opened 9 years ago

m4lvin commented 9 years ago

For large numbers of variables (>4000) I run into the following error, happening somewhat randomly:

cuddGarbageCollect: problem in table 34
dead count != deleted
This problem is often due to a missing call to Cudd_Ref
or to an extra call to Cudd_RecursiveDeref.
See the CUDD Programmer's Guide for additional details.Aborted

Using null finalizers is a quick and ugly fix, see https://github.com/m4lvin/hBDD/commit/104acf2bae66a7200ee69b4af64781c6a9c7cf4e, but how can we do this properly?

peteg commented 9 years ago

Malvin - I don�t think the approach taken by hBDD scales up to large computations. At some point you want to be a lot more careful about resource use. I think a monadic interface with an explicit free operation would be the way to go. It may still be possible to support at least some of the convenience of hBDD though, through the use of regions or something.

Also it�s been a long time since I�ve used hBDD, and I�m not surprised there appear to be bugs in there. I�m no longer in a position to sort them out unfortunately.

peteg commented 7 years ago

Sorry, no. I suggest you take it up with the CuDD developers if possible.