acc: move unsat_mark in acc_cond

so that we can optimize it when no Fin are used

* spot/twa/acc.cc, spot/twa/acc.hh: Do it.
* spot/twaalgos/complete.cc, spot/twaalgos/strength.cc: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-09 11:21:41 +01:00
parent 2d3e7cecf5
commit 9bbcf85b3a
4 changed files with 17 additions and 25 deletions

View file

@ -34,7 +34,7 @@ namespace spot
// UM is a pair (bool, mark). If the Boolean is false, the
// acceptance is always satisfiable. Otherwise, MARK is an
// example of unsatisfiable mark.
auto um = aut->get_acceptance().unsat_mark();
auto um = aut->acc().unsat_mark();
if (!um.first)
{
// We cannot safely complete an automaton if its

View file

@ -171,26 +171,15 @@ namespace spot
(std::string("unknown option for decompose_strength(): ") + c);
}
auto p = aut->acc().unsat_mark();
bool all_accepting = !p.first;
acc_cond::mark_t wacc = 0U; // Acceptance for weak SCCs
acc_cond::mark_t uacc = 0U; // Acceptance for "needed" SCCs, that
// we only want to traverse.
acc_cond::mark_t uacc = p.second; // Acceptance for "needed" SCCs, that
// we only want to traverse.
// If the acceptance condition is always satisfiable, we will
// consider the automaton has weak (even if that is not the
// consider the automaton as weak (even if that is not the
// case syntactically) and not output any strong part.
bool all_accepting = false;
if (aut->acc().is_tt())
{
all_accepting = true;
}
else if (aut->acc().uses_fin_acceptance())
{
auto p = aut->get_acceptance().unsat_mark();
if (p.first)
uacc = p.second;
else
all_accepting = true;
}
if (all_accepting)
{
keep &= ~Strong;