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
|
|
@ -77,6 +77,31 @@ namespace spot
|
|||
return os;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
escape_html(std::ostream& os, const std::string& str)
|
||||
{
|
||||
for (auto i: str)
|
||||
switch (i)
|
||||
{
|
||||
case '&':
|
||||
os << "&";
|
||||
break;
|
||||
case '"':
|
||||
os << """;
|
||||
break;
|
||||
case '<':
|
||||
os << "<";
|
||||
break;
|
||||
case '>':
|
||||
os << ">";
|
||||
break;
|
||||
default:
|
||||
os << i;
|
||||
break;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
escape_str(std::ostream& os, const std::string& str)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,6 +46,13 @@ namespace spot
|
|||
SPOT_API std::ostream&
|
||||
escape_latex(std::ostream& os, const std::string& str);
|
||||
|
||||
/// \brief Escape special HTML characters.
|
||||
///
|
||||
/// The following characters are rewritten:
|
||||
/// <code>> < " &</code>
|
||||
SPOT_API std::ostream&
|
||||
escape_html(std::ostream& os, const std::string& str);
|
||||
|
||||
/// \brief Escape characters <code>"</code>, <code>\\</code>, and
|
||||
/// <code>\\n</code> in \a str.
|
||||
SPOT_API std::ostream&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue