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:
parent
cfcc18e680
commit
b09c293f1a
57 changed files with 333 additions and 308 deletions
|
|
@ -115,8 +115,8 @@ extern "C" int strverscmp(const char *s1, const char *s2);
|
|||
spot::location state_label_loc;
|
||||
spot::location accset_loc;
|
||||
spot::acc_cond::mark_t acc_state;
|
||||
spot::acc_cond::mark_t neg_acc_sets = 0U;
|
||||
spot::acc_cond::mark_t pos_acc_sets = 0U;
|
||||
spot::acc_cond::mark_t neg_acc_sets = {};
|
||||
spot::acc_cond::mark_t pos_acc_sets = {};
|
||||
int plus;
|
||||
int minus;
|
||||
std::vector<std::string>* state_names = nullptr;
|
||||
|
|
@ -1366,19 +1366,19 @@ acc-sig: '{' acc-sets '}'
|
|||
}
|
||||
acc-sets:
|
||||
{
|
||||
$$ = spot::acc_cond::mark_t(0U);
|
||||
$$ = spot::acc_cond::mark_t({});
|
||||
}
|
||||
| acc-sets acc-set
|
||||
{
|
||||
if (res.ignore_acc || $2 == -1U)
|
||||
$$ = spot::acc_cond::mark_t(0U);
|
||||
$$ = spot::acc_cond::mark_t({});
|
||||
else
|
||||
$$ = $1 | res.aut_or_ks->acc().mark($2);
|
||||
}
|
||||
|
||||
state-acc_opt:
|
||||
{
|
||||
$$ = spot::acc_cond::mark_t(0U);
|
||||
$$ = spot::acc_cond::mark_t({});
|
||||
}
|
||||
| acc-sig
|
||||
{
|
||||
|
|
@ -1393,7 +1393,7 @@ state-acc_opt:
|
|||
}
|
||||
trans-acc_opt:
|
||||
{
|
||||
$$ = spot::acc_cond::mark_t(0U);
|
||||
$$ = spot::acc_cond::mark_t({});
|
||||
}
|
||||
| acc-sig
|
||||
{
|
||||
|
|
@ -1686,7 +1686,7 @@ sign: '+' { $$ = res.plus; }
|
|||
// Membership to a pair is represented as (+NUM,-NUM)
|
||||
dstar_accsigs:
|
||||
{
|
||||
$$ = 0U;
|
||||
$$ = spot::acc_cond::mark_t({});
|
||||
}
|
||||
| dstar_accsigs sign INT
|
||||
{
|
||||
|
|
@ -1830,7 +1830,7 @@ nc-state:
|
|||
res.accept_all_seen = true;
|
||||
|
||||
auto acc = !strncmp("accept", $1->c_str(), 6) ?
|
||||
res.h->aut->acc().all_sets() : spot::acc_cond::mark_t(0U);
|
||||
res.h->aut->acc().all_sets() : spot::acc_cond::mark_t({});
|
||||
res.namer->new_edge(*$1, *$1, bddtrue, acc);
|
||||
delete $1;
|
||||
}
|
||||
|
|
@ -1839,7 +1839,7 @@ nc-state:
|
|||
| nc-ident-list nc-transition-block
|
||||
{
|
||||
auto acc = !strncmp("accept", $1->c_str(), 6) ?
|
||||
res.h->aut->acc().all_sets() : spot::acc_cond::mark_t(0U);
|
||||
res.h->aut->acc().all_sets() : spot::acc_cond::mark_t({});
|
||||
for (auto& p: *$2)
|
||||
{
|
||||
bdd c = bdd_from_int(p.first);
|
||||
|
|
@ -2041,7 +2041,7 @@ lbtt-state: STATE_NUM INT lbtt-acc
|
|||
std::vector<unsigned>{res.cur_state});
|
||||
res.acc_state = $3;
|
||||
}
|
||||
lbtt-acc: { $$ = 0U; }
|
||||
lbtt-acc: { $$ = spot::acc_cond::mark_t({}); }
|
||||
| lbtt-acc ACC
|
||||
{
|
||||
$$ = $1;
|
||||
|
|
@ -2183,7 +2183,7 @@ fix_acceptance_aux(spot::acc_cond& acc,
|
|||
{
|
||||
auto m = in[pos - 1].mark;
|
||||
auto c = acc.fin(onlyneg & m);
|
||||
spot::acc_cond::mark_t tmp = 0U;
|
||||
spot::acc_cond::mark_t tmp = {};
|
||||
for (auto i: both.sets())
|
||||
{
|
||||
if (m.has(i))
|
||||
|
|
@ -2198,7 +2198,7 @@ fix_acceptance_aux(spot::acc_cond& acc,
|
|||
{
|
||||
auto m = in[pos - 1].mark;
|
||||
auto c = acc.inf(onlyneg & m);
|
||||
spot::acc_cond::mark_t tmp = 0U;
|
||||
spot::acc_cond::mark_t tmp = {};
|
||||
for (auto i: both.sets())
|
||||
{
|
||||
if (m.has(i))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue