Add a new form of TA with a Single-pass emptiness check (STA)
* src/ta/ta.cc, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc,src/ta/taproduct.hh, src/taalgos/dotty.cc, src/taalgos/emptinessta.cc, src/taalgos/emptinessta.hh, src/taalgos/minimize.cc, src/taalgos/reachiter.cc, src/taalgos/sba2ta.cc, src/taalgos/sba2ta.hh, src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.cc: Impacts of the implementation of a new variant of TA, called STA, which involve a Single-pass emptiness check. The new options (-in and -lv) added to build the new variants of TA allow to add two artificial states: 1- an initial artificial state to have an unique initial state (-in) 2- a livelock artificial state which has no successors in order to obtain the new form of TA which requires only a Single-pass emptiness- check: STA (-lv).
This commit is contained in:
parent
310973f88c
commit
782ba0010b
15 changed files with 1224 additions and 711 deletions
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
#include "taalgos/sba2ta.hh"
|
||||
#include "taalgos/dotty.hh"
|
||||
#include "taalgos/stats.hh"
|
||||
|
||||
std::string
|
||||
ltl_defs()
|
||||
|
|
@ -285,6 +286,12 @@ syntax(char* prog)
|
|||
<< std::endl
|
||||
<< std::endl
|
||||
<< " -TM Translate an LTL formula into a minimal Testing automata"
|
||||
<< std::endl
|
||||
<< std::endl
|
||||
<< " -lv Translate an LTL formula into a Testing automata with an artificial livelock accepting state"
|
||||
<< std::endl
|
||||
<< std::endl
|
||||
<< " -in Translate an LTL formula into a Testing automata without artificial initial state"
|
||||
<< std::endl;
|
||||
|
||||
|
||||
|
|
@ -347,6 +354,8 @@ main(int argc, char** argv)
|
|||
bool reduction_dir_sim = false;
|
||||
spot::tgba* temp_dir_sim = 0;
|
||||
bool ta_opt = false;
|
||||
bool opt_with_artificial_livelock = false;
|
||||
bool opt_with_artificial_initial_state = true;
|
||||
|
||||
|
||||
for (;;)
|
||||
|
|
@ -684,6 +693,14 @@ main(int argc, char** argv)
|
|||
ta_opt = true;
|
||||
opt_minimize = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-lv"))
|
||||
{
|
||||
opt_with_artificial_livelock = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-in"))
|
||||
{
|
||||
opt_with_artificial_initial_state = false;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-taa"))
|
||||
{
|
||||
translation = TransTAA;
|
||||
|
|
@ -979,7 +996,7 @@ main(int argc, char** argv)
|
|||
const spot::tgba* degeneralized = 0;
|
||||
|
||||
spot::tgba* minimized = 0;
|
||||
if (opt_minimize)
|
||||
if (opt_minimize && !ta_opt)
|
||||
{
|
||||
tm.start("obligation minimization");
|
||||
minimized = minimize_obligation(a, f);
|
||||
|
|
@ -1094,12 +1111,28 @@ main(int argc, char** argv)
|
|||
}
|
||||
delete aps;
|
||||
|
||||
spot::ta* testing_automata = sba_to_ta(degeneralized, atomic_props_set_bdd);
|
||||
spot::ta* testing_automata = sba_to_ta(degeneralized, atomic_props_set_bdd, opt_with_artificial_initial_state, opt_with_artificial_livelock);
|
||||
if (opt_minimize) testing_automata = minimize_ta(testing_automata);
|
||||
spot::dotty_reachable(std::cout, testing_automata);
|
||||
delete testing_automata;
|
||||
|
||||
if (output != -1)
|
||||
{
|
||||
tm.start("producing output");
|
||||
switch (output)
|
||||
{
|
||||
case 0:
|
||||
spot::dotty_reachable(std::cout, testing_automata);
|
||||
break;
|
||||
case 12:
|
||||
stats_reachable(testing_automata).dump(std::cout);
|
||||
break;
|
||||
default:
|
||||
assert(!"unknown output option");
|
||||
}
|
||||
tm.stop("producing output");
|
||||
}
|
||||
delete testing_automata;
|
||||
output = -1;
|
||||
|
||||
}
|
||||
|
||||
spot::tgba* product_degeneralized = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue