* src/tgbaalgos/minimizerun.hh, src/tgbaalgos/minimizerun.cc: New

files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS,
libtgbaalgos_la_SOURCES): Add them/
* src/tgbatest/randtgba.cc, src/tgbatest/ltl2tgba.cc: Add option -m.
* src/tgbatest/emptchkr.test: Use -m.
This commit is contained in:
Alexandre Duret-Lutz 2004-11-26 23:54:53 +00:00
parent 15329c5618
commit 6724f4bfbb
7 changed files with 392 additions and 90 deletions

View file

@ -37,6 +37,7 @@
#include "tgba/tgbatba.hh"
#include "tgbaalgos/gv04.hh"
#include "tgbaalgos/magic.hh"
#include "tgbaalgos/minimizerun.hh"
#include "tgbaalgos/se05.hh"
#include "tgbaalgos/tau03.hh"
#include "tgbaalgos/tau03opt.hh"
@ -74,6 +75,8 @@ syntax(char* prog)
<< " -g graph the accepting run on the automaton (requires -e)"
<< std::endl
<< " -L fair-loop approximation (implies -f)" << std::endl
<< " -m try to minimize accepting runs, in a second pass"
<< std::endl
<< " -N display the never clain for Spin "
<< "(implies -D)" << std::endl
<< " -p branching postponement (implies -f)" << std::endl
@ -166,6 +169,7 @@ main(int argc, char** argv)
bool post_branching = false;
bool fair_loop_approx = false;
bool graph_run_opt = false;
bool opt_minim = false;
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::ltl::atomic_prop_set* unobservables = 0;
@ -241,6 +245,10 @@ main(int argc, char** argv)
fair_loop_approx = true;
fm_opt = true;
}
else if (!strcmp(argv[formula_index], "-m"))
{
opt_minim = true;
}
else if (!strcmp(argv[formula_index], "-N"))
{
degeneralize_opt = DegenSBA;
@ -725,6 +733,13 @@ main(int argc, char** argv)
}
else
{
if (opt_minim)
{
spot::tgba_run* mini =
spot::minimize_run(res->automaton(), run);
delete run;
run = mini;
}
if (graph_run_opt)
{
spot::tgba_run_dotty_decorator deco(run);