Clean the usage of spot::acc_cond::mark_t

spot::acc_cond::mark_t is implemented as a bit vector using a single
unsigned, and implicit conversions between mark_t and unsigned may be
confusing. We try to use the proper interface.

* bin/autfilt.cc, bin/ltlsynt.cc, spot/kripke/kripke.cc,
  spot/misc/game.hh, spot/parseaut/parseaut.yy, spot/priv/accmap.hh,
  spot/ta/ta.cc, spot/ta/taexplicit.cc, spot/ta/taproduct.cc,
  spot/taalgos/emptinessta.cc, spot/taalgos/tgba2ta.cc, spot/twa/acc.cc,
  spot/twa/acc.hh, spot/twa/taatgba.cc, spot/twa/taatgba.hh,
  spot/twa/twagraph.hh, spot/twaalgos/alternation.cc,
  spot/twaalgos/cleanacc.cc, spot/twaalgos/cobuchi.cc,
  spot/twaalgos/complete.cc, spot/twaalgos/couvreurnew.cc,
  spot/twaalgos/degen.cc, spot/twaalgos/dot.cc,
  spot/twaalgos/dtwasat.cc, spot/twaalgos/dualize.cc,
  spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/ce.cc,
  spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gtec/sccstack.cc,
  spot/twaalgos/gv04.cc, spot/twaalgos/hoa.cc, spot/twaalgos/lbtt.cc,
  spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/magic.cc,
  spot/twaalgos/ndfs_result.hxx, spot/twaalgos/rabin2parity.cc,
  spot/twaalgos/randomgraph.cc, spot/twaalgos/remfin.cc,
  spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc,
  spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh,
  spot/twaalgos/se05.cc, spot/twaalgos/sepsets.cc,
  spot/twaalgos/simulation.cc, spot/twaalgos/strength.cc,
  spot/twaalgos/stripacc.cc, spot/twaalgos/stutter.cc,
  spot/twaalgos/sum.cc, spot/twaalgos/tau03.cc,
  spot/twaalgos/tau03opt.cc, spot/twaalgos/totgba.cc,
  spot/twaalgos/toweak.cc, python/spot/impl.i, tests/core/acc.cc,
  tests/core/twagraph.cc: do not confuse mark_t and unsigned
* tests/python/acc_cond.ipynb: warn about possible change of the API
This commit is contained in:
Maximilien Colange 2018-03-02 16:15:19 +01:00
parent cfcc18e680
commit b09c293f1a
57 changed files with 333 additions and 308 deletions

View file

@ -58,8 +58,9 @@ namespace spot
}
acc_cond::mark_t in_acc; // Acceptance sets on the incoming transition
acc_cond::mark_t acc = 0U; // union of all acceptance marks in the SCC
acc_cond::mark_t common = -1U; // intersection of all marks in the SCC
acc_cond::mark_t acc = {}; // union of all acceptance marks in the SCC
// intersection of all marks in the SCC
acc_cond::mark_t common = acc_cond::mark_t::all();
int index; // Index of the SCC
bool trivial = true; // Whether the SCC has no cycle
bool accepting = false; // Necessarily accepting
@ -205,7 +206,7 @@ namespace spot
continue;
assert(spi == 0);
h_[init] = --num_;
root_.emplace_back(num_, 0U);
root_.emplace_back(num_, acc_cond::mark_t({}));
todo_.emplace(stack_item{init, gr.state_storage(init).succ, 0});
live.emplace_back(init);
@ -568,7 +569,7 @@ namespace spot
// Get all Fin acceptance set that appears in the SCC and does not have
// their corresponding Inf appearing in the SCC.
acc_cond::mark_t m = 0u;
acc_cond::mark_t m = {};
if (fin)
for (unsigned p = 0; p < nb_pairs; ++p)
if (fin & pairs[p].fin && !(inf & pairs[p].inf))
@ -617,8 +618,8 @@ namespace spot
for (unsigned i = 0; i < nb_states; ++i)
old.push_back(i);
acc_cond::mark_t all_fin = 0U;
acc_cond::mark_t all_inf = 0U;
acc_cond::mark_t all_fin = {};
acc_cond::mark_t all_inf = {};
std::tie(all_inf, all_fin) = aut_->get_acceptance().used_inf_fin_sets();
states_on_acc_cycle_of_rec(scc, all_fin, all_inf, nb_pairs, pairs, res,