acc: simplify interface using operators

* spot/twa/acc.hh, spot/twa/acc.cc: Here.  Also remove
some redundant functions.
* spot/parseaut/parseaut.yy, spot/priv/accmap.hh, spot/tests/acc.cc,
spot/tests/twagraph.cc, spot/twa/taatgba.hh, spot/twa/twaproduct.cc,
spot/twaalgos/dtwasat.cc, spot/twaalgos/hoa.cc, spot/twaalgos/lbtt.cc,
spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/product.cc,
spot/twaalgos/remfin.cc, spot/twaalgos/simulation.cc,
spot/twaalgos/tau03opt.cc, spot/twaalgos/weight.cc,
spot/twaalgos/weight.hh: Adjust.
* NEWS: Mention the changes.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-16 18:49:11 +01:00
parent c39d35d068
commit 4993e80706
19 changed files with 161 additions and 154 deletions

View file

@ -70,16 +70,14 @@ namespace spot
}
std::ostream&
emit_acc(std::ostream& os,
const const_twa_graph_ptr& aut,
acc_cond::mark_t b)
emit_acc(std::ostream& os, acc_cond::mark_t b)
{
// FIXME: We could use a cache for this.
if (b == 0U)
return os;
os << " {";
bool notfirst = false;
for (auto v: aut->acc().sets(b))
for (auto v: b.sets())
{
if (notfirst)
os << ' ';
@ -492,7 +490,7 @@ namespace spot
acc = t.acc;
break;
}
md.emit_acc(os, aut, acc);
md.emit_acc(os, acc);
}
os << nl;
@ -503,7 +501,7 @@ namespace spot
{
os << '[' << md.sup[t.cond] << "] " << t.dst;
if (this_acc == Hoa_Acceptance_Transitions)
md.emit_acc(os, aut, t.acc);
md.emit_acc(os, t.acc);
os << nl;
}
}
@ -515,7 +513,7 @@ namespace spot
os << t.dst;
if (this_acc == Hoa_Acceptance_Transitions)
{
md.emit_acc(os, aut, t.acc);
md.emit_acc(os, t.acc);
os << nl;
}
else
@ -561,7 +559,7 @@ namespace spot
os << out[i];
if (this_acc != Hoa_Acceptance_States)
{
md.emit_acc(os, aut, outm[i]) << nl;
md.emit_acc(os, outm[i]) << nl;
++i;
}
else