dotty: switch to horizontal output and add options

* src/tgbaalgos/dotty.cc, src/tgbaalgos/dotty.hh: Add an options
parameter.
* src/bin/randaut.cc, src/bin/autfilt.cc, src/bin/dstar2tgba.cc,
src/bin/ltl2tgba.cc, wrap/python/ajax/spot.in: Use it.
* src/tgbatest/det.test, src/tgbatest/dstar.test,
src/tgbatest/ltl2tgba.cc, src/tgbatest/monitor.test,
src/tgbatest/neverclaimread.test, src/tgbatest/tgbaread.test,
src/graphtest/tgbagraph.test: Adjust
because automata are now output horizontally.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2014-12-17 23:39:47 +01:00
parent 0842494fed
commit 0f178288c6
15 changed files with 143 additions and 55 deletions

View file

@ -104,7 +104,10 @@ static const argp_option options[] =
/**************************************************/
{ 0, 0, 0, 0, "Output format:", 3 },
{ "count", 'c', 0, 0, "print only a count of matched automata", 0 },
{ "dot", OPT_DOT, 0, 0, "GraphViz's format (default)", 0 },
{ "dot", OPT_DOT, "c|h|n|N|t|v", OPTION_ARG_OPTIONAL,
"GraphViz's format (default). Add letters to chose (c) circular nodes, "
"(h) horizontal layout, (v) vertical layout, (n) with name, "
"(N) without name, (t) always transition-based acceptance.", 0 },
{ "hoaf", 'H', "s|t|m|l", OPTION_ARG_OPTIONAL,
"Output the automaton in HOA format. Add letters to select "
"(s) state-based acceptance, (t) transition-based acceptance, "
@ -206,6 +209,7 @@ static const struct argp_child children[] =
static enum output_format { Dot, Lbtt, Lbtt_t, Spin, Spot, Stats, Hoa,
Quiet, Count } format = Dot;
const char* opt_dot = nullptr;
typedef spot::tgba_digraph::graph_t::trans_storage_t tr_t;
typedef std::set<std::vector<tr_t>> unique_aut_t;
static long int match_count = 0;
@ -314,6 +318,7 @@ parse_opt(int key, char* arg, struct argp_state*)
}
case OPT_DOT:
format = Dot;
opt_dot = arg;
break;
case OPT_EDGES:
opt_edges = parse_range(arg, 0, std::numeric_limits<int>::max());
@ -640,7 +645,8 @@ namespace
case Dot:
spot::dotty_reachable(std::cout, aut,
(type == spot::postprocessor::BA)
|| (type == spot::postprocessor::Monitor));
|| (type == spot::postprocessor::Monitor),
opt_dot);
break;
case Lbtt:
spot::lbtt_reachable(std::cout, aut, type == spot::postprocessor::BA);