degen: do not mark initial trivial SCCs as accepting
Doing so is not wrong, but it's superfluous, and the extra accepting state will cause additional work in emptiness checks based on NDFS. Report from Jan Strejček. * src/tgbaalgos/degen.cc: Here. * src/tgbatest/degenid.test: Add a test case.
This commit is contained in:
parent
54a8ce502d
commit
6e8170e386
2 changed files with 36 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ namespace spot
|
|||
acc_cond::mark_t common = a_->acc().all_sets();
|
||||
acc_cond::mark_t union_ = 0U;
|
||||
bool has_acc_self_loop = false;
|
||||
bool seen = false;
|
||||
for (auto& t: a_->out(s))
|
||||
{
|
||||
// Ignore transitions that leave the SCC of s.
|
||||
|
|
@ -85,7 +86,10 @@ namespace spot
|
|||
|
||||
// an accepting self-loop?
|
||||
has_acc_self_loop |= (t.dst == s) && a_->acc().accepting(t.acc);
|
||||
seen = true;
|
||||
}
|
||||
if (!seen)
|
||||
common = 0U;
|
||||
cache_[s] = std::make_tuple(common, union_, has_acc_self_loop);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue