from IPython.display import display
import spot
spot.setup()
If an argument of spot.automata
ends with |
, then it is interpreted as a shell command that outputs one automaton or more.
for a in spot.automata('ltl2tgba -s "a U b"; ltl2tgba --lbtt "b"|', 'ltl2tgba -H "GFa" "a & GFb"|'):
display(a)
A single automaton can be read using spot.automaton()
, with the same convention.
spot.automaton('ltl2tgba -s6 "a U b"|')
If the shell command terminates with a non-zero exit status, we should get an exception.
spot.automaton('non-existing-command|')
for a in spot.automata("ltl2tgba 'a U b'|", 'ltl2tgba "syntax U U error"|'):
display(a)
Reading an empty file with spot.automaton()
is an error.
spot.automaton('true|')