tulip-control / dd

Binary Decision Diagrams (BDDs) in pure Python and Cython wrappers of CUDD, Sylvan, and BuDDy
https://pypi.org/project/dd
Other
178 stars 39 forks source link

implement method `dd.sylvan.BDD.pick_iter` #55

Closed glarange closed 4 years ago

glarange commented 4 years ago

Hi Johnny,

I was able to use pick.iter in dd.cudd but not in the dd.sylvan. Any suggestions would be much appreciated. Thanks again! Gui

Capture_sylvan_not_implemented

johnyf commented 4 years ago

The method dd.sylvan.BDD.pick_iter has not been implemented as of f9aa4d1a09c286de769bde17dd92ece63cf4c3d9. The exception NotImplementedError is documented here.

https://github.com/tulip-control/dd/blob/f9aa4d1a09c286de769bde17dd92ece63cf4c3d9/dd/sylvan.pyx#L293-L296

An implementation would be similar to dd.cudd.BDD.pick_iter:

https://github.com/tulip-control/dd/blob/f9aa4d1a09c286de769bde17dd92ece63cf4c3d9/dd/cudd.pyx#L906-L946

taking into account how sylvan_low works:

https://github.com/tulip-control/dd/blob/f9aa4d1a09c286de769bde17dd92ece63cf4c3d9/dd/sylvan.pyx#L557

johnyf commented 4 years ago

Addressed in c3d6919bf37793b2ca8efe0108e7498379151978.