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:
parent
0842494fed
commit
0f178288c6
15 changed files with 143 additions and 55 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ static const argp_option options[] =
|
|||
"of the given property)", 0 },
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Output format:", 3 },
|
||||
{ "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, "
|
||||
|
|
@ -126,6 +129,7 @@ const struct argp_child children[] =
|
|||
};
|
||||
|
||||
enum output_format { Dot, Lbtt, Lbtt_t, Spin, Spot, Stats, Hoa } format = Dot;
|
||||
const char* opt_dot = nullptr;
|
||||
bool utf8 = false;
|
||||
const char* stats = "";
|
||||
const char* hoa_opt = 0;
|
||||
|
|
@ -167,6 +171,7 @@ parse_opt(int key, char* arg, struct argp_state*)
|
|||
break;
|
||||
case OPT_DOT:
|
||||
format = Dot;
|
||||
opt_dot = arg;
|
||||
break;
|
||||
case OPT_LBTT:
|
||||
if (arg)
|
||||
|
|
@ -315,7 +320,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);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,10 @@ static const argp_option options[] =
|
|||
{ 0, 0, 0, 0, "Output format:", 3 },
|
||||
{ "csv-escape", OPT_CSV, 0, 0, "quote formula output by %f in --format "
|
||||
"for use in CSV file", 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 },
|
||||
{ "hoa", '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, "
|
||||
|
|
@ -124,7 +127,7 @@ const struct argp_child children[] =
|
|||
};
|
||||
|
||||
enum output_format { Dot, Lbtt, Lbtt_t, Spin, Spot, Stats, Hoa } format = Dot;
|
||||
bool utf8 = false;
|
||||
const char* opt_dot = nullptr;
|
||||
const char* stats = "";
|
||||
const char* hoa_opt = 0;
|
||||
spot::option_map extra_options;
|
||||
|
|
@ -166,6 +169,7 @@ parse_opt(int key, char* arg, struct argp_state*)
|
|||
break;
|
||||
case OPT_DOT:
|
||||
format = Dot;
|
||||
opt_dot = arg;
|
||||
break;
|
||||
case OPT_LBTT:
|
||||
if (arg)
|
||||
|
|
@ -245,7 +249,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);
|
||||
|
|
|
|||
|
|
@ -93,7 +93,10 @@ static const argp_option options[] =
|
|||
RANGE_DOC,
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Output format:", 3 },
|
||||
{ "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, "
|
||||
|
|
@ -117,6 +120,7 @@ static const struct argp_child children[] =
|
|||
typedef spot::tgba_digraph::graph_t::trans_storage_t tr_t;
|
||||
typedef std::set<std::vector<tr_t>> unique_aut_t;
|
||||
static enum output_format { Dot, Lbtt, Lbtt_t, Spin, Hoa } format = Dot;
|
||||
const char* opt_dot = nullptr;
|
||||
static const char* hoa_opt = 0;
|
||||
static spot::ltl::atomic_prop_set aprops;
|
||||
static bool ap_count_given = false;
|
||||
|
|
@ -210,6 +214,7 @@ parse_opt(int key, char* arg, struct argp_state* as)
|
|||
break;
|
||||
case OPT_DOT:
|
||||
format = Dot;
|
||||
opt_dot = arg;
|
||||
break;
|
||||
case OPT_LBTT:
|
||||
if (arg)
|
||||
|
|
@ -318,7 +323,7 @@ main(int argc, char** argv)
|
|||
switch (format)
|
||||
{
|
||||
case Dot:
|
||||
spot::dotty_reachable(std::cout, aut, is_ba);
|
||||
spot::dotty_reachable(std::cout, aut, is_ba, opt_dot);
|
||||
break;
|
||||
case Lbtt:
|
||||
spot::lbtt_reachable(std::cout, aut, is_ba);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue