Add TA minimization: merge bisimulating states
* src/taalgos/minimize.hh, src/taalgos/minimize.cc: implements a minimization of TA by merging bisimular states. * src/taalgos/statessetbuilder.hh, src/taalgos/statessetbuilder.cc: returns the set of reachable states of a TA (used in minimize.cc). * src/taalgos/Makefile.am: add them. * src/tgbatest/ltl2tgba.cc: add commands to test TA minimization
This commit is contained in:
parent
81e80e6069
commit
cd04d9acf3
6 changed files with 605 additions and 3 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#include "neverparse/public.hh"
|
||||
#include "tgbaalgos/dupexp.hh"
|
||||
#include "tgbaalgos/minimize.hh"
|
||||
#include "taalgos/minimize.hh"
|
||||
#include "tgbaalgos/neverclaim.hh"
|
||||
#include "tgbaalgos/replayrun.hh"
|
||||
#include "tgbaalgos/rundotdec.hh"
|
||||
|
|
@ -281,7 +282,11 @@ syntax(char* prog)
|
|||
<< "Options for Testing Automata:"
|
||||
<< std::endl
|
||||
<< " -TA Translate an LTL formula into a Testing automata"
|
||||
<< std::endl;
|
||||
<< std::endl
|
||||
<< std::endl
|
||||
<< " -TM Translate an LTL formula into a minimal Testing automata"
|
||||
<< std::endl;
|
||||
|
||||
|
||||
exit(2);
|
||||
}
|
||||
|
|
@ -343,6 +348,7 @@ main(int argc, char** argv)
|
|||
spot::tgba* temp_dir_sim = 0;
|
||||
bool ta_opt = false;
|
||||
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (argc < formula_index + 2)
|
||||
|
|
@ -673,6 +679,11 @@ main(int argc, char** argv)
|
|||
{
|
||||
ta_opt = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-TM"))
|
||||
{
|
||||
ta_opt = true;
|
||||
opt_minimize = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-taa"))
|
||||
{
|
||||
translation = TransTAA;
|
||||
|
|
@ -1084,9 +1095,10 @@ main(int argc, char** argv)
|
|||
delete aps;
|
||||
|
||||
spot::ta* testing_automata = sba_to_ta(degeneralized, atomic_props_set_bdd);
|
||||
if (opt_minimize) testing_automata = minimize_ta(testing_automata);
|
||||
spot::dotty_reachable(std::cout, testing_automata);
|
||||
delete testing_automata;
|
||||
delete degeneralized_new;
|
||||
|
||||
output = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue