import spot
spot.setup()
Work in progress for a representation of ω-automata (a.k.a. twa in Spot) using MTBDDs. We initially implemented a transition-based variant, before realizing that using MTBDDs, the transition-based and state-based versions of an automaton have exactly the same structure, the state-based version is even slightly more memory efficient.
So even if the transition-based variant still exists, its state-based counterpart is more developed.
This notebook is about the transition-based variant. See mtdswa.ipynb for the state-based version.
a = spot.translate("GFa <-> c", "generic", "deterministic")
a
m = spot.dtwa_to_mtdtwa(a)
m
Each terminal stores an integer that allows to retrieve the data presented in the leaves above: a set of colors, and a destination state.
for i, d in enumerate(m.terminal_data_map):
print(f"terminal_data_map[{i}] = {d}")
terminal_data_map[0] = (spot.mark_t([]), 1) terminal_data_map[1] = (spot.mark_t([]), 2) terminal_data_map[2] = (spot.mark_t([0]), 1) terminal_data_map[3] = (spot.mark_t([0, 1]), 1) terminal_data_map[4] = (spot.mark_t([1]), 2)
m.as_twa()
m.as_twa(True)