Support for tgba_powerset() in Python

Dear Spot development team, I am currently working on a python project that uses Spot to process omega-automata. We want to use tgba_powerset() and obtain a map from states of the original automaton to the sets representing states of the deterministic automaton. There is a struct power_map, which one can obtain when passing it as an argument to tgba_powerset(). However, it returns SwigPyObject (obtained form C++ method) that is not iterable and we cannot convert the object to Python dictionary/list/set. One can use power_map.states_of(const int), however it is also not iterable. Is there a workaround for this problem? Could you add support for this in python or make power_map.states_of(const int) iterable? This fix would be a big help to our project from which we want to publish a paper soon. Thank you very much for the possible collaboration. Best regards, Marek Jankola

Marek Jankola <marek.jankola773@gmail.com> writes:
power_map.states_of(const int) iterable?
Hi Marek, If you apply this: https://gitlab.lre.epita.fr/spot/spot/-/commit/cbb981ffd500a8779c0c147bd6a3a... You should be able to do that.
participants (2)
-
Alexandre Duret-Lutz
-
Marek Jankola