spot: small factorisations, improvements and typos

* spot/tl/hierarchy.cc: Factorisations, improvements.
* spot/twaalgos/totgba.cc:  Typos.
This commit is contained in:
Alexandre GBAGUIDI AISSE 2017-10-10 15:20:08 +02:00
parent 2c059a1099
commit 1b4002401a
2 changed files with 3 additions and 4 deletions

View file

@ -41,9 +41,9 @@ namespace spot
twa_graph_ptr cobuchi = nullptr; twa_graph_ptr cobuchi = nullptr;
std::vector<acc_cond::rs_pair> pairs; std::vector<acc_cond::rs_pair> pairs;
if (aut->acc().is_streett_like(pairs) || aut->acc().is_parity()) if (aut->acc().is_streett_like(pairs) || aut->acc().is_parity())
cobuchi = nsa_to_dca(aut, false); cobuchi = nsa_to_nca(aut, false);
else if (aut->get_acceptance().is_dnf()) else if (aut->get_acceptance().is_dnf())
cobuchi = dnf_to_dca(aut, false); cobuchi = dnf_to_nca(aut, false);
else else
throw std::runtime_error("cobuchi_realizable() only works with " throw std::runtime_error("cobuchi_realizable() only works with "
"Streett-like, Parity or any " "Streett-like, Parity or any "
@ -107,7 +107,7 @@ namespace spot
{ {
if (aut_given && !is_persistence) if (aut_given && !is_persistence)
return prcheck::via_Rabin; return prcheck::via_Rabin;
else if ((aut_given && is_persistence) || !aut_given) else if (is_persistence || !aut_given)
return prcheck::via_CoBuchi; return prcheck::via_CoBuchi;
else else
SPOT_UNREACHABLE(); SPOT_UNREACHABLE();

View file

@ -84,7 +84,6 @@ namespace spot
if (code[s].sub.op == acc_cond::acc_op::And if (code[s].sub.op == acc_cond::acc_op::And
|| ((one_conjunction = root_op == acc_cond::acc_op::And))) || ((one_conjunction = root_op == acc_cond::acc_op::And)))
{ {
debug << "WABA" << std::endl;
s = one_conjunction ? s + 1 : s; s = one_conjunction ? s + 1 : s;
const unsigned short size = code[s].sub.size; const unsigned short size = code[s].sub.size;
acc_cond::mark_t fin = 0u; acc_cond::mark_t fin = 0u;