tgba_digraph: add a copy constructor, and obsolete dupexp
* src/tgba/tgbagraph.hh, src/tgba/tgbagraph.cc: Add a copy constructor, and some method to purge unreachable states. * src/graph/graph.hh (defrag_states): Erase transition of removed states. * src/tgbaalgos/complete.cc, src/tgbaalgos/compsusp.cc, src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/simulation.cc, src/tgbatest/checkpsl.cc, src/tgbatest/emptchk.cc, src/tgbatest/ltl2tgba.cc: Adjust to use make_tgba_digraph() instead of tgba_dupexp_dfs() or tgba_dupexp_bfs(). * src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh: Use make_tgba_digraph() when possible. * src/tgbatest/det.test, src/tgbatest/sim.test: Adjust expected results.
This commit is contained in:
parent
971788fdbe
commit
923785f76a
14 changed files with 128 additions and 27 deletions
|
|
@ -656,8 +656,18 @@ namespace spot
|
|||
for (state s = 0; s < send; ++s)
|
||||
{
|
||||
state dst = newst[s];
|
||||
if (dst == s || dst == -1U)
|
||||
if (dst == s)
|
||||
continue;
|
||||
if (dst == -1U)
|
||||
{
|
||||
// This is an erased state. Mark all its transitions as
|
||||
// dead (i.e., t.next_succ should point to t for each of
|
||||
// them).
|
||||
auto t = states_[s].succ;
|
||||
while (t)
|
||||
std::swap(t, transitions_[t].next_succ);
|
||||
continue;
|
||||
}
|
||||
states_[dst] = std::move(states_[s]);
|
||||
}
|
||||
states_.resize(used_states);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue