complete: add support for alternating autamata
* spot/twaalgos/complete.cc: Do not use the initial state as a sink if it is universal. * tests/core/complete.test: Add a test case.
This commit is contained in:
parent
f1b8d5f1d4
commit
071d819c49
2 changed files with 56 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ namespace spot
|
|||
{
|
||||
bool sinkable = true;
|
||||
bool first = true;
|
||||
acc_cond::mark_t commonacc = 0U;
|
||||
acc_cond::mark_t commonacc = um.second;
|
||||
for (auto& t: aut->out(i))
|
||||
{
|
||||
if (t.dst != i) // Not a self-loop
|
||||
|
|
@ -80,11 +80,12 @@ namespace spot
|
|||
|
||||
unsigned t = aut->num_edges();
|
||||
|
||||
// If the automaton is empty, pretend that state 0 is a sink.
|
||||
if (t == 0)
|
||||
// If the automaton is empty, and the initial state is not
|
||||
// universal, pretend this is the sink.
|
||||
if (t == 0 && !aut->is_univ_dest(aut->get_init_state_number()))
|
||||
sink = aut->get_init_state_number();
|
||||
|
||||
// Now complete all states (excluding any newly added the sink).
|
||||
// Now complete all states (excluding any newly added sink).
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
{
|
||||
bdd missingcond = bddtrue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue