dotty: colored acceptance sets
This implement several new options for --dot in order to allow emptiness sets to be output as colored ⓿ or ❶... Also add a SPOT_DOTDEFAULT environment variable. * NEWS, src/bin/man/spot-x.x, src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Document the new options. * doc/org/.dir-locals.el, doc/org/init.el.in: Setup SPOT_DOTEXTRA and SPOT_DOTDEFAULT for all documents. * doc/org/autfilt.org, doc/org/dstar2tgba.org, doc/org/ltl2tgba.org, doc/org/ltldo.org, doc/org/oaut.org, doc/org/randaut.org, doc/org/satmin.org: Adjust to this new setup. * src/misc/escape.cc, src/misc/escape.hh (escape_html): New function. * src/tgba/acc.cc, src/tgba/acc.hh (to_text, to_html): New method. * src/tgbaalgos/dotty.cc: Implement the new options. * src/tgbatest/readsave.test, wrap/python/tests/automata.ipynb: More tests. * wrap/python/spot.py: Make sure the default argument for dotty_reachable is None, so that SPOT_DOTDEFAULT is honored.
This commit is contained in:
parent
7caf2b83d6
commit
838bfb2ae3
21 changed files with 1500 additions and 1193 deletions
|
|
@ -31,7 +31,7 @@ def _ostream_to_svg(ostr):
|
|||
res = dotty.communicate()
|
||||
return res[0].decode('utf-8')
|
||||
|
||||
def _render_automaton_as_svg(a, opt=""):
|
||||
def _render_automaton_as_svg(a, opt=None):
|
||||
ostr = ostringstream()
|
||||
dotty_reachable(ostr, a, opt)
|
||||
return _ostream_to_svg(ostr)
|
||||
|
|
@ -47,7 +47,7 @@ def _render_formula_as_svg(a):
|
|||
dotty(ostr, a)
|
||||
return SVG(_ostream_to_svg(ostr))
|
||||
|
||||
def _render_tgba_as_svg(a, opt=""):
|
||||
def _render_tgba_as_svg(a, opt=None):
|
||||
# Load the SVG function only if we need it. This way the bindings
|
||||
# can still be used outside of IPython if IPython is not
|
||||
# installed.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue