Small fixes.
* src/tgbatest/minimize.cc: Delete useless includes. * src/tgbaalgos/minimize.cc: Delete useless includes, fixed acceptance conditions. * src/tgbatest/ltl2tgba.cc: Add -Rm option for minimization. * src/tgba/tgbaexplicit.cc: Fixed typo.
This commit is contained in:
parent
fac30eb08e
commit
52090e4875
5 changed files with 74 additions and 35 deletions
|
|
@ -47,6 +47,7 @@
|
|||
#include "tgbaparse/public.hh"
|
||||
#include "neverparse/public.hh"
|
||||
#include "tgbaalgos/dupexp.hh"
|
||||
#include "tgbaalgos/minimize.hh"
|
||||
#include "tgbaalgos/neverclaim.hh"
|
||||
#include "tgbaalgos/reductgba_sim.hh"
|
||||
#include "tgbaalgos/replayrun.hh"
|
||||
|
|
@ -207,6 +208,7 @@ syntax(char* prog)
|
|||
<< std::endl
|
||||
<< " -Rd display the simulation relation" << std::endl
|
||||
<< " -RD display the parity game (dot format)" << std::endl
|
||||
<< " -Rm attempt to minimize the automata" << std::endl
|
||||
<< std::endl
|
||||
|
||||
<< "Options for performing emptiness checks:" << std::endl
|
||||
|
|
@ -309,6 +311,7 @@ main(int argc, char** argv)
|
|||
bool graph_run_opt = false;
|
||||
bool graph_run_tgba_opt = false;
|
||||
bool opt_reduce = false;
|
||||
bool opt_minimize = false;
|
||||
bool containment = false;
|
||||
bool show_fc = false;
|
||||
bool spin_comments = false;
|
||||
|
|
@ -617,6 +620,10 @@ main(int argc, char** argv)
|
|||
{
|
||||
display_parity_game = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-Rm"))
|
||||
{
|
||||
opt_minimize = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-s"))
|
||||
{
|
||||
dupexp = DFS;
|
||||
|
|
@ -891,6 +898,10 @@ main(int argc, char** argv)
|
|||
a = state_labeled = new spot::tgba_sgba_proxy(a);
|
||||
}
|
||||
|
||||
spot::tgba_explicit* minimized = 0;
|
||||
if (opt_minimize)
|
||||
a = minimized = minimize(a);
|
||||
|
||||
spot::tgba_reduc* aut_red = 0;
|
||||
if (reduc_aut != spot::Reduce_None)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,20 +19,14 @@
|
|||
// 02111-1307, USA.
|
||||
|
||||
#include <queue>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
#include <cstring>
|
||||
#include "ltlast/unop.hh"
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
#include "tgbaalgos/prettydotdec.hh"
|
||||
#include "tgbaalgos/rundotdec.hh"
|
||||
#include "tgbaalgos/minimize.hh"
|
||||
#include "tgbaalgos/powerset.hh"
|
||||
#include "tgbaalgos/scc.hh"
|
||||
#include "ltlparse/public.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "tgba/tgbaexplicit.hh"
|
||||
#include "ltlparse/ltlfile.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "tgbaalgos/ltl2tgba_fm.hh"
|
||||
|
||||
namespace spot
|
||||
|
|
@ -115,12 +109,14 @@ int main(int argc, char* argv[])
|
|||
spot::ltl::parse_error_list pel;
|
||||
spot::ltl::formula* f = spot::ltl::parse(argv[2], pel);
|
||||
spot::tgba_explicit* a = ltl_to_tgba_fm(f, dict, true);
|
||||
spot::tgba_explicit* det = spot::tgba_powerset(a);
|
||||
// spot::tgba_explicit* det = spot::tgba_powerset(a);
|
||||
spot::tgba_explicit* res = minimize(a);
|
||||
compare_automata(a, res);
|
||||
spot::dotty_reachable(out_dot, det);
|
||||
spot::dotty_reachable(out_dot, res);
|
||||
// delete det;
|
||||
delete a;
|
||||
delete res;
|
||||
f->destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -129,13 +125,17 @@ int main(int argc, char* argv[])
|
|||
spot::ltl::formula* f;
|
||||
while ((f = formulae.next()))
|
||||
{
|
||||
spot::ltl::formula* f_neg = spot::ltl::unop::instance(spot::ltl::unop::Not,
|
||||
f->clone());
|
||||
spot::ltl::formula* f_neg =
|
||||
spot::ltl::unop::instance(spot::ltl::unop::Not,
|
||||
f->clone());
|
||||
spot::tgba_explicit* a = ltl_to_tgba_fm(f_neg, dict, true);
|
||||
spot::tgba_explicit* res = minimize(a);
|
||||
compare_automata(a, res);
|
||||
delete a;
|
||||
delete res;
|
||||
f->destroy();
|
||||
f_neg->destroy();
|
||||
}
|
||||
}
|
||||
delete dict;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue