Create the iterated simulations.

* src/tgbaalgos/simulation.cc: Create the iterated_simulations.
(direct_simulation) Add an attribute "stat" that represents the
number of states and transitions of the resulting automaton.
* src/tgbaalgos/simulation.hh: Declare the iterated_simulations.
* src/tgbatest/spotlbtt.test: Test the iterated_simulations.
* src/tgbatest/ltl2tgba.cc: Associate the option -RIS to the
iterated_simulations.
This commit is contained in:
Thomas Badie 2012-08-18 15:30:43 +02:00 committed by Alexandre Duret-Lutz
parent 242386b19a
commit a0cce10512
4 changed files with 101 additions and 2 deletions

View file

@ -206,6 +206,9 @@ syntax(char* prog)
<< std::endl
<< " -RRS minimize the automaton with reverse simulation"
<< std::endl
<< " -RPS minimize the automaton with an alternance"
<< " reverse simulation and simulation"
<< std::endl
<< " -Rm attempt to WDBA-minimize the automata" << std::endl
<< std::endl
@ -355,6 +358,7 @@ main(int argc, char** argv)
bool assume_sba = false;
bool reduction_dir_sim = false;
bool reduction_rev_sim = false;
bool reduction_iterated_sim = false;
spot::tgba* temp_dir_sim = 0;
bool ta_opt = false;
bool tgta_opt = false;
@ -362,6 +366,8 @@ main(int argc, char** argv)
bool opt_single_pass_emptiness_check = false;
bool opt_with_artificial_livelock = false;
spot::tgba* temp_rev_sim = 0;
spot::tgba* temp_iterated_sim = 0;
for (;;)
{
@ -663,6 +669,10 @@ main(int argc, char** argv)
{
reduction_dir_sim = true;
}
else if (!strcmp(argv[formula_index], "-RIS"))
{
reduction_iterated_sim = true;
}
else if (!strcmp(argv[formula_index], "-rL"))
{
simpltl = true;
@ -1062,6 +1072,15 @@ main(int argc, char** argv)
assume_sba = false;
}
if (reduction_iterated_sim)
{
tm.start("Reduction w/ iterated simulations");
temp_iterated_sim = spot::iterated_simulations(a);
a = temp_iterated_sim;
tm.stop("Reduction w/ iterated simulations");
assume_sba = false;
}
unsigned int n_acc = a->number_of_acceptance_conditions();
if (echeck_inst
@ -1523,6 +1542,7 @@ main(int argc, char** argv)
delete echeck_inst;
delete temp_dir_sim;
delete temp_rev_sim;
delete temp_iterated_sim;
}
else
{