tgba: add a release_named_properties() method

Fixes #67.

* src/tgba/tgba.cc, src/tgba/tgba.hh: Here.
* src/tgbaalgos/complete.cc, src/tgbaalgos/stripacc.cc: Use it.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-22 12:05:05 +01:00
parent d1efe9a75a
commit c26457b02b
4 changed files with 21 additions and 6 deletions

View file

@ -61,6 +61,8 @@ namespace spot
}
}
unsigned t = aut->num_transitions();
// Now complete all states (including the sink).
for (unsigned i = 0; i < n; ++i)
{
@ -99,6 +101,13 @@ namespace spot
aut->new_transition(i, sink, missingcond, acc);
}
}
// Get rid of any named property if the automaton changed.
if (t < aut->num_transitions())
aut->release_named_properties();
else
assert(t == aut->num_transitions());
return sink;
}