graph: let transitions() iterate only on valid transitions
This fixes #6. * src/graph/graph.hh: Rename the old transitions() as transition_vector(), and implement a new transitions() that iterates only on non-dead transitions. * src/tgba/tgbagraph.hh, src/tgba/tgbagraph.cc, src/graph/ngraph.hh: Adjust wrappers. * src/hoaparse/hoaparse.yy, src/tgbaalgos/complete.cc, src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/randomize.cc, src/tgbaalgos/safety.cc: Adjust calls.
This commit is contained in:
parent
8014833ae3
commit
fbbf584bbb
10 changed files with 147 additions and 17 deletions
|
|
@ -953,7 +953,7 @@ static void fix_acceptance(result_& r)
|
|||
// If a set x appears only as Inf(!x), we can complement it so that
|
||||
// we work with Inf(x) instead.
|
||||
auto onlyneg = r.neg_acc_sets - r.pos_acc_sets;
|
||||
for (auto& t: r.h->aut->transitions())
|
||||
for (auto& t: r.h->aut->transition_vector())
|
||||
t.acc ^= onlyneg;
|
||||
|
||||
// However if set x is used elsewhere, for instance in
|
||||
|
|
@ -968,7 +968,7 @@ static void fix_acceptance(result_& r)
|
|||
auto v = acc.sets(both);
|
||||
auto vs = v.size();
|
||||
unsigned base = acc.add_sets(vs);
|
||||
for (auto& t: r.h->aut->transitions())
|
||||
for (auto& t: r.h->aut->transition_vector())
|
||||
if ((t.acc & both) != both)
|
||||
for (unsigned i = 0; i < vs; ++i)
|
||||
if (!t.acc.has(i))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue