* src/ltltest/Makefile.am (AM_CXXFLAGS): New variable.
* tgba/bdddict.hh (bdd_dict::register_propositions, bdd_dict::register_accepting_variables): New methods. * src/bdddict.cc: Likewise. * tgba/tgbaexplicit.cc (tgba_explicit::add_conditions, tgba_explicit::add_accepting_conditions): New methods. (tgba_explicit::get_init_state): Add an "empty" initial state to empty automata. * tgba/tgbaexplicit.hh: (tgba_explicit::add_conditions, tgba_explicit::add_accepting_conditions): New methods. * tgbaalgos/Makefiles.am (tgbaalgos_HEADERS, libtgbaalgos_la_SOURCES): Add dupexp.hh and dupexp.cc. * tgbaalgos/dupexp.hh, tgbaalgos/dupexp.cc: New files. * tgbatest/Makefile.am (AM_CXXFLAGS): New variable. (check_SCRIPTS): Add dupexp.test. (CLEANFILES): Add output1 and output2. * tgbatest/dupexp.test: New file. * tgbatest/ltl2tgba.cc: Handle -s and -S. * tgbatest/tgbaread.cc: Remove unused variable exit_code.
This commit is contained in:
parent
51ff9f8dda
commit
982c5efc6c
13 changed files with 271 additions and 8 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "tgbaalgos/magic.hh"
|
||||
#include "tgbaalgos/emptinesscheck.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "tgbaalgos/dupexp.hh"
|
||||
|
||||
void
|
||||
syntax(char* prog)
|
||||
|
|
@ -45,6 +46,10 @@ syntax(char* prog)
|
|||
<< " -r display the relation BDD, not the reachability graph"
|
||||
<< std::endl
|
||||
<< " -R same as -r, but as a set" << std::endl
|
||||
<< " -s convert to explicit automata, and number states "
|
||||
<< "in DFS order" << std::endl
|
||||
<< " -S convert to explicit automata, and number states "
|
||||
<< "in BFS order" << std::endl
|
||||
<< " -t display reachable states in LBTT's format" << std::endl
|
||||
<< " -v display the BDD variables used by the automaton"
|
||||
<< std::endl
|
||||
|
|
@ -65,6 +70,7 @@ main(int argc, char** argv)
|
|||
int output = 0;
|
||||
int formula_index = 0;
|
||||
enum { None, Couvreur, MagicSearch } echeck = None;
|
||||
enum { NoneDup, BFS, DFS } dupexp = NoneDup;
|
||||
bool magic_many = false;
|
||||
bool expect_counter_example = false;
|
||||
bool from_file = false;
|
||||
|
|
@ -142,6 +148,14 @@ main(int argc, char** argv)
|
|||
{
|
||||
output = 3;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-s"))
|
||||
{
|
||||
dupexp = DFS;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-S"))
|
||||
{
|
||||
dupexp = BFS;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-t"))
|
||||
{
|
||||
output = 6;
|
||||
|
|
@ -218,6 +232,19 @@ main(int argc, char** argv)
|
|||
if (degeneralize_opt)
|
||||
a = degeneralized = new spot::tgba_tba_proxy(a);
|
||||
|
||||
spot::tgba_explicit* expl = 0;
|
||||
switch (dupexp)
|
||||
{
|
||||
case NoneDup:
|
||||
break;
|
||||
case BFS:
|
||||
a = expl = tgba_dupexp_bfs(a);
|
||||
break;
|
||||
case DFS:
|
||||
a = expl = tgba_dupexp_dfs(a);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case -1:
|
||||
|
|
@ -305,6 +332,8 @@ main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
|
||||
if (expl)
|
||||
delete expl;
|
||||
if (degeneralize_opt)
|
||||
delete degeneralized;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue