dot: add option 'A' to disable 'a'

This way in 2.5 we can make 'a' the default, and tell people to use
SPOT_DOTDEFAULT=A if they want the old behavior in both 2.4 and 2.5.

* spot/twaalgos/dot.cc: Implement the option.
* NEWS, bin/common_aoutput.cc: Mention it.
* tests/core/readsave.test: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2017-08-30 15:08:53 +02:00
parent 205294c2c2
commit b242122ce8
4 changed files with 11 additions and 5 deletions

2
NEWS
View file

@ -72,6 +72,8 @@ New in spot 2.3.5.dev (not yet released)
- The print_dot() function will now display names for well known - The print_dot() function will now display names for well known
acceptance conditions under the formula when option 'a' is used. acceptance conditions under the formula when option 'a' is used.
We plan to enable 'a' by default in a future release, so a new
option 'A' has been added to hide the acceptance condition.
- A new named property for automata called "original-states" can be - A new named property for automata called "original-states" can be
used to record the origin of a state before transformation. It is used to record the origin of a state before transformation. It is

View file

@ -88,11 +88,12 @@ static const argp_option options[] =
/**************************************************/ /**************************************************/
{ nullptr, 0, nullptr, 0, "Output format:", 3 }, { nullptr, 0, nullptr, 0, "Output format:", 3 },
{ "dot", 'd', { "dot", 'd',
"1|a|b|B|c|C(COLOR)|e|f(FONT)|h|k|n|N|o|r|R|s|t|v|y|+INT|<INT|#", "1|a|A|b|B|c|C(COLOR)|e|f(FONT)|h|k|n|N|o|r|R|s|t|v|y|+INT|<INT|#",
OPTION_ARG_OPTIONAL, OPTION_ARG_OPTIONAL,
"GraphViz's format. Add letters for " "GraphViz's format. Add letters for "
"(1) force numbered states, " "(1) force numbered states, "
"(a) display acceptance, " "(a) show acceptance condition, "
"(A) hide acceptance condition, "
"(b) acceptance sets as bullets, " "(b) acceptance sets as bullets, "
"(B) bullets except for Büchi/co-Büchi automata, " "(B) bullets except for Büchi/co-Büchi automata, "
"(c) force circular nodes, " "(c) force circular nodes, "
@ -102,8 +103,8 @@ static const argp_option options[] =
"(f(FONT)) use FONT, " "(f(FONT)) use FONT, "
"(h) horizontal layout, " "(h) horizontal layout, "
"(k) use state labels when possible, " "(k) use state labels when possible, "
"(n) with name, " "(n) show name, "
"(N) without name, " "(N) hide name, "
"(o) ordered transitions, " "(o) ordered transitions, "
"(r) rainbow colors for acceptance sets, " "(r) rainbow colors for acceptance sets, "
"(R) color acceptance sets by Inf/Fin, " "(R) color acceptance sets by Inf/Fin, "

View file

@ -187,6 +187,9 @@ namespace spot
case 'a': case 'a':
opt_show_acc_ = true; opt_show_acc_ = true;
break; break;
case 'A':
opt_show_acc_ = false;
break;
case 'b': case 'b':
opt_bullet = true; opt_bullet = true;
opt_bullet_but_buchi = false; opt_bullet_but_buchi = false;

View file

@ -314,7 +314,7 @@ EOF
autfilt -H input | autfilt -H input |
SPOT_DEFAULT_FORMAT=dot \ SPOT_DEFAULT_FORMAT=dot \
SPOT_DOTDEFAULT=vcsn \ SPOT_DOTDEFAULT=vcsnaA \
SPOT_DOTEXTRA='/* hello world */' \ SPOT_DOTEXTRA='/* hello world */' \
autfilt >output autfilt >output