Preliminary implementation of Testing Automata.
* configure.ac: Generate src/ta/Makefile and src/taalgos/Makefile. * src/Makefile.am (SUBDIRS): Add them. * src/tgbatest/ltl2tgba.cc (main): Add option -TA. * src/ta/Makefile.am, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/taalgos/Makefile.am, src/taalgos/dotty.cc, src/taalgos/dotty.hh, src/taalgos/reachiter.cc, src/taalgos/reachiter.hh, src/taalgos/sba2ta.cc, src/taalgos/sba2ta.hh: New files.
This commit is contained in:
parent
c373a2f35e
commit
ba47b821c6
14 changed files with 1738 additions and 8 deletions
|
|
@ -65,6 +65,9 @@
|
|||
#include "kripkeparse/public.hh"
|
||||
#include "tgbaalgos/simulation.hh"
|
||||
|
||||
#include "taalgos/sba2ta.hh"
|
||||
#include "taalgos/dotty.hh"
|
||||
|
||||
std::string
|
||||
ltl_defs()
|
||||
{
|
||||
|
|
@ -273,7 +276,13 @@ syntax(char* prog)
|
|||
<< " -T time the different phases of the translation"
|
||||
<< std::endl
|
||||
<< " -v display the BDD variables used by the automaton"
|
||||
<< std::endl;
|
||||
<< std::endl
|
||||
|
||||
<< "Options for Testing Automata:"
|
||||
<< std::endl
|
||||
<< " -TA Translate an LTL formula into a Testing automata"
|
||||
<< std::endl;
|
||||
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
|
@ -332,7 +341,7 @@ main(int argc, char** argv)
|
|||
bool assume_sba = false;
|
||||
bool reduction_dir_sim = false;
|
||||
spot::tgba* temp_dir_sim = 0;
|
||||
|
||||
bool ta_opt = false;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
@ -660,6 +669,10 @@ main(int argc, char** argv)
|
|||
{
|
||||
use_timer = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-TA"))
|
||||
{
|
||||
ta_opt = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-taa"))
|
||||
{
|
||||
translation = TransTAA;
|
||||
|
|
@ -1047,8 +1060,39 @@ main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
const spot::tgba* product_degeneralized = 0;
|
||||
|
||||
if (ta_opt)
|
||||
{
|
||||
spot::tgba_sba_proxy* degeneralized_new = 0;
|
||||
spot::tgba_sba_proxy* degeneralized =
|
||||
dynamic_cast<spot::tgba_sba_proxy*> (a);
|
||||
if (degeneralized == 0)
|
||||
degeneralized_new = degeneralized = new spot::tgba_sba_proxy(a);
|
||||
|
||||
spot::ltl::atomic_prop_set* aps = atomic_prop_collect(f, 0);
|
||||
|
||||
bdd atomic_props_set_bdd = bdd_true();
|
||||
for (spot::ltl::atomic_prop_set::const_iterator i = aps->begin(); i
|
||||
!= aps->end(); ++i)
|
||||
{
|
||||
bdd atomic_prop = bdd_ithvar(
|
||||
(degeneralized->get_dict())->var_map[*i]);
|
||||
|
||||
atomic_props_set_bdd &= atomic_prop;
|
||||
|
||||
}
|
||||
delete aps;
|
||||
|
||||
spot::ta* testing_automata = sba_to_ta(degeneralized, atomic_props_set_bdd);
|
||||
spot::dotty_reachable(std::cout, testing_automata);
|
||||
delete testing_automata;
|
||||
delete degeneralized_new;
|
||||
output = -1;
|
||||
}
|
||||
|
||||
|
||||
if (system)
|
||||
{
|
||||
product = product_to_free = a = new spot::tgba_product(system, a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue