In [1]:
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.
Multi-Terminal-BDD-based Deterministic Transition-based ω-Automaton (MTDTwA)¶
In [2]:
a = spot.translate("GFa <-> c", "generic", "deterministic")
a
Out[2]:
In [3]:
m = spot.dtwa_to_mtdtwa(a)
m
Out[3]:
Each terminal stores an integer that allows to retrieve the data presented in the leaves above: a set of colors, and a destination state.
In [4]:
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)
In [5]:
m.as_twa()
Out[5]:
In [6]:
m.as_twa(True)
Out[6]: