kill the ltl namespace
* NEWS: Mention it. * bench/stutter/stutter_invariance_formulas.cc, bench/stutter/stutter_invariance_randomgraph.cc, doc/mainpage.dox, doc/org/tut01.org, doc/org/tut02.org, doc/org/tut10.org, doc/tl/tl.tex, iface/ltsmin/ltsmin.cc, iface/ltsmin/ltsmin.hh, iface/ltsmin/modelcheck.cc, src/bin/autfilt.cc, src/bin/common_aoutput.cc, src/bin/common_aoutput.hh, src/bin/common_finput.cc, src/bin/common_finput.hh, src/bin/common_output.cc, src/bin/common_output.hh, src/bin/common_r.hh, src/bin/common_trans.cc, src/bin/common_trans.hh, src/bin/dstar2tgba.cc, src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc, src/bin/ltlgrind.cc, src/bin/randaut.cc, src/bin/randltl.cc, src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh, src/kripkeparse/kripkeparse.yy, src/kripkeparse/public.hh, src/ltlparse/fmterror.cc, src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll, src/ltlparse/parsedecl.hh, src/ltlparse/public.hh, src/parseaut/parseaut.yy, src/parseaut/public.hh, src/tests/checkpsl.cc, src/tests/checkta.cc, src/tests/complementation.cc, src/tests/consterm.cc, src/tests/emptchk.cc, src/tests/equalsf.cc, src/tests/ikwiad.cc, src/tests/kind.cc, src/tests/length.cc, src/tests/ltlprod.cc, src/tests/ltlrel.cc, src/tests/parse.test, src/tests/parse_print_test.cc, src/tests/randtgba.cc, src/tests/readltl.cc, src/tests/reduc.cc, src/tests/syntimpl.cc, src/tests/taatgba.cc, src/tests/tostring.cc, src/tests/tostring.test, src/tl/apcollect.cc, src/tl/apcollect.hh, src/tl/contain.cc, src/tl/contain.hh, src/tl/declenv.cc, src/tl/declenv.hh, src/tl/defaultenv.cc, src/tl/defaultenv.hh, src/tl/dot.cc, src/tl/dot.hh, src/tl/environment.hh, src/tl/exclusive.cc, src/tl/exclusive.hh, src/tl/formula.cc, src/tl/formula.hh, src/tl/length.cc, src/tl/length.hh, src/tl/mark.cc, src/tl/mark.hh, src/tl/mutation.cc, src/tl/mutation.hh, src/tl/nenoform.cc, src/tl/nenoform.hh, src/tl/print.cc, src/tl/print.hh, src/tl/randomltl.cc, src/tl/randomltl.hh, src/tl/relabel.cc, src/tl/relabel.hh, src/tl/remove_x.cc, src/tl/remove_x.hh, src/tl/simpfg.cc, src/tl/simpfg.hh, src/tl/simplify.cc, src/tl/simplify.hh, src/tl/snf.cc, src/tl/snf.hh, src/tl/unabbrev.cc, src/tl/unabbrev.hh, src/twa/bdddict.cc, src/twa/bdddict.hh, src/twa/bddprint.cc, src/twa/formula2bdd.cc, src/twa/formula2bdd.hh, src/twa/taatgba.cc, src/twa/taatgba.hh, src/twa/twa.hh, src/twa/twagraph.cc, src/twa/twagraph.hh, src/twaalgos/compsusp.cc, src/twaalgos/compsusp.hh, src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2taa.hh, src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/minimize.cc, src/twaalgos/minimize.hh, src/twaalgos/neverclaim.cc, src/twaalgos/postproc.cc, src/twaalgos/postproc.hh, src/twaalgos/powerset.cc, src/twaalgos/powerset.hh, src/twaalgos/randomgraph.cc, src/twaalgos/randomgraph.hh, src/twaalgos/relabel.cc, src/twaalgos/relabel.hh, src/twaalgos/remprop.cc, src/twaalgos/remprop.hh, src/twaalgos/stats.cc, src/twaalgos/stats.hh, src/twaalgos/stutter.cc, src/twaalgos/stutter.hh, src/twaalgos/translate.cc, src/twaalgos/translate.hh, wrap/python/spot_impl.i: Remove the ltl namespace.
This commit is contained in:
parent
6ded5e75c4
commit
cb39210166
137 changed files with 10771 additions and 10919 deletions
|
|
@ -60,13 +60,13 @@ main(int argc, char** argv)
|
|||
if (s.empty() || s[0] == '#') // Skip comments
|
||||
continue;
|
||||
|
||||
spot::ltl::parse_error_list pe;
|
||||
auto fpos = spot::ltl::parse_infix_psl(s, pe);
|
||||
spot::parse_error_list pe;
|
||||
auto fpos = spot::parse_infix_psl(s, pe);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, s, pe))
|
||||
if (spot::format_parse_errors(std::cerr, s, pe))
|
||||
return 2;
|
||||
|
||||
auto fneg = spot::ltl::formula::Not(fpos);
|
||||
auto fneg = spot::formula::Not(fpos);
|
||||
|
||||
{
|
||||
auto apos = scc_filter(ltl_to_tgba_fm(fpos, d));
|
||||
|
|
@ -104,6 +104,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ main(int argc, char** argv)
|
|||
if (s.empty() || s[0] == '#') // Skip comments
|
||||
continue;
|
||||
|
||||
spot::ltl::parse_error_list pe;
|
||||
auto f = spot::ltl::parse_infix_psl(s, pe);
|
||||
spot::parse_error_list pe;
|
||||
auto f = spot::parse_infix_psl(s, pe);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, s, pe))
|
||||
if (spot::format_parse_errors(std::cerr, s, pe))
|
||||
return 2;
|
||||
|
||||
|
||||
|
|
@ -220,6 +220,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ int main(int argc, char* argv[])
|
|||
auto dict = spot::make_bdd_dict();
|
||||
if (print_automaton || print_safra)
|
||||
{
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::environment& env(spot::default_environment::instance());
|
||||
spot::parse_aut_error_list pel;
|
||||
auto h = spot::parse_aut(file, pel, dict, env);
|
||||
if (spot::format_parse_aut_errors(std::cerr, file, pel))
|
||||
|
|
@ -147,10 +147,10 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
else if (print_formula)
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(file, p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(file, p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
|
||||
if (spot::format_parse_errors(std::cerr, file, p1))
|
||||
return 2;
|
||||
|
||||
auto a = spot::ltl_to_tgba_fm(f1, dict);
|
||||
|
|
@ -162,14 +162,14 @@ int main(int argc, char* argv[])
|
|||
else if (stats)
|
||||
{
|
||||
spot::twa_graph_ptr a;
|
||||
spot::ltl::formula f1 = nullptr;
|
||||
spot::formula f1 = nullptr;
|
||||
|
||||
if (formula)
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
f1 = spot::ltl::parse_infix_psl(file, p1);
|
||||
spot::parse_error_list p1;
|
||||
f1 = spot::parse_infix_psl(file, p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
|
||||
if (spot::format_parse_errors(std::cerr, file, p1))
|
||||
return 2;
|
||||
|
||||
a = spot::ltl_to_tgba_fm(f1, dict);
|
||||
|
|
@ -177,7 +177,7 @@ int main(int argc, char* argv[])
|
|||
else
|
||||
{
|
||||
spot::parse_aut_error_list pel;
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::environment& env(spot::default_environment::instance());
|
||||
auto h = spot::parse_aut(file, pel, dict, env);
|
||||
if (spot::format_parse_aut_errors(std::cerr, file, pel))
|
||||
return 2;
|
||||
|
|
@ -209,7 +209,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
if (formula)
|
||||
{
|
||||
auto a2 = spot::ltl_to_tgba_fm(spot::ltl::formula::Not(f1), dict);
|
||||
auto a2 = spot::ltl_to_tgba_fm(spot::formula::Not(f1), dict);
|
||||
spot::tgba_statistics a_size = spot::stats_reachable(a2);
|
||||
std::cout << "Not Formula: "
|
||||
<< a_size.states << ", "
|
||||
|
|
@ -220,14 +220,14 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(file, p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(file, p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
|
||||
if (spot::format_parse_errors(std::cerr, file, p1))
|
||||
return 2;
|
||||
|
||||
auto Af = spot::ltl_to_tgba_fm(f1, dict);
|
||||
auto nf1 = spot::ltl::formula::Not(f1);
|
||||
auto nf1 = spot::formula::Not(f1);
|
||||
auto Anf = spot::ltl_to_tgba_fm(nf1, dict);
|
||||
auto nAf = spot::make_safra_complement(Af);
|
||||
auto nAnf = spot::make_safra_complement(Anf);
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ main(int argc, char **argv)
|
|||
std::getline(ss, form, ',');
|
||||
ss >> expected;
|
||||
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_sere(form, p1);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, form, p1))
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_sere(form, p1);
|
||||
if (spot::format_parse_errors(std::cerr, form, p1))
|
||||
return 2;
|
||||
|
||||
bool b = f1.accepts_eword();
|
||||
|
|
@ -73,6 +73,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ main(int argc, char** argv)
|
|||
|
||||
int runs = atoi(tokens[0].c_str());
|
||||
|
||||
spot::ltl::parse_error_list pe;
|
||||
auto f = spot::ltl::parse_infix_psl(tokens[1], pe);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, tokens[1], pe))
|
||||
spot::parse_error_list pe;
|
||||
auto f = spot::parse_infix_psl(tokens[1], pe);
|
||||
if (spot::format_parse_errors(std::cerr, tokens[1], pe))
|
||||
return 2;
|
||||
|
||||
auto d = spot::make_bdd_dict();
|
||||
|
|
@ -199,6 +199,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,47 +95,47 @@ main(int argc, char** argv)
|
|||
return 2;
|
||||
}
|
||||
|
||||
spot::ltl::parse_error_list p2;
|
||||
auto f2 = spot::ltl::parse_infix_psl(formulas[size - 1], p2);
|
||||
spot::parse_error_list p2;
|
||||
auto f2 = spot::parse_infix_psl(formulas[size - 1], p2);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, formulas[size - 1], p2))
|
||||
if (spot::format_parse_errors(std::cerr, formulas[size - 1], p2))
|
||||
return 2;
|
||||
|
||||
for (unsigned n = 0; n < size - 1; ++n)
|
||||
{
|
||||
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(formulas[n], p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(formulas[n], p1);
|
||||
|
||||
if (check_first &&
|
||||
spot::ltl::format_parse_errors(std::cerr, formulas[n], p1))
|
||||
spot::format_parse_errors(std::cerr, formulas[n], p1))
|
||||
return 2;
|
||||
|
||||
int exit_code = 0;
|
||||
|
||||
{
|
||||
#if defined UNABBREV || defined NENOFORM
|
||||
spot::ltl::formula tmp;
|
||||
spot::formula tmp;
|
||||
#endif
|
||||
#ifdef UNABBREV
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::unabbreviate(f1, UNABBREV);
|
||||
f1 = spot::unabbreviate(f1, UNABBREV);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef NENOFORM
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::negative_normal_form(f1);
|
||||
f1 = spot::negative_normal_form(f1);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC
|
||||
spot::ltl::ltl_simplifier_options opt(true, true, true,
|
||||
spot::ltl_simplifier_options opt(true, true, true,
|
||||
false, false);
|
||||
# ifdef EVENT_UNIV
|
||||
opt.favor_event_univ = true;
|
||||
# endif
|
||||
spot::ltl::ltl_simplifier simp(opt);
|
||||
spot::ltl_simplifier simp(opt);
|
||||
{
|
||||
spot::ltl::formula tmp;
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
|
|
@ -143,18 +143,18 @@ main(int argc, char** argv)
|
|||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::ltl::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC_TAU
|
||||
spot::ltl::ltl_simplifier_options opt(false, false, false,
|
||||
spot::ltl_simplifier_options opt(false, false, false,
|
||||
true, false);
|
||||
spot::ltl::ltl_simplifier simp(opt);
|
||||
spot::ltl_simplifier simp(opt);
|
||||
{
|
||||
spot::ltl::formula tmp;
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
|
|
@ -162,18 +162,18 @@ main(int argc, char** argv)
|
|||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::ltl::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC_TAUSTR
|
||||
spot::ltl::ltl_simplifier_options opt(false, false, false,
|
||||
spot::ltl_simplifier_options opt(false, false, false,
|
||||
true, true);
|
||||
spot::ltl::ltl_simplifier simp(opt);
|
||||
spot::ltl_simplifier simp(opt);
|
||||
{
|
||||
spot::ltl::formula tmp;
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::ltl::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ main(int argc, char** argv)
|
|||
exit_code |= f1 != f2;
|
||||
|
||||
#if (!defined(REDUC) && !defined(REDUC_TAU) && !defined(REDUC_TAUSTR))
|
||||
spot::ltl::ltl_simplifier simp;
|
||||
spot::ltl_simplifier simp;
|
||||
#endif
|
||||
|
||||
if (!simp.are_equivalent(f1, f2))
|
||||
|
|
@ -215,6 +215,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ checked_main(int argc, char** argv)
|
|||
bool nra2nba = false;
|
||||
bool scc_filter = false;
|
||||
bool simpltl = false;
|
||||
spot::ltl::ltl_simplifier_options redopt(false, false, false, false,
|
||||
spot::ltl_simplifier_options redopt(false, false, false, false,
|
||||
false, false, false);
|
||||
bool simpcache_stats = false;
|
||||
bool scc_filter_all = false;
|
||||
|
|
@ -363,8 +363,8 @@ checked_main(int argc, char** argv)
|
|||
bool opt_stutterize = false;
|
||||
const char* opt_never = nullptr;
|
||||
const char* hoa_opt = nullptr;
|
||||
auto& env = spot::ltl::default_environment::instance();
|
||||
spot::ltl::atomic_prop_set* unobservables = nullptr;
|
||||
auto& env = spot::default_environment::instance();
|
||||
spot::atomic_prop_set* unobservables = nullptr;
|
||||
spot::twa_ptr system_aut = nullptr;
|
||||
auto dict = spot::make_bdd_dict();
|
||||
spot::timer_map tm;
|
||||
|
|
@ -790,7 +790,7 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
else if (!strncmp(argv[formula_index], "-U", 2))
|
||||
{
|
||||
unobservables = new spot::ltl::atomic_prop_set;
|
||||
unobservables = new spot::atomic_prop_set;
|
||||
translation = TransFM;
|
||||
// Parse -U's argument.
|
||||
const char* tok = strtok(argv[formula_index] + 2, ", \t;");
|
||||
|
|
@ -923,7 +923,7 @@ checked_main(int argc, char** argv)
|
|||
input = argv[formula_index];
|
||||
}
|
||||
|
||||
spot::ltl::formula f = nullptr;
|
||||
spot::formula f = nullptr;
|
||||
if (!from_file) // Reading a formula, not reading an automaton from a file.
|
||||
{
|
||||
switch (translation)
|
||||
|
|
@ -932,11 +932,11 @@ checked_main(int argc, char** argv)
|
|||
case TransTAA:
|
||||
case TransCompo:
|
||||
{
|
||||
spot::ltl::parse_error_list pel;
|
||||
spot::parse_error_list pel;
|
||||
tm.start("parsing formula");
|
||||
f = spot::ltl::parse_infix_psl(input, pel, env, debug_opt);
|
||||
f = spot::parse_infix_psl(input, pel, env, debug_opt);
|
||||
tm.stop("parsing formula");
|
||||
exit_code = spot::ltl::format_parse_errors(std::cerr, input, pel);
|
||||
exit_code = spot::format_parse_errors(std::cerr, input, pel);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -964,14 +964,14 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
spot::ltl::ltl_simplifier* simp = nullptr;
|
||||
spot::ltl_simplifier* simp = nullptr;
|
||||
if (simpltl)
|
||||
simp = new spot::ltl::ltl_simplifier(redopt, dict);
|
||||
simp = new spot::ltl_simplifier(redopt, dict);
|
||||
|
||||
if (simp)
|
||||
{
|
||||
tm.start("reducing formula");
|
||||
spot::ltl::formula t = simp->simplify(f);
|
||||
spot::formula t = simp->simplify(f);
|
||||
tm.stop("reducing formula");
|
||||
f = t;
|
||||
if (display_reduced_form)
|
||||
|
|
@ -1659,6 +1659,6 @@ int
|
|||
main(int argc, char** argv)
|
||||
{
|
||||
int exit_code = checked_main(argc, argv);
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return exit_code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ main(int argc, char **argv)
|
|||
std::getline(ss, form, ',');
|
||||
std::getline(ss, expected);
|
||||
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(form, p1);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, form, p1))
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(form, p1);
|
||||
if (spot::format_parse_errors(std::cerr, form, p1))
|
||||
return 2;
|
||||
|
||||
std::ostringstream so;
|
||||
spot::ltl::print_formula_props(so, f1, true);
|
||||
spot::print_formula_props(so, f1, true);
|
||||
auto sost = so.str();
|
||||
std::cout << form << ',' << sost << '\n';
|
||||
if (sost != expected)
|
||||
|
|
@ -74,6 +74,6 @@ main(int argc, char **argv)
|
|||
return 2;
|
||||
}
|
||||
}
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,18 +45,18 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(argv[1], p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(argv[1], p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
|
||||
if (spot::format_parse_errors(std::cerr, argv[1], p1))
|
||||
return 2;
|
||||
|
||||
if (boolone)
|
||||
std::cout << spot::ltl::length_boolone(f1) << std::endl;
|
||||
std::cout << spot::length_boolone(f1) << std::endl;
|
||||
else
|
||||
std::cout << spot::ltl::length(f1) << std::endl;
|
||||
std::cout << spot::length(f1) << std::endl;
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,18 +44,18 @@ main(int argc, char** argv)
|
|||
syntax(argv[0]);
|
||||
|
||||
{
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::environment& env(spot::default_environment::instance());
|
||||
|
||||
spot::ltl::parse_error_list pel1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(argv[1], pel1, env);
|
||||
spot::parse_error_list pel1;
|
||||
auto f1 = spot::parse_infix_psl(argv[1], pel1, env);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[1], pel1))
|
||||
if (spot::format_parse_errors(std::cerr, argv[1], pel1))
|
||||
return 2;
|
||||
|
||||
spot::ltl::parse_error_list pel2;
|
||||
auto f2 = spot::ltl::parse_infix_psl(argv[2], pel2, env);
|
||||
spot::parse_error_list pel2;
|
||||
auto f2 = spot::parse_infix_psl(argv[2], pel2, env);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[2], pel2))
|
||||
if (spot::format_parse_errors(std::cerr, argv[2], pel2))
|
||||
return 2;
|
||||
|
||||
auto dict = spot::make_bdd_dict();
|
||||
|
|
@ -65,6 +65,6 @@ main(int argc, char** argv)
|
|||
spot::print_dot(std::cout, product(a1, a2));
|
||||
}
|
||||
}
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return exit_code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,29 +38,29 @@ main(int argc, char **argv)
|
|||
syntax(argv[0]);
|
||||
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(argv[1], p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(argv[1], p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
|
||||
if (spot::format_parse_errors(std::cerr, argv[1], p1))
|
||||
return 2;
|
||||
|
||||
spot::ltl::relabeling_map* m = new spot::ltl::relabeling_map;
|
||||
auto f2 = spot::ltl::relabel_bse(f1, spot::ltl::Pnn, m);
|
||||
spot::ltl::print_psl(std::cout, f2) << '\n';
|
||||
spot::relabeling_map* m = new spot::relabeling_map;
|
||||
auto f2 = spot::relabel_bse(f1, spot::Pnn, m);
|
||||
spot::print_psl(std::cout, f2) << '\n';
|
||||
|
||||
|
||||
typedef std::map<std::string, std::string> map_t;
|
||||
map_t sorted_map;
|
||||
for (spot::ltl::relabeling_map::const_iterator i = m->begin();
|
||||
for (spot::relabeling_map::const_iterator i = m->begin();
|
||||
i != m->end(); ++i)
|
||||
sorted_map[spot::ltl::str_psl(i->first)] =
|
||||
spot::ltl::str_psl(i->second);
|
||||
sorted_map[spot::str_psl(i->first)] =
|
||||
spot::str_psl(i->second);
|
||||
for (map_t::const_iterator i = sorted_map.begin();
|
||||
i != sorted_map.end(); ++i)
|
||||
std::cout << " " << i->first << " -> "
|
||||
<< i->second << '\n';
|
||||
delete m;
|
||||
}
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Check that spot::ltl::parse succeed on valid input, and that
|
||||
# Check that spot::parse succeed on valid input, and that
|
||||
# dump and dotty will work with the resulting trees. Note that
|
||||
# this doesn't check that the tree is correct w.r.t. the formula.
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,6 @@ int main(int argc, char** argv)
|
|||
kripke_save_reachable(std::cout, k);
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return return_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -486,9 +486,9 @@ print_ar_stats(ar_stats_type& ar_stats, const std::string& s)
|
|||
std::cout << std::setiosflags(old);
|
||||
}
|
||||
|
||||
spot::ltl::formula
|
||||
generate_formula(const spot::ltl::random_ltl& rl,
|
||||
spot::ltl::ltl_simplifier& simp,
|
||||
spot::formula
|
||||
generate_formula(const spot::random_ltl& rl,
|
||||
spot::ltl_simplifier& simp,
|
||||
int opt_f, int opt_s,
|
||||
int opt_l = 0, bool opt_u = false)
|
||||
{
|
||||
|
|
@ -498,7 +498,7 @@ generate_formula(const spot::ltl::random_ltl& rl,
|
|||
while (max_tries_u--)
|
||||
{
|
||||
spot::srand(opt_s++);
|
||||
spot::ltl::formula f;
|
||||
spot::formula f;
|
||||
int max_tries_l = 1000;
|
||||
while (max_tries_l--)
|
||||
{
|
||||
|
|
@ -506,12 +506,12 @@ generate_formula(const spot::ltl::random_ltl& rl,
|
|||
if (opt_l)
|
||||
{
|
||||
f = simp.simplify(f);
|
||||
if (spot::ltl::length(f) < opt_l)
|
||||
if (spot::length(f) < opt_l)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(spot::ltl::length(f) <= opt_f);
|
||||
assert(spot::length(f) <= opt_f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -522,7 +522,7 @@ generate_formula(const spot::ltl::random_ltl& rl,
|
|||
<< "of size " << opt_l << " or more." << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
std::string txt = spot::ltl::str_psl(f);
|
||||
std::string txt = spot::str_psl(f);
|
||||
if (!opt_u || unique.insert(txt).second)
|
||||
return f;
|
||||
}
|
||||
|
|
@ -576,12 +576,12 @@ main(int argc, char** argv)
|
|||
|
||||
spot::option_map options;
|
||||
|
||||
auto& env = spot::ltl::default_environment::instance();
|
||||
spot::ltl::atomic_prop_set* ap = new spot::ltl::atomic_prop_set;
|
||||
auto& env = spot::default_environment::instance();
|
||||
spot::atomic_prop_set* ap = new spot::atomic_prop_set;
|
||||
auto dict = spot::make_bdd_dict();
|
||||
|
||||
spot::ltl::ltl_simplifier_options simpopt(true, true, true, true, true);
|
||||
spot::ltl::ltl_simplifier simp(simpopt);
|
||||
spot::ltl_simplifier_options simpopt(true, true, true, true, true);
|
||||
spot::ltl_simplifier simp(simpopt);
|
||||
|
||||
if (argc <= 1)
|
||||
syntax(argv[0]);
|
||||
|
|
@ -788,7 +788,7 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
spot::ltl::random_ltl rl(ap);
|
||||
spot::random_ltl rl(ap);
|
||||
const char* tok = rl.parse_options(opt_p);
|
||||
if (tok)
|
||||
{
|
||||
|
|
@ -824,7 +824,7 @@ main(int argc, char** argv)
|
|||
spot::timer_map tm_ar;
|
||||
std::set<int> failed_seeds;
|
||||
int init_opt_ec = opt_ec;
|
||||
spot::ltl::atomic_prop_set* apf = new spot::ltl::atomic_prop_set;
|
||||
spot::atomic_prop_set* apf = new spot::atomic_prop_set;
|
||||
|
||||
if (opt_ec)
|
||||
{
|
||||
|
|
@ -847,7 +847,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
if (opt_F)
|
||||
{
|
||||
spot::ltl::formula f =
|
||||
spot::formula f =
|
||||
generate_formula(rl, simp, opt_f, opt_ec_seed, opt_l, opt_u);
|
||||
if (!f)
|
||||
exit(1);
|
||||
|
|
@ -862,15 +862,15 @@ main(int argc, char** argv)
|
|||
break;
|
||||
else if (input == "")
|
||||
break;
|
||||
spot::ltl::parse_error_list pel;
|
||||
auto f = spot::ltl::parse_infix_psl(input, pel, env);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, input, pel))
|
||||
spot::parse_error_list pel;
|
||||
auto f = spot::parse_infix_psl(input, pel, env);
|
||||
if (spot::format_parse_errors(std::cerr, input, pel))
|
||||
{
|
||||
exit_code = 1;
|
||||
break;
|
||||
}
|
||||
formula = spot::ltl_to_tgba_fm(f, dict, true);
|
||||
auto* tmp = spot::ltl::atomic_prop_collect(f);
|
||||
auto* tmp = spot::atomic_prop_collect(f);
|
||||
for (auto i: *tmp)
|
||||
apf->insert(i);
|
||||
delete tmp;
|
||||
|
|
|
|||
|
|
@ -54,18 +54,18 @@ main(int argc, char** argv)
|
|||
}
|
||||
|
||||
{
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::ltl::parse_error_list pel;
|
||||
auto f = spot::ltl::parse_infix_psl(argv[formula_index], pel, env, debug);
|
||||
spot::environment& env(spot::default_environment::instance());
|
||||
spot::parse_error_list pel;
|
||||
auto f = spot::parse_infix_psl(argv[formula_index], pel, env, debug);
|
||||
|
||||
exit_code =
|
||||
spot::ltl::format_parse_errors(std::cerr, argv[formula_index], pel);
|
||||
spot::format_parse_errors(std::cerr, argv[formula_index], pel);
|
||||
|
||||
|
||||
if (f)
|
||||
{
|
||||
#ifdef DOTTY
|
||||
spot::ltl::print_dot_psl(std::cout, f);
|
||||
spot::print_dot_psl(std::cout, f);
|
||||
#else
|
||||
f.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
|
|
@ -76,6 +76,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
|
||||
}
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return exit_code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ main(int argc, char** argv)
|
|||
bool hidereduc = false;
|
||||
unsigned long sum_before = 0;
|
||||
unsigned long sum_after = 0;
|
||||
spot::ltl::ltl_simplifier_options o(false, false, false, false, false);
|
||||
spot::ltl_simplifier_options o(false, false, false, false, false);
|
||||
|
||||
if (argc < 3)
|
||||
syntax(argv[0]);
|
||||
|
|
@ -147,12 +147,12 @@ main(int argc, char** argv)
|
|||
int exit_code = 0;
|
||||
|
||||
{
|
||||
spot::ltl::ltl_simplifier* simp = new spot::ltl::ltl_simplifier(o);
|
||||
spot::ltl_simplifier* simp = new spot::ltl_simplifier(o);
|
||||
o.reduce_size_strictly = true;
|
||||
spot::ltl::ltl_simplifier* simp_size = new spot::ltl::ltl_simplifier(o);
|
||||
spot::ltl_simplifier* simp_size = new spot::ltl_simplifier(o);
|
||||
|
||||
spot::ltl::formula f1 = nullptr;
|
||||
spot::ltl::formula f2 = nullptr;
|
||||
spot::formula f1 = nullptr;
|
||||
spot::formula f2 = nullptr;
|
||||
|
||||
std::ifstream* fin = nullptr;
|
||||
|
||||
|
|
@ -178,16 +178,16 @@ main(int argc, char** argv)
|
|||
}
|
||||
while (input == "");
|
||||
|
||||
spot::ltl::parse_error_list p1;
|
||||
f1 = spot::ltl::parse_infix_psl(input, p1);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, input, p1))
|
||||
spot::parse_error_list p1;
|
||||
f1 = spot::parse_infix_psl(input, p1);
|
||||
if (spot::format_parse_errors(std::cerr, input, p1))
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
f1 = spot::ltl::parse_infix_psl(argv[2], p1);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
|
||||
spot::parse_error_list p1;
|
||||
f1 = spot::parse_infix_psl(argv[2], p1);
|
||||
if (spot::format_parse_errors(std::cerr, argv[2], p1))
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
@ -199,23 +199,23 @@ main(int argc, char** argv)
|
|||
exit(2);
|
||||
}
|
||||
|
||||
spot::ltl::parse_error_list p2;
|
||||
f2 = spot::ltl::parse_infix_psl(argv[3], p2);
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
|
||||
spot::parse_error_list p2;
|
||||
f2 = spot::parse_infix_psl(argv[3], p2);
|
||||
if (spot::format_parse_errors(std::cerr, argv[3], p2))
|
||||
return 2;
|
||||
}
|
||||
|
||||
{
|
||||
spot::ltl::formula ftmp1;
|
||||
spot::formula ftmp1;
|
||||
|
||||
ftmp1 = f1;
|
||||
f1 = simp_size->negative_normal_form(f1, false);
|
||||
|
||||
int length_f1_before = spot::ltl::length(f1);
|
||||
std::string f1s_before = spot::ltl::str_psl(f1);
|
||||
int length_f1_before = spot::length(f1);
|
||||
std::string f1s_before = spot::str_psl(f1);
|
||||
std::string f1l;
|
||||
|
||||
spot::ltl::formula input_f = f1;
|
||||
spot::formula input_f = f1;
|
||||
f1 = simp_size->simplify(input_f);
|
||||
if (!simp_size->are_equivalent(input_f, f1))
|
||||
{
|
||||
|
|
@ -226,8 +226,8 @@ main(int argc, char** argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
spot::ltl::formula maybe_larger = simp->simplify(input_f);
|
||||
f1l = spot::ltl::str_psl(maybe_larger);
|
||||
spot::formula maybe_larger = simp->simplify(input_f);
|
||||
f1l = spot::str_psl(maybe_larger);
|
||||
if (!simp->are_equivalent(input_f, maybe_larger))
|
||||
{
|
||||
std::cerr << "Incorrect reduction (reduce_size_strictly=0) from `"
|
||||
|
|
@ -236,15 +236,15 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
int length_f1_after = spot::ltl::length(f1);
|
||||
std::string f1s_after = spot::ltl::str_psl(f1);
|
||||
int length_f1_after = spot::length(f1);
|
||||
std::string f1s_after = spot::str_psl(f1);
|
||||
|
||||
std::string f2s = "";
|
||||
if (f2)
|
||||
{
|
||||
ftmp1 = f2;
|
||||
f2 = simp_size->negative_normal_form(f2, false);
|
||||
f2s = spot::ltl::str_psl(f2);
|
||||
f2s = spot::str_psl(f2);
|
||||
}
|
||||
|
||||
sum_before += length_f1_before;
|
||||
|
|
@ -308,6 +308,6 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return exit_code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,25 +45,25 @@ main(int argc, char** argv)
|
|||
int exit_return = 0;
|
||||
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto ftmp1 = spot::ltl::parse_infix_psl(argv[2], p1);
|
||||
spot::parse_error_list p1;
|
||||
auto ftmp1 = spot::parse_infix_psl(argv[2], p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
|
||||
if (spot::format_parse_errors(std::cerr, argv[2], p1))
|
||||
return 2;
|
||||
|
||||
spot::ltl::parse_error_list p2;
|
||||
auto ftmp2 = spot::ltl::parse_infix_psl(argv[3], p2);
|
||||
spot::parse_error_list p2;
|
||||
auto ftmp2 = spot::parse_infix_psl(argv[3], p2);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
|
||||
if (spot::format_parse_errors(std::cerr, argv[3], p2))
|
||||
return 2;
|
||||
|
||||
spot::ltl::formula f1 = spot::ltl::negative_normal_form(ftmp1);
|
||||
spot::ltl::formula f2 = spot::ltl::negative_normal_form(ftmp2);
|
||||
spot::formula f1 = spot::negative_normal_form(ftmp1);
|
||||
spot::formula f2 = spot::negative_normal_form(ftmp2);
|
||||
|
||||
std::string f1s = spot::ltl::str_psl(f1);
|
||||
std::string f2s = spot::ltl::str_psl(f2);
|
||||
std::string f1s = spot::str_psl(f1);
|
||||
std::string f2s = spot::str_psl(f2);
|
||||
|
||||
spot::ltl::ltl_simplifier* c = new spot::ltl::ltl_simplifier;
|
||||
spot::ltl_simplifier* c = new spot::ltl_simplifier;
|
||||
|
||||
switch (opt)
|
||||
{
|
||||
|
|
@ -102,6 +102,6 @@ main(int argc, char** argv)
|
|||
|
||||
delete c;
|
||||
}
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return exit_return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ int
|
|||
main()
|
||||
{
|
||||
{
|
||||
spot::ltl::default_environment& e =
|
||||
spot::ltl::default_environment::instance();
|
||||
spot::default_environment& e =
|
||||
spot::default_environment::instance();
|
||||
auto a = spot::make_taa_tgba_string(spot::make_bdd_dict());
|
||||
|
||||
typedef spot::taa_tgba::transition trans;
|
||||
|
|
@ -48,6 +48,6 @@ main()
|
|||
spot::print_dot(std::cout, a);
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,21 +40,21 @@ main(int argc, char **argv)
|
|||
syntax(argv[0]);
|
||||
|
||||
{
|
||||
spot::ltl::parse_error_list p1;
|
||||
auto f1 = spot::ltl::parse_infix_psl(argv[1], p1);
|
||||
spot::parse_error_list p1;
|
||||
auto f1 = spot::parse_infix_psl(argv[1], p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
|
||||
if (spot::format_parse_errors(std::cerr, argv[1], p1))
|
||||
return 2;
|
||||
|
||||
// The string generated from an abstract tree should be parsable
|
||||
// again.
|
||||
|
||||
std::string f1s = spot::ltl::str_psl(f1);
|
||||
std::string f1s = spot::str_psl(f1);
|
||||
std::cout << f1s << '\n';
|
||||
|
||||
auto f2 = spot::ltl::parse_infix_psl(f1s, p1);
|
||||
auto f2 = spot::parse_infix_psl(f1s, p1);
|
||||
|
||||
if (spot::ltl::format_parse_errors(std::cerr, f1s, p1))
|
||||
if (spot::format_parse_errors(std::cerr, f1s, p1))
|
||||
return 2;
|
||||
|
||||
// This second abstract tree should be equal to the first.
|
||||
|
|
@ -64,13 +64,13 @@ main(int argc, char **argv)
|
|||
|
||||
// It should also map to the same string.
|
||||
|
||||
std::string f2s = spot::ltl::str_psl(f2);
|
||||
std::string f2s = spot::str_psl(f2);
|
||||
std::cout << f2s << '\n';
|
||||
|
||||
if (f2s != f1s)
|
||||
return 1;
|
||||
}
|
||||
|
||||
assert(spot::ltl::fnode::instances_check());
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Check for spot::ltl::tostring.
|
||||
# Check for spot::tostring.
|
||||
|
||||
. ./defs || exit 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue