Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterating over all satisfying assignments for a ZBDD? #20

Open
johnrudge opened this issue Sep 7, 2024 · 2 comments
Open

Iterating over all satisfying assignments for a ZBDD? #20

johnrudge opened this issue Sep 7, 2024 · 2 comments

Comments

@johnrudge
Copy link

Thank you for the oxidd package! I'm sorry if I've missed this somewhere, but is it possible to iterate over all satisfying assignments for a ZBDD with oxidd? I'm using the python interface, and I can see the function ZBDDFunction.pick_cube which can be used to give me a satisfying assignment, but nothing that seems to allow me to iterate over all satifying assignments. It would be great to have something like ZBDDFunction.pick_cube_iter that would give an iterator (python generator) that can be used to loop over all satisfying assignments.

@nhusung
Copy link
Member

nhusung commented Sep 11, 2024

There is no simple function for iterating over all cubes of a function yet. Since you mention ZBDDFunction.pick_cube (and not the recently added symbolic version), I assume you want the cubes as lists over bool|None and not as ZBDDs, right? I’m currently working on a paper and the deadline is coming close, but afterwards I can implement that.

@johnrudge
Copy link
Author

Thanks for the reply! Yes, that's right. I'm viewing the ZBDD as describing a set of sets, and I want to iterate through the individual sets in a for loop, similiar to what can be done with setset in graphillion https://github.com/takemaru/graphillion/blob/20d54642bec34398da962c7308e5b25f08ef3452/graphillion/setset.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants