sanity: Replace tabulars by spaces in *.cc *.hh *.hxx
* bin/autfilt.cc, bin/common_aoutput.cc, bin/common_aoutput.hh, bin/common_finput.cc, bin/common_finput.hh, bin/common_hoaread.cc, bin/common_output.cc, bin/common_output.hh, bin/common_post.cc, bin/common_post.hh, bin/common_r.hh, bin/common_range.cc, bin/common_range.hh, bin/common_setup.cc, bin/common_trans.cc, bin/common_trans.hh, bin/dstar2tgba.cc, bin/genltl.cc, bin/ltl2tgba.cc, bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc, bin/ltlfilt.cc, bin/ltlgrind.cc, bin/randaut.cc, bin/randltl.cc, bin/spot-x.cc, spot/graph/graph.hh, spot/graph/ngraph.hh, spot/kripke/kripkegraph.hh, spot/ltsmin/ltsmin.cc, spot/ltsmin/ltsmin.hh, spot/misc/bareword.cc, spot/misc/bitvect.cc, spot/misc/bitvect.hh, spot/misc/common.hh, spot/misc/escape.cc, spot/misc/fixpool.hh, spot/misc/formater.cc, spot/misc/hash.hh, spot/misc/intvcmp2.cc, spot/misc/intvcmp2.hh, spot/misc/intvcomp.cc, spot/misc/intvcomp.hh, spot/misc/location.hh, spot/misc/minato.cc, spot/misc/minato.hh, spot/misc/mspool.hh, spot/misc/optionmap.cc, spot/misc/optionmap.hh, spot/misc/random.cc, spot/misc/random.hh, spot/misc/satsolver.cc, spot/misc/satsolver.hh, spot/misc/timer.cc, spot/misc/timer.hh, spot/misc/tmpfile.cc, spot/misc/trival.hh, spot/parseaut/fmterror.cc, spot/parseaut/parsedecl.hh, spot/parseaut/public.hh, spot/parsetl/fmterror.cc, spot/parsetl/parsedecl.hh, spot/priv/accmap.hh, spot/priv/bddalloc.cc, spot/priv/freelist.cc, spot/priv/trim.cc, spot/priv/weight.cc, spot/priv/weight.hh, spot/ta/taexplicit.cc, spot/ta/taexplicit.hh, spot/ta/taproduct.cc, spot/ta/taproduct.hh, spot/ta/tgtaexplicit.cc, spot/ta/tgtaexplicit.hh, spot/ta/tgtaproduct.cc, spot/ta/tgtaproduct.hh, spot/taalgos/dot.cc, spot/taalgos/dot.hh, spot/taalgos/emptinessta.cc, spot/taalgos/emptinessta.hh, spot/taalgos/minimize.cc, spot/taalgos/tgba2ta.cc, spot/taalgos/tgba2ta.hh, spot/tl/apcollect.cc, spot/tl/contain.cc, spot/tl/contain.hh, spot/tl/dot.cc, spot/tl/exclusive.cc, spot/tl/exclusive.hh, spot/tl/formula.cc, spot/tl/formula.hh, spot/tl/length.cc, spot/tl/mark.cc, spot/tl/mutation.cc, spot/tl/mutation.hh, spot/tl/parse.hh, spot/tl/print.cc, spot/tl/print.hh, spot/tl/randomltl.cc, spot/tl/randomltl.hh, spot/tl/relabel.cc, spot/tl/relabel.hh, spot/tl/remove_x.cc, spot/tl/simplify.cc, spot/tl/simplify.hh, spot/tl/snf.cc, spot/tl/snf.hh, spot/tl/unabbrev.cc, spot/tl/unabbrev.hh, spot/twa/acc.cc, spot/twa/acc.hh, spot/twa/bdddict.cc, spot/twa/bdddict.hh, spot/twa/bddprint.cc, spot/twa/formula2bdd.cc, spot/twa/formula2bdd.hh, spot/twa/taatgba.cc, spot/twa/taatgba.hh, spot/twa/twa.cc, spot/twa/twa.hh, spot/twa/twagraph.cc, spot/twa/twagraph.hh, spot/twa/twaproduct.cc, spot/twa/twaproduct.hh, spot/twaalgos/are_isomorphic.cc, spot/twaalgos/are_isomorphic.hh, spot/twaalgos/bfssteps.cc, spot/twaalgos/bfssteps.hh, spot/twaalgos/cleanacc.cc, spot/twaalgos/complete.cc, spot/twaalgos/compsusp.cc, spot/twaalgos/compsusp.hh, spot/twaalgos/copy.cc, spot/twaalgos/cycles.cc, spot/twaalgos/cycles.hh, spot/twaalgos/degen.cc, spot/twaalgos/degen.hh, spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh, spot/twaalgos/dot.cc, spot/twaalgos/dot.hh, spot/twaalgos/dtbasat.cc, spot/twaalgos/dtbasat.hh, spot/twaalgos/dtwasat.cc, spot/twaalgos/dtwasat.hh, spot/twaalgos/emptiness.cc, spot/twaalgos/emptiness.hh, spot/twaalgos/emptiness_stats.hh, spot/twaalgos/gtec/ce.cc, spot/twaalgos/gtec/ce.hh, spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gtec/gtec.hh, spot/twaalgos/gtec/sccstack.cc, spot/twaalgos/gtec/status.cc, spot/twaalgos/gv04.cc, spot/twaalgos/hoa.cc, spot/twaalgos/hoa.hh, spot/twaalgos/isdet.cc, spot/twaalgos/isunamb.cc, spot/twaalgos/isweakscc.cc, spot/twaalgos/lbtt.cc, spot/twaalgos/lbtt.hh, spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2taa.hh, spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/ltl2tgba_fm.hh, spot/twaalgos/magic.cc, spot/twaalgos/magic.hh, spot/twaalgos/mask.cc, spot/twaalgos/mask.hh, spot/twaalgos/minimize.cc, spot/twaalgos/minimize.hh, spot/twaalgos/ndfs_result.hxx, spot/twaalgos/neverclaim.cc, spot/twaalgos/neverclaim.hh, spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh, spot/twaalgos/powerset.cc, spot/twaalgos/powerset.hh, spot/twaalgos/product.cc, spot/twaalgos/product.hh, spot/twaalgos/projrun.cc, spot/twaalgos/projrun.hh, spot/twaalgos/randomgraph.cc, spot/twaalgos/randomgraph.hh, spot/twaalgos/randomize.cc, spot/twaalgos/randomize.hh, spot/twaalgos/reachiter.cc, spot/twaalgos/reachiter.hh, spot/twaalgos/relabel.cc, spot/twaalgos/relabel.hh, spot/twaalgos/remfin.cc, spot/twaalgos/remprop.cc, spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc, spot/twaalgos/sccfilter.hh, spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh, spot/twaalgos/se05.cc, spot/twaalgos/se05.hh, spot/twaalgos/sepsets.cc, spot/twaalgos/simulation.cc, spot/twaalgos/simulation.hh, spot/twaalgos/stats.cc, spot/twaalgos/stats.hh, spot/twaalgos/strength.cc, spot/twaalgos/strength.hh, spot/twaalgos/stripacc.cc, spot/twaalgos/stutter.cc, spot/twaalgos/stutter.hh, spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc, spot/twaalgos/tau03opt.hh, spot/twaalgos/totgba.cc, spot/twaalgos/translate.cc, spot/twaalgos/word.cc, tests/core/acc.cc, tests/core/bitvect.cc, tests/core/checkpsl.cc, tests/core/checkta.cc, tests/core/consterm.cc, tests/core/emptchk.cc, tests/core/equalsf.cc, tests/core/graph.cc, tests/core/ikwiad.cc, tests/core/intvcmp2.cc, tests/core/intvcomp.cc, tests/core/kind.cc, tests/core/kripkecat.cc, tests/core/ltlrel.cc, tests/core/ngraph.cc, tests/core/randtgba.cc, tests/core/readltl.cc, tests/core/reduc.cc, tests/core/safra.cc, tests/core/syntimpl.cc, tests/ltsmin/modelcheck.cc: Replace tabulars by 8 spaces. * tests/sanity/style.test: Add checks for no tabulars in *.cc *.hh *.hxx
This commit is contained in:
parent
1eee12b8b4
commit
f7e7b4f14e
239 changed files with 25359 additions and 25355 deletions
|
|
@ -41,14 +41,14 @@ static void print(const std::vector<std::vector<int>>& res)
|
|||
std::cout << '{';
|
||||
const char* comma = "";
|
||||
for (int s: v)
|
||||
{
|
||||
std::cout << comma;
|
||||
if (s < 0)
|
||||
std::cout << '!' << (-s - 1);
|
||||
else
|
||||
std::cout << s;
|
||||
comma = ", ";
|
||||
}
|
||||
{
|
||||
std::cout << comma;
|
||||
if (s < 0)
|
||||
std::cout << '!' << (-s - 1);
|
||||
else
|
||||
std::cout << s;
|
||||
comma = ", ";
|
||||
}
|
||||
std::cout << "}\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ int main()
|
|||
spot::acc_cond ac3(ac.num_sets() + ac2.num_sets());
|
||||
ac3.set_generalized_buchi();
|
||||
std::cout << ac.num_sets() << " + "
|
||||
<< ac2.num_sets() << " = " << ac3.num_sets() << '\n';
|
||||
<< ac2.num_sets() << " = " << ac3.num_sets() << '\n';
|
||||
auto m5 = m2 | (m3 << ac.num_sets());
|
||||
check(ac3, m5);
|
||||
auto m6 = ac.comp(m2 & m3) | (m3 << ac.num_sets());
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ int main()
|
|||
ECHO(x);
|
||||
|
||||
std::cout << "subset? " << w->is_subset_of(*x)
|
||||
<< ' ' << v->is_subset_of(*w) << '\n';
|
||||
<< ' ' << v->is_subset_of(*w) << '\n';
|
||||
|
||||
for (size_t i = 0; i < 30; ++i)
|
||||
w->push_back((i & 3) == 0);
|
||||
|
|
@ -108,8 +108,8 @@ int main()
|
|||
for (size_t y = 0; y < a->size(); ++y)
|
||||
for (size_t x = 0; x < 60; ++x)
|
||||
{
|
||||
if (((x ^ y) & 3) < 2)
|
||||
a->at(y).set(x);
|
||||
if (((x ^ y) & 3) < 2)
|
||||
a->at(y).set(x);
|
||||
}
|
||||
std::cout << *a;
|
||||
|
||||
|
|
@ -125,12 +125,12 @@ int main()
|
|||
|
||||
std::cout << "Comp: "
|
||||
<< (a->at(0) == a->at(1))
|
||||
<< (a->at(0) == a->at(2))
|
||||
<< (a->at(1) != a->at(2))
|
||||
<< (a->at(0) < a->at(2))
|
||||
<< (a->at(0) > a->at(2))
|
||||
<< (a->at(3) < a->at(4))
|
||||
<< (a->at(5) > a->at(6)) << std::endl;
|
||||
<< (a->at(0) == a->at(2))
|
||||
<< (a->at(1) != a->at(2))
|
||||
<< (a->at(0) < a->at(2))
|
||||
<< (a->at(0) > a->at(2))
|
||||
<< (a->at(3) < a->at(4))
|
||||
<< (a->at(5) > a->at(6)) << std::endl;
|
||||
|
||||
delete a;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,49 +58,49 @@ main(int argc, char** argv)
|
|||
++line;
|
||||
std::cerr << line << ": " << s << '\n';
|
||||
if (s.empty() || s[0] == '#') // Skip comments
|
||||
continue;
|
||||
continue;
|
||||
|
||||
auto pfpos = spot::parse_infix_psl(s);
|
||||
if (pfpos.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
auto fpos = pfpos.f;
|
||||
|
||||
auto fneg = spot::formula::Not(fpos);
|
||||
|
||||
{
|
||||
auto apos = scc_filter(ltl_to_tgba_fm(fpos, d));
|
||||
auto aneg = scc_filter(ltl_to_tgba_fm(fneg, d));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (FM)\n";
|
||||
exit(2);
|
||||
}
|
||||
auto apos = scc_filter(ltl_to_tgba_fm(fpos, d));
|
||||
auto aneg = scc_filter(ltl_to_tgba_fm(fneg, d));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (FM)\n";
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto apos = scc_filter(ltl_to_tgba_fm(fpos, d, true));
|
||||
auto aneg = scc_filter(ltl_to_tgba_fm(fneg, d, true));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (FM -x)\n";
|
||||
exit(2);
|
||||
}
|
||||
auto apos = scc_filter(ltl_to_tgba_fm(fpos, d, true));
|
||||
auto aneg = scc_filter(ltl_to_tgba_fm(fneg, d, true));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (FM -x)\n";
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (fpos.is_ltl_formula())
|
||||
{
|
||||
auto apos =
|
||||
scc_filter(make_twa_graph(ltl_to_taa(fpos, d),
|
||||
spot::twa::prop_set::all()));
|
||||
auto aneg =
|
||||
scc_filter(make_twa_graph(ltl_to_taa(fneg, d),
|
||||
spot::twa::prop_set::all()));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (TAA)\n";
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
{
|
||||
auto apos =
|
||||
scc_filter(make_twa_graph(ltl_to_taa(fpos, d),
|
||||
spot::twa::prop_set::all()));
|
||||
auto aneg =
|
||||
scc_filter(make_twa_graph(ltl_to_taa(fneg, d),
|
||||
spot::twa::prop_set::all()));
|
||||
if (!spot::product(apos, aneg)->is_empty())
|
||||
{
|
||||
std::cerr << "non-empty intersection between pos and neg (TAA)\n";
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(spot::fnode::instances_check());
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ stats(std::string title, const spot::ta_ptr& ta)
|
|||
auto s = stats_reachable(ta);
|
||||
|
||||
std::cout << std::left << std::setw(20) << title << " | "
|
||||
<< std::right << std::setw(6) << s.states << " | "
|
||||
<< std::setw(6) << s.edges << " | "
|
||||
<< std::setw(6) << s.acceptance_states << '\n';
|
||||
<< std::right << std::setw(6) << s.states << " | "
|
||||
<< std::setw(6) << s.edges << " | "
|
||||
<< std::setw(6) << s.acceptance_states << '\n';
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -57,9 +57,9 @@ stats(std::string title, const spot::twa_ptr& tg)
|
|||
auto s = stats_reachable(tg);
|
||||
|
||||
std::cout << std::left << std::setw(20) << title << " | "
|
||||
<< std::right << std::setw(6) << s.states << " | "
|
||||
<< std::setw(6) << s.edges << " | "
|
||||
<< std::setw(6) << "XXX" << '\n';
|
||||
<< std::right << std::setw(6) << s.states << " | "
|
||||
<< std::setw(6) << s.edges << " | "
|
||||
<< std::setw(6) << "XXX" << '\n';
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -83,141 +83,141 @@ main(int argc, char** argv)
|
|||
{
|
||||
std::cout << "in: " << s << '\n';
|
||||
if (s.empty() || s[0] == '#') // Skip comments
|
||||
continue;
|
||||
continue;
|
||||
|
||||
auto pf = spot::parse_infix_psl(s);
|
||||
|
||||
if (pf.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
auto f = pf.f;
|
||||
|
||||
|
||||
{
|
||||
auto a = ltl_to_tgba_fm(f, d);
|
||||
bdd ap_set = atomic_prop_collect_as_bdd(f, a);
|
||||
auto a = ltl_to_tgba_fm(f, d);
|
||||
bdd ap_set = atomic_prop_collect_as_bdd(f, a);
|
||||
|
||||
// run 0 ../ikwiad -TGTA -ks "$1"
|
||||
// run 0 ../ikwiad -TGTA -RT -ks "$1"
|
||||
{
|
||||
auto t = spot::tgba_to_tgta(a, ap_set);
|
||||
stats("-TGTA", t);
|
||||
stats("-TGTA -RT", minimize_tgta(t));
|
||||
}
|
||||
// run 0 ../ikwiad -TGTA -ks "$1"
|
||||
// run 0 ../ikwiad -TGTA -RT -ks "$1"
|
||||
{
|
||||
auto t = spot::tgba_to_tgta(a, ap_set);
|
||||
stats("-TGTA", t);
|
||||
stats("-TGTA -RT", minimize_tgta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -ks "$1"
|
||||
// run 0 ../ikwiad -TA -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA", t);
|
||||
stats("-TA -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -ks "$1"
|
||||
// run 0 ../ikwiad -TA -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA", t);
|
||||
stats("-TA -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -lv -ks "$1"
|
||||
// run 0 ../ikwiad -TA -lv -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -lv", t);
|
||||
stats("-TA -lv -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -lv -ks "$1"
|
||||
// run 0 ../ikwiad -TA -lv -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -lv", t);
|
||||
stats("-TA -lv -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -sp", t);
|
||||
stats("-TA -sp -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -sp", t);
|
||||
stats("-TA -sp -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -lv -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -lv -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -lv -sp", t);
|
||||
stats("-TA -lv -sp -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -lv -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -lv -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
false, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -lv -sp", t);
|
||||
stats("-TA -lv -sp -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
a = spot::degeneralize(a);
|
||||
a = spot::degeneralize(a);
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -DS", t);
|
||||
stats("-TA -DS -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -DS", t);
|
||||
stats("-TA -DS -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -lv -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -lv -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -lv", t);
|
||||
stats("-TA -DS -lv -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -lv -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -lv -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -lv", t);
|
||||
stats("-TA -DS -lv -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -sp", t);
|
||||
stats("-TA -DS -sp -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
false); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -sp", t);
|
||||
stats("-TA -DS -sp -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -lv -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -lv -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -lv -sp", t);
|
||||
stats("-TA -DS -lv -sp -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -TA -DS -lv -sp -ks "$1"
|
||||
// run 0 ../ikwiad -TA -DS -lv -sp -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
true, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-TA -DS -lv -sp", t);
|
||||
stats("-TA -DS -lv -sp -RT", minimize_ta(t));
|
||||
}
|
||||
}
|
||||
// Some cases with -x -R3 -DS -in
|
||||
{
|
||||
auto a = spot::degeneralize(scc_filter(ltl_to_tgba_fm(f, d, true)));
|
||||
bdd ap_set = atomic_prop_collect_as_bdd(f, a);
|
||||
auto a = spot::degeneralize(scc_filter(ltl_to_tgba_fm(f, d, true)));
|
||||
bdd ap_set = atomic_prop_collect_as_bdd(f, a);
|
||||
|
||||
{
|
||||
// run 0 ../ikwiad -x -R3 -DS -TA -in -ks "$1"
|
||||
// run 0 ../ikwiad -x -R3 -DS -TA -in -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-x -TA -DS -in", t);
|
||||
stats("-x -TA -DS -in -RT", minimize_ta(t));
|
||||
}
|
||||
{
|
||||
// run 0 ../ikwiad -x -R3 -DS -TA -in -ks "$1"
|
||||
// run 0 ../ikwiad -x -R3 -DS -TA -in -RT -ks "$1"
|
||||
auto t = spot::tgba_to_ta(a, ap_set,
|
||||
true, // degen (-DS)
|
||||
false, // artificial_initial_state (-in)
|
||||
false, // single_pass (-sp),
|
||||
true); // artificial_livelock (-lv)
|
||||
stats("-x -TA -DS -in", t);
|
||||
stats("-x -TA -DS -in -RT", minimize_ta(t));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ main(int argc, char **argv)
|
|||
std::string s;
|
||||
while (std::getline(input, s))
|
||||
{
|
||||
if (s[0] == '#') // Skip comments
|
||||
{
|
||||
std::cerr << s << '\n';
|
||||
continue;
|
||||
}
|
||||
if (s[0] == '#') // Skip comments
|
||||
{
|
||||
std::cerr << s << '\n';
|
||||
continue;
|
||||
}
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
bool expected;
|
||||
|
|
@ -60,16 +60,16 @@ main(int argc, char **argv)
|
|||
|
||||
auto pf1 = spot::parse_infix_sere(form);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
|
||||
bool b = pf1.f.accepts_eword();
|
||||
std::cout << form << ',' << b << '\n';
|
||||
if (b != expected)
|
||||
{
|
||||
std::cerr << "computed '" << b
|
||||
<< "' but expected '" << expected << "'\n";
|
||||
return 2;
|
||||
}
|
||||
{
|
||||
std::cerr << "computed '" << b
|
||||
<< "' but expected '" << expected << "'\n";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
assert(spot::fnode::instances_check());
|
||||
|
|
|
|||
|
|
@ -62,36 +62,36 @@ main(int argc, char** argv)
|
|||
std::cout << "========================================================\n";
|
||||
std::cout << line << ": " << s << '\n';
|
||||
if (s.empty() || s[0] == '#') // Skip comments
|
||||
continue;
|
||||
continue;
|
||||
|
||||
std::vector<std::string> tokens;
|
||||
{
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
while (std::getline(ss, form, ','))
|
||||
{
|
||||
std::string tmp;
|
||||
while (form.size() > 0 && form.back() == '\\'
|
||||
&& std::getline(ss, tmp, ','))
|
||||
{
|
||||
form.back() = ',';
|
||||
form += tmp;
|
||||
}
|
||||
tokens.push_back(form);
|
||||
}
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
while (std::getline(ss, form, ','))
|
||||
{
|
||||
std::string tmp;
|
||||
while (form.size() > 0 && form.back() == '\\'
|
||||
&& std::getline(ss, tmp, ','))
|
||||
{
|
||||
form.back() = ',';
|
||||
form += tmp;
|
||||
}
|
||||
tokens.push_back(form);
|
||||
}
|
||||
}
|
||||
|
||||
if (tokens.size() != 2)
|
||||
{
|
||||
std::cerr << "Expecting two tokens on input line.\n";
|
||||
exit(2);
|
||||
}
|
||||
{
|
||||
std::cerr << "Expecting two tokens on input line.\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
int runs = atoi(tokens[0].c_str());
|
||||
|
||||
auto pf = spot::parse_infix_psl(tokens[1]);
|
||||
if (pf.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
auto f = pf.f;
|
||||
|
||||
auto d = spot::make_bdd_dict();
|
||||
|
|
@ -99,103 +99,103 @@ main(int argc, char** argv)
|
|||
// Build many different automata from this formula.
|
||||
spot::const_twa_ptr aut[4];
|
||||
{
|
||||
auto a = spot::ltl_to_taa(f, d);
|
||||
aut[0] = a;
|
||||
auto all = spot::twa::prop_set::all();
|
||||
aut[1] = spot::degeneralize_tba(spot::make_twa_graph(a, all));
|
||||
auto a = spot::ltl_to_taa(f, d);
|
||||
aut[0] = a;
|
||||
auto all = spot::twa::prop_set::all();
|
||||
aut[1] = spot::degeneralize_tba(spot::make_twa_graph(a, all));
|
||||
}
|
||||
{
|
||||
auto a = spot::ltl_to_tgba_fm(f, d);
|
||||
aut[2] = a;
|
||||
aut[3] = spot::degeneralize(a);
|
||||
auto a = spot::ltl_to_tgba_fm(f, d);
|
||||
aut[2] = a;
|
||||
aut[3] = spot::degeneralize(a);
|
||||
}
|
||||
|
||||
const char* algos[] = {
|
||||
"Cou99", "Cou99(shy)",
|
||||
"CVWY90", "CVWY90(bsh=10M)", "CVWY90(repeated)",
|
||||
"SE05", "SE05(bsh=10M)", "SE05(repeated)",
|
||||
"Tau03_opt", "GV04",
|
||||
"Cou99", "Cou99(shy)",
|
||||
"CVWY90", "CVWY90(bsh=10M)", "CVWY90(repeated)",
|
||||
"SE05", "SE05(bsh=10M)", "SE05(repeated)",
|
||||
"Tau03_opt", "GV04",
|
||||
};
|
||||
|
||||
for (auto& algo: algos)
|
||||
{
|
||||
const char* err;
|
||||
auto i = spot::make_emptiness_check_instantiator(algo, &err);
|
||||
if (!i)
|
||||
{
|
||||
std::cerr << "Failed to parse `" << err << '\'' << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
{
|
||||
const char* err;
|
||||
auto i = spot::make_emptiness_check_instantiator(algo, &err);
|
||||
if (!i)
|
||||
{
|
||||
std::cerr << "Failed to parse `" << err << '\'' << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
|
||||
for (unsigned j = 0; j < sizeof(aut)/sizeof(*aut); ++j)
|
||||
{
|
||||
auto a = aut[j];
|
||||
std::cout << "** Testing aut[" << j << "] using " << algo << '\n';
|
||||
unsigned n_acc = a->acc().num_sets();
|
||||
unsigned n_max = i->max_sets();
|
||||
if (n_max < n_acc)
|
||||
{
|
||||
std::cout << "Skipping because automaton has " << n_acc
|
||||
<< " acceptance sets, and " << algo
|
||||
<< " accepts at most " << n_max << ".\n";
|
||||
continue;
|
||||
}
|
||||
unsigned n_min = i->min_sets();
|
||||
if (n_min > n_acc)
|
||||
{
|
||||
std::cout << "Skipping because automaton has " << n_acc
|
||||
<< " acceptance sets, and " << algo
|
||||
<< " wants at least " << n_min << ".\n";
|
||||
continue;
|
||||
}
|
||||
for (unsigned j = 0; j < sizeof(aut)/sizeof(*aut); ++j)
|
||||
{
|
||||
auto a = aut[j];
|
||||
std::cout << "** Testing aut[" << j << "] using " << algo << '\n';
|
||||
unsigned n_acc = a->acc().num_sets();
|
||||
unsigned n_max = i->max_sets();
|
||||
if (n_max < n_acc)
|
||||
{
|
||||
std::cout << "Skipping because automaton has " << n_acc
|
||||
<< " acceptance sets, and " << algo
|
||||
<< " accepts at most " << n_max << ".\n";
|
||||
continue;
|
||||
}
|
||||
unsigned n_min = i->min_sets();
|
||||
if (n_min > n_acc)
|
||||
{
|
||||
std::cout << "Skipping because automaton has " << n_acc
|
||||
<< " acceptance sets, and " << algo
|
||||
<< " wants at least " << n_min << ".\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
auto ec = i->instantiate(a);
|
||||
bool search_many = i->options().get("repeated");
|
||||
assert(ec);
|
||||
int ce_found = 0;
|
||||
do
|
||||
{
|
||||
if (auto res = ec->check())
|
||||
{
|
||||
++ce_found;
|
||||
std::cout << ce_found << " counterexample found\n";
|
||||
if (auto run = res->accepting_run())
|
||||
{
|
||||
spot::print_dot(std::cout, run->as_twa());
|
||||
}
|
||||
std::cout << '\n';
|
||||
if (runs == 0)
|
||||
{
|
||||
std::cerr << "ERROR: Expected no counterexample.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ce_found)
|
||||
std::cout << "No more counterexample found.\n\n";
|
||||
else
|
||||
std::cout << "No counterexample found.\n\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (search_many);
|
||||
auto ec = i->instantiate(a);
|
||||
bool search_many = i->options().get("repeated");
|
||||
assert(ec);
|
||||
int ce_found = 0;
|
||||
do
|
||||
{
|
||||
if (auto res = ec->check())
|
||||
{
|
||||
++ce_found;
|
||||
std::cout << ce_found << " counterexample found\n";
|
||||
if (auto run = res->accepting_run())
|
||||
{
|
||||
spot::print_dot(std::cout, run->as_twa());
|
||||
}
|
||||
std::cout << '\n';
|
||||
if (runs == 0)
|
||||
{
|
||||
std::cerr << "ERROR: Expected no counterexample.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ce_found)
|
||||
std::cout << "No more counterexample found.\n\n";
|
||||
else
|
||||
std::cout << "No counterexample found.\n\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (search_many);
|
||||
|
||||
// The expected number of runs is only for TAA translations
|
||||
if (search_many && runs > ce_found && j < 2)
|
||||
{
|
||||
std::cerr << "ERROR: only " << ce_found
|
||||
<< " counterexamples founds, expected at least "
|
||||
<< runs << '\n';
|
||||
exit(1);
|
||||
}
|
||||
if (!search_many && ec->safe() && runs && !ce_found)
|
||||
{
|
||||
std::cerr << "ERROR: expected a counterexample.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// The expected number of runs is only for TAA translations
|
||||
if (search_many && runs > ce_found && j < 2)
|
||||
{
|
||||
std::cerr << "ERROR: only " << ce_found
|
||||
<< " counterexamples founds, expected at least "
|
||||
<< runs << '\n';
|
||||
exit(1);
|
||||
}
|
||||
if (!search_many && ec->safe() && runs && !ce_found)
|
||||
{
|
||||
std::cerr << "ERROR: expected a counterexample.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(spot::fnode::instances_check());
|
||||
|
|
|
|||
|
|
@ -66,152 +66,152 @@ main(int argc, char** argv)
|
|||
{
|
||||
++line;
|
||||
std::cerr << line << ": " << s << '\n';
|
||||
if (s[0] == '#') // Skip comments
|
||||
continue;
|
||||
if (s[0] == '#') // Skip comments
|
||||
continue;
|
||||
std::vector<std::string> formulas;
|
||||
{
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
while (std::getline(ss, form, ','))
|
||||
{
|
||||
std::string tmp;
|
||||
while (form.size() > 0 && form.back() == '\\'
|
||||
&& std::getline(ss, tmp, ','))
|
||||
{
|
||||
form.back() = ',';
|
||||
form += tmp;
|
||||
}
|
||||
formulas.push_back(form);
|
||||
}
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
while (std::getline(ss, form, ','))
|
||||
{
|
||||
std::string tmp;
|
||||
while (form.size() > 0 && form.back() == '\\'
|
||||
&& std::getline(ss, tmp, ','))
|
||||
{
|
||||
form.back() = ',';
|
||||
form += tmp;
|
||||
}
|
||||
formulas.push_back(form);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned size = formulas.size();
|
||||
if (size == 0) // Skip empty lines
|
||||
continue;
|
||||
if (size == 0) // Skip empty lines
|
||||
continue;
|
||||
|
||||
if (size == 1)
|
||||
{
|
||||
std::cerr << "Not enough formulas on line " << line << '\n';
|
||||
return 2;
|
||||
}
|
||||
{
|
||||
std::cerr << "Not enough formulas on line " << line << '\n';
|
||||
return 2;
|
||||
}
|
||||
|
||||
auto pf2 = spot::parse_infix_psl(formulas[size - 1]);
|
||||
|
||||
if (pf2.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
auto f2 = pf2.f;
|
||||
|
||||
for (unsigned n = 0; n < size - 1; ++n)
|
||||
{
|
||||
{
|
||||
|
||||
auto pf1 = spot::parse_infix_psl(formulas[n]);
|
||||
auto pf1 = spot::parse_infix_psl(formulas[n]);
|
||||
|
||||
if (check_first && pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
auto f1 = pf1.f;
|
||||
if (check_first && pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
auto f1 = pf1.f;
|
||||
|
||||
int exit_code = 0;
|
||||
int exit_code = 0;
|
||||
|
||||
{
|
||||
{
|
||||
#if defined UNABBREV || defined NENOFORM
|
||||
spot::formula tmp;
|
||||
spot::formula tmp;
|
||||
#endif
|
||||
#ifdef UNABBREV
|
||||
tmp = f1;
|
||||
f1 = spot::unabbreviate(f1, UNABBREV);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
tmp = f1;
|
||||
f1 = spot::unabbreviate(f1, UNABBREV);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef NENOFORM
|
||||
tmp = f1;
|
||||
f1 = spot::negative_normal_form(f1);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
tmp = f1;
|
||||
f1 = spot::negative_normal_form(f1);
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC
|
||||
spot::tl_simplifier_options opt(true, true, true,
|
||||
false, false);
|
||||
spot::tl_simplifier_options opt(true, true, true,
|
||||
false, false);
|
||||
# ifdef EVENT_UNIV
|
||||
opt.favor_event_univ = true;
|
||||
opt.favor_event_univ = true;
|
||||
# endif
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC_TAU
|
||||
spot::tl_simplifier_options opt(false, false, false,
|
||||
true, false);
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
spot::tl_simplifier_options opt(false, false, false,
|
||||
true, false);
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
#ifdef REDUC_TAUSTR
|
||||
spot::tl_simplifier_options opt(false, false, false,
|
||||
true, true);
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
spot::tl_simplifier_options opt(false, false, false,
|
||||
true, true);
|
||||
spot::tl_simplifier simp(opt);
|
||||
{
|
||||
spot::formula tmp;
|
||||
tmp = f1;
|
||||
f1 = simp.simplify(f1);
|
||||
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
if (!simp.are_equivalent(f1, tmp))
|
||||
{
|
||||
std::cerr
|
||||
<< "Source and simplified formulae are not equivalent!\n";
|
||||
spot::print_psl(std::cerr << "Simplified: ", f1) << '\n';
|
||||
exit_code = 1;
|
||||
}
|
||||
}
|
||||
f1.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
|
||||
exit_code |= f1 != f2;
|
||||
exit_code |= f1 != f2;
|
||||
|
||||
#if (!defined(REDUC) && !defined(REDUC_TAU) && !defined(REDUC_TAUSTR))
|
||||
spot::tl_simplifier simp;
|
||||
spot::tl_simplifier simp;
|
||||
#endif
|
||||
|
||||
if (!simp.are_equivalent(f1, f2))
|
||||
{
|
||||
if (!simp.are_equivalent(f1, f2))
|
||||
{
|
||||
#if (!defined(REDUC) && !defined(REDUC_TAU) && !defined(REDUC_TAUSTR))
|
||||
std::cerr
|
||||
<< "Source and destination formulae are not equivalent!\n";
|
||||
std::cerr
|
||||
<< "Source and destination formulae are not equivalent!\n";
|
||||
#else
|
||||
std::cerr
|
||||
<< "Simpl. and destination formulae are not equivalent!\n";
|
||||
std::cerr
|
||||
<< "Simpl. and destination formulae are not equivalent!\n";
|
||||
#endif
|
||||
exit_code = 1;
|
||||
}
|
||||
exit_code = 1;
|
||||
}
|
||||
|
||||
#if NEGATE
|
||||
exit_code ^= 1;
|
||||
exit_code ^= 1;
|
||||
#endif
|
||||
if (exit_code)
|
||||
return exit_code;
|
||||
}
|
||||
}
|
||||
if (exit_code)
|
||||
return exit_code;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(spot::fnode::instances_check());
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ dot(std::ostream& out, spot::digraph<SL, TL>& g)
|
|||
out << ' ' << s;
|
||||
dot_state(out, g, s);
|
||||
for (auto& t: g.out(s))
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, g, t);
|
||||
}
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, g, t);
|
||||
}
|
||||
}
|
||||
out << "}\n";
|
||||
}
|
||||
|
|
@ -244,9 +244,9 @@ f7()
|
|||
for (auto& t: g.out(s1))
|
||||
{
|
||||
for (auto& tt: t.dst)
|
||||
{
|
||||
f += t.label * g.state_data(tt);
|
||||
}
|
||||
{
|
||||
f += t.label * g.state_data(tt);
|
||||
}
|
||||
}
|
||||
return f == 15;
|
||||
}
|
||||
|
|
@ -310,12 +310,12 @@ int main()
|
|||
bool a7 = f7();
|
||||
bool a8 = f8();
|
||||
std::cout << a1 << ' '
|
||||
<< a2 << ' '
|
||||
<< a3 << ' '
|
||||
<< a4 << ' '
|
||||
<< a5 << ' '
|
||||
<< a6 << ' '
|
||||
<< a7 << ' '
|
||||
<< a8 << '\n';
|
||||
<< a2 << ' '
|
||||
<< a3 << ' '
|
||||
<< a4 << ' '
|
||||
<< a5 << ' '
|
||||
<< a6 << ' '
|
||||
<< a7 << ' '
|
||||
<< a8 << '\n';
|
||||
return !(a1 && a2 && a3 && a4 && a5 && a6 && a7 && a8);
|
||||
}
|
||||
|
|
|
|||
1988
tests/core/ikwiad.cc
1988
tests/core/ikwiad.cc
File diff suppressed because it is too large
Load diff
|
|
@ -49,15 +49,15 @@ check_aa(int* data, int size, unsigned expected = 0)
|
|||
std::cout << "*** cmp error *** " << res << std::endl;
|
||||
std::cout << "AE[" << size << "] ";
|
||||
for (int i = 0; i < size; ++i)
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
if (expected && (csize * sizeof(int) != expected))
|
||||
{
|
||||
std::cout << "*** size error *** (expected "
|
||||
<< expected << " bytes, got " << csize * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
<< expected << " bytes, got " << csize * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
res = 1;
|
||||
}
|
||||
|
||||
|
|
@ -88,11 +88,11 @@ int main()
|
|||
errors += check(comp2, sizeof(comp2) / sizeof(*comp2));
|
||||
|
||||
int comp3[] = { 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
|
||||
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
|
||||
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1,
|
||||
0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0 };
|
||||
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
|
||||
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1,
|
||||
0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0 };
|
||||
errors += check(comp3, sizeof(comp3) / sizeof(*comp3));
|
||||
|
||||
int comp4[] = { 1, 2, 1, 2, 1, 2, 2, 0 }; // 32 bits
|
||||
|
|
@ -109,23 +109,23 @@ int main()
|
|||
errors += check(comp7, sizeof(comp7) / sizeof(*comp7));
|
||||
|
||||
int comp8[] = { 4959, 6754, 8133, 10985, 11121, 14413, 17335, 20754,
|
||||
21317, 30008, 30381, 33494, 34935, 41210, 41417 };
|
||||
21317, 30008, 30381, 33494, 34935, 41210, 41417 };
|
||||
errors += check(comp8, sizeof(comp8) / sizeof(*comp8));
|
||||
|
||||
int comp9[] = { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
errors += check(comp9, sizeof(comp9) / sizeof(*comp9));
|
||||
|
||||
int comp10[] = { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
||||
9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 9 };
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
||||
9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 9 };
|
||||
errors += check(comp10, sizeof(comp10) / sizeof(*comp10));
|
||||
|
||||
int comp11[] = { 2, 254, 254, 0, 1, 4, 0, 0, 0, 1, 0, 1, 253, 0 };
|
||||
|
|
|
|||
|
|
@ -53,15 +53,15 @@ check_vv(int* data, int size, unsigned expected = 0)
|
|||
std::cout << "*** cmp error *** " << std::endl;
|
||||
std::cout << "WE[" << size << "] ";
|
||||
for (int i = 0; i < size; ++i)
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
||||
if (expected && (output.size() * sizeof(int) != expected))
|
||||
{
|
||||
std::cout << "*** size error *** (expected "
|
||||
<< expected << " bytes, got " << output.size() * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
<< expected << " bytes, got " << output.size() * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
res = 1;
|
||||
}
|
||||
|
||||
|
|
@ -96,15 +96,15 @@ check_av(int* data, int size, unsigned expected = 0)
|
|||
std::cout << "*** cmp error *** " << res << std::endl;
|
||||
std::cout << "VE[" << size << "] ";
|
||||
for (int i = 0; i < size; ++i)
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
||||
if (expected && (v->size() * sizeof(int) != expected))
|
||||
{
|
||||
std::cout << "*** size error *** (expected "
|
||||
<< expected << " bytes, got " << v->size() * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
<< expected << " bytes, got " << v->size() * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
res = 1;
|
||||
}
|
||||
|
||||
|
|
@ -142,15 +142,15 @@ check_aa(int* data, int size, unsigned expected = 0)
|
|||
std::cout << "*** cmp error *** " << res << std::endl;
|
||||
std::cout << "AE[" << size << "] ";
|
||||
for (int i = 0; i < size; ++i)
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << data[i] << ' ';
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
||||
if (expected && (csize * sizeof(int) != expected))
|
||||
{
|
||||
std::cout << "*** size error *** (expected "
|
||||
<< expected << " bytes, got " << csize * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
<< expected << " bytes, got " << csize * sizeof(int)
|
||||
<< " bytes)" << std::endl;
|
||||
res = 1;
|
||||
}
|
||||
|
||||
|
|
@ -181,11 +181,11 @@ int main()
|
|||
errors += check(comp2, sizeof(comp2) / sizeof(*comp2));
|
||||
|
||||
int comp3[] = { 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
|
||||
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
|
||||
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1,
|
||||
0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0 };
|
||||
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
|
||||
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1,
|
||||
0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0 };
|
||||
errors += check(comp3, sizeof(comp3) / sizeof(*comp3));
|
||||
|
||||
int comp4[] = { 1, 2, 1, 2, 1, 2, 2, 0 }; // 32 bits
|
||||
|
|
@ -202,23 +202,23 @@ int main()
|
|||
errors += check(comp7, sizeof(comp7) / sizeof(*comp7));
|
||||
|
||||
int comp8[] = { 4959, 6754, 8133, 10985, 11121, 14413, 17335, 20754,
|
||||
21317, 30008, 30381, 33494, 34935, 41210, 41417 };
|
||||
21317, 30008, 30381, 33494, 34935, 41210, 41417 };
|
||||
errors += check(comp8, sizeof(comp8) / sizeof(*comp8));
|
||||
|
||||
int comp9[] = { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
errors += check(comp9, sizeof(comp9) / sizeof(*comp9));
|
||||
|
||||
int comp10[] = { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
||||
9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 9 };
|
||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
||||
9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 9 };
|
||||
errors += check(comp10, sizeof(comp10) / sizeof(*comp10));
|
||||
|
||||
return errors;
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ main(int argc, char **argv)
|
|||
std::string s;
|
||||
while (std::getline(input, s))
|
||||
{
|
||||
if (s[0] == '#') // Skip comments
|
||||
{
|
||||
std::cerr << s << '\n';
|
||||
continue;
|
||||
}
|
||||
if (s[0] == '#') // Skip comments
|
||||
{
|
||||
std::cerr << s << '\n';
|
||||
continue;
|
||||
}
|
||||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
std::string expected;
|
||||
|
|
@ -61,7 +61,7 @@ main(int argc, char **argv)
|
|||
spot::parse_error_list p1;
|
||||
auto pf1 = spot::parse_infix_psl(form);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
return 2;
|
||||
auto f1 = pf1.f;
|
||||
|
||||
std::ostringstream so;
|
||||
|
|
@ -69,11 +69,11 @@ main(int argc, char **argv)
|
|||
auto sost = so.str();
|
||||
std::cout << form << ',' << sost << '\n';
|
||||
if (sost != expected)
|
||||
{
|
||||
std::cerr << "computed '" << sost
|
||||
<< "' but expected '" << expected << "'\n";
|
||||
return 2;
|
||||
}
|
||||
{
|
||||
std::cerr << "computed '" << sost
|
||||
<< "' but expected '" << expected << "'\n";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
assert(spot::fnode::instances_check());
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -34,16 +34,16 @@ int main(int argc, char** argv)
|
|||
spot::automaton_stream_parser parser(argv[1], opts);
|
||||
|
||||
while (auto paut = parser.parse(make_bdd_dict(),
|
||||
default_environment::instance()))
|
||||
default_environment::instance()))
|
||||
{
|
||||
if (paut->format_errors(std::cerr))
|
||||
{
|
||||
return_value = 1;
|
||||
if (paut->ks)
|
||||
continue;
|
||||
}
|
||||
{
|
||||
return_value = 1;
|
||||
if (paut->ks)
|
||||
continue;
|
||||
}
|
||||
if (!paut->ks)
|
||||
break;
|
||||
break;
|
||||
print_hoa(std::cout, paut->ks);
|
||||
}
|
||||
return return_value;
|
||||
|
|
|
|||
|
|
@ -51,13 +51,13 @@ main(int argc, char **argv)
|
|||
typedef std::map<std::string, std::string> map_t;
|
||||
map_t sorted_map;
|
||||
for (spot::relabeling_map::const_iterator i = m->begin();
|
||||
i != m->end(); ++i)
|
||||
i != m->end(); ++i)
|
||||
sorted_map[spot::str_psl(i->first)] =
|
||||
spot::str_psl(i->second);
|
||||
spot::str_psl(i->second);
|
||||
for (map_t::const_iterator i = sorted_map.begin();
|
||||
i != sorted_map.end(); ++i)
|
||||
i != sorted_map.end(); ++i)
|
||||
std::cout << " " << i->first << " -> "
|
||||
<< i->second << '\n';
|
||||
<< i->second << '\n';
|
||||
delete m;
|
||||
}
|
||||
assert(spot::fnode::instances_check());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ dot_state(std::ostream& out, const spot::digraph<void, TL>&, unsigned)
|
|||
template <typename SL, typename TL>
|
||||
void
|
||||
dot_state(std::ostream& out, const spot::digraph<SL, TL>& g, unsigned n,
|
||||
std::string name)
|
||||
std::string name)
|
||||
{
|
||||
out << " [label=\"" << name << "\\n" << g.state_data(n) << "\"]\n";
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ dot_state(std::ostream& out, const spot::digraph<SL, TL>& g, unsigned n,
|
|||
template <typename TL>
|
||||
void
|
||||
dot_state(std::ostream& out, const spot::digraph<void, TL>&, unsigned,
|
||||
std::string name)
|
||||
std::string name)
|
||||
{
|
||||
out << " [label=\"" << name << "\"]\n";
|
||||
}
|
||||
|
|
@ -79,10 +79,10 @@ dot(std::ostream& out, const spot::digraph<SL, TL>& g)
|
|||
out << ' ' << s;
|
||||
dot_state(out, g, s);
|
||||
for (auto& t: g.out(s))
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, g, t);
|
||||
}
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, g, t);
|
||||
}
|
||||
}
|
||||
out << "}\n";
|
||||
}
|
||||
|
|
@ -99,10 +99,10 @@ dot(std::ostream& out, const spot::named_graph<G1, G2, G3, G4>& g)
|
|||
out << ' ' << s;
|
||||
dot_state(out, gg, s, g.get_name(s));
|
||||
for (auto& t: gg.out(s))
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, gg, t);
|
||||
}
|
||||
{
|
||||
out << ' ' << s << " -> " << t.dst;
|
||||
dot_trans(out, gg, t);
|
||||
}
|
||||
}
|
||||
out << "}\n";
|
||||
}
|
||||
|
|
@ -285,9 +285,9 @@ static bool f7()
|
|||
for (auto& t: g.out(s1))
|
||||
{
|
||||
for (auto& tt: t.dst)
|
||||
{
|
||||
f += t.label * g.state_data(tt);
|
||||
}
|
||||
{
|
||||
f += t.label * g.state_data(tt);
|
||||
}
|
||||
}
|
||||
return f == 15;
|
||||
}
|
||||
|
|
@ -423,13 +423,13 @@ int main()
|
|||
bool a8 = f8();
|
||||
bool a9 = f9();
|
||||
std::cout << a1 << ' '
|
||||
<< a2 << ' '
|
||||
<< a3 << ' '
|
||||
<< a4 << ' '
|
||||
<< a5 << ' '
|
||||
<< a6 << ' '
|
||||
<< a7 << ' '
|
||||
<< a8 << ' '
|
||||
<< a9 << '\n';
|
||||
<< a2 << ' '
|
||||
<< a3 << ' '
|
||||
<< a4 << ' '
|
||||
<< a5 << ' '
|
||||
<< a6 << ' '
|
||||
<< a7 << ' '
|
||||
<< a8 << ' '
|
||||
<< a9 << '\n';
|
||||
return !(a1 && a2 && a3 && a4 && a5 && a6 && a7 && a8 && a9);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -49,7 +49,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
debug = true;
|
||||
if (argc < 3)
|
||||
syntax(argv[0]);
|
||||
syntax(argv[0]);
|
||||
formula_index = 2;
|
||||
}
|
||||
|
||||
|
|
@ -66,14 +66,14 @@ main(int argc, char** argv)
|
|||
if (f)
|
||||
{
|
||||
#ifdef DOTTY
|
||||
spot::print_dot_psl(std::cout, f);
|
||||
spot::print_dot_psl(std::cout, f);
|
||||
#else
|
||||
f.dump(std::cout) << std::endl;
|
||||
f.dump(std::cout) << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
exit_code = 1;
|
||||
exit_code = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,51 +158,51 @@ main(int argc, char** argv)
|
|||
|
||||
if (readfile)
|
||||
{
|
||||
fin = new std::ifstream(argv[2]);
|
||||
if (!*fin)
|
||||
{
|
||||
std::cerr << "Cannot open " << argv[2] << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
fin = new std::ifstream(argv[2]);
|
||||
if (!*fin)
|
||||
{
|
||||
std::cerr << "Cannot open " << argv[2] << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
next_line:
|
||||
|
||||
if (fin)
|
||||
{
|
||||
std::string input;
|
||||
do
|
||||
{
|
||||
if (!std::getline(*fin, input))
|
||||
goto end;
|
||||
}
|
||||
while (input == "");
|
||||
std::string input;
|
||||
do
|
||||
{
|
||||
if (!std::getline(*fin, input))
|
||||
goto end;
|
||||
}
|
||||
while (input == "");
|
||||
|
||||
auto pf1 = spot::parse_infix_psl(input);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
f1 = pf1.f;
|
||||
auto pf1 = spot::parse_infix_psl(input);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
f1 = pf1.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto pf1 = spot::parse_infix_psl(argv[2]);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
f1 = pf1.f;
|
||||
auto pf1 = spot::parse_infix_psl(argv[2]);
|
||||
if (pf1.format_errors(std::cerr))
|
||||
return 2;
|
||||
f1 = pf1.f;
|
||||
}
|
||||
|
||||
if (argc == 4)
|
||||
{
|
||||
if (readfile)
|
||||
{
|
||||
std::cerr << "Cannot read from file and check result." << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
if (readfile)
|
||||
{
|
||||
std::cerr << "Cannot read from file and check result." << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
|
||||
auto pf2 = spot::parse_infix_psl(argv[3]);
|
||||
if (pf2.format_errors(std::cerr))
|
||||
return 2;
|
||||
f2 = pf2.f;
|
||||
auto pf2 = spot::parse_infix_psl(argv[3]);
|
||||
if (pf2.format_errors(std::cerr))
|
||||
return 2;
|
||||
f2 = pf2.f;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -218,80 +218,80 @@ main(int argc, char** argv)
|
|||
spot::formula input_f = f1;
|
||||
f1 = simp_size->simplify(input_f);
|
||||
if (!simp_size->are_equivalent(input_f, f1))
|
||||
{
|
||||
std::cerr << "Incorrect reduction from `" << f1s_before
|
||||
<< "' to `";
|
||||
print_psl(std::cerr, f1) << "'.\n";
|
||||
exit_code = 3;
|
||||
}
|
||||
{
|
||||
std::cerr << "Incorrect reduction from `" << f1s_before
|
||||
<< "' to `";
|
||||
print_psl(std::cerr, f1) << "'.\n";
|
||||
exit_code = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
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 `"
|
||||
<< f1s_before << "' to `" << f1l << "'." << std::endl;
|
||||
exit_code = 3;
|
||||
}
|
||||
}
|
||||
{
|
||||
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 `"
|
||||
<< f1s_before << "' to `" << f1l << "'." << std::endl;
|
||||
exit_code = 3;
|
||||
}
|
||||
}
|
||||
|
||||
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::str_psl(f2);
|
||||
}
|
||||
{
|
||||
ftmp1 = f2;
|
||||
f2 = simp_size->negative_normal_form(f2, false);
|
||||
f2s = spot::str_psl(f2);
|
||||
}
|
||||
|
||||
sum_before += length_f1_before;
|
||||
sum_after += length_f1_after;
|
||||
|
||||
// If -h is set, we want to print only formulae that have become larger.
|
||||
if (!f2 && (!hidereduc || (length_f1_after > length_f1_before)))
|
||||
{
|
||||
std::cout << length_f1_before << ' ' << length_f1_after
|
||||
<< " '" << f1s_before << "' reduce to '"
|
||||
<< f1s_after << '\'';
|
||||
if (f1l != "" && f1l != f1s_after)
|
||||
std::cout << " or (w/o rss) to '" << f1l << '\'';
|
||||
std::cout << '\n';
|
||||
}
|
||||
{
|
||||
std::cout << length_f1_before << ' ' << length_f1_after
|
||||
<< " '" << f1s_before << "' reduce to '"
|
||||
<< f1s_after << '\'';
|
||||
if (f1l != "" && f1l != f1s_after)
|
||||
std::cout << " or (w/o rss) to '" << f1l << '\'';
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
||||
if (f2)
|
||||
{
|
||||
if (f1 != f2)
|
||||
{
|
||||
if (length_f1_after < length_f1_before)
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " KOREDUC " << std::endl;
|
||||
else
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " KOIDEM " << std::endl;
|
||||
exit_code = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (f1s_before != f1s_after)
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " OKREDUC " << std::endl;
|
||||
else
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " OKIDEM" << std::endl;
|
||||
exit_code = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (f1 != f2)
|
||||
{
|
||||
if (length_f1_after < length_f1_before)
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " KOREDUC " << std::endl;
|
||||
else
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " KOIDEM " << std::endl;
|
||||
exit_code = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (f1s_before != f1s_after)
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " OKREDUC " << std::endl;
|
||||
else
|
||||
std::cout << f1s_before << " ** " << f2s << " ** " << f1s_after
|
||||
<< " OKIDEM" << std::endl;
|
||||
exit_code = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (length_f1_after > length_f1_before)
|
||||
exit_code = 1;
|
||||
}
|
||||
{
|
||||
if (length_f1_after > length_f1_before)
|
||||
exit_code = 1;
|
||||
}
|
||||
|
||||
if (fin)
|
||||
goto next_line;
|
||||
goto next_line;
|
||||
}
|
||||
end:
|
||||
|
||||
|
|
@ -300,11 +300,11 @@ main(int argc, char** argv)
|
|||
|
||||
if (fin)
|
||||
{
|
||||
float before = sum_before;
|
||||
float after = sum_after;
|
||||
std::cout << "gain: "
|
||||
<< (1 - (after / before)) * 100 << '%' << std::endl;
|
||||
delete fin;
|
||||
float before = sum_before;
|
||||
float after = sum_after;
|
||||
std::cout << "gain: "
|
||||
<< (1 - (after / before)) * 100 << '%' << std::endl;
|
||||
delete fin;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ int main(int argc, char* argv[])
|
|||
trans.set_pref(spot::postprocessor::Deterministic);
|
||||
auto tmp = trans.run(pf.f);
|
||||
res = spot::tgba_determinize(tmp, pretty_print, scc_opt,
|
||||
use_bisim, use_stutter);
|
||||
use_bisim, use_stutter);
|
||||
}
|
||||
else if (in_hoa)
|
||||
{
|
||||
|
|
@ -126,7 +126,7 @@ int main(int argc, char* argv[])
|
|||
if (aut->format_errors(std::cerr))
|
||||
return 2;
|
||||
res = tgba_determinize(aut->aut, pretty_print, scc_opt,
|
||||
use_bisim, use_stutter);
|
||||
use_bisim, use_stutter);
|
||||
}
|
||||
if (sim)
|
||||
res = simulation(res);
|
||||
|
|
|
|||
|
|
@ -66,33 +66,33 @@ main(int argc, char** argv)
|
|||
switch (opt)
|
||||
{
|
||||
case 0:
|
||||
std::cout << "Test f1 < f2" << std::endl;
|
||||
if (c->syntactic_implication(f1, f2))
|
||||
{
|
||||
std::cout << f1s << " < " << f2s << '\n';
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
std::cout << "Test f1 < f2" << std::endl;
|
||||
if (c->syntactic_implication(f1, f2))
|
||||
{
|
||||
std::cout << f1s << " < " << f2s << '\n';
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
std::cout << "Test !f1 < f2" << std::endl;
|
||||
if (c->syntactic_implication_neg(f1, f2, false))
|
||||
{
|
||||
std::cout << "!(" << f1s << ") < " << f2s << '\n';
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
std::cout << "Test !f1 < f2" << std::endl;
|
||||
if (c->syntactic_implication_neg(f1, f2, false))
|
||||
{
|
||||
std::cout << "!(" << f1s << ") < " << f2s << '\n';
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
std::cout << "Test f1 < !f2" << std::endl;
|
||||
if (c->syntactic_implication_neg(f1, f2, true))
|
||||
{
|
||||
std::cout << f1s << " < !(" << f2s << ")\n";
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
std::cout << "Test f1 < !f2" << std::endl;
|
||||
if (c->syntactic_implication_neg(f1, f2, true))
|
||||
{
|
||||
std::cout << f1s << " < !(" << f2s << ")\n";
|
||||
exit_return = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
f1.dump(std::cout) << '\n';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue