Automata with no state are no longer allowed.

* NEWS, spot/twa/twa.hh: Document the change.
* spot/twa/twagraph.hh, spot/kripke/kripkegraph.hh:
  Add an exception in get_init_state_number().
  get_init_state() now calls get_init_state_number().
* spot/twa/twagraph.cc, spot/twaalgos/simulation.cc,
  spot/twaalgos/powerset.cc, spot/twaalgos/complete.cc,
  spot/twaalgos/sccfilter.cc: Remove now useless tests.
* spot/twaalgos/hoa.cc: Remove now useless comment.
* spot/twaalgos/minimize.cc: Never return an automaton with no state.
This commit is contained in:
Maximilien Colange 2016-11-25 13:42:13 +01:00
parent da6fc955a3
commit b3ee68310f
11 changed files with 24 additions and 38 deletions

View file

@ -312,16 +312,13 @@ namespace spot
}
}
// Calling get_init_state_number() may add a state to empty
// automata, so it has to be done first.
unsigned init = aut->get_init_state_number();
metadata md(aut, implicit_labels, state_labels);
if (acceptance == Hoa_Acceptance_States && !md.has_state_acc)
acceptance = Hoa_Acceptance_Transitions;
unsigned num_states = aut->num_states();
unsigned init = aut->get_init_state_number();
const char nl = newline ? '\n' : ' ';
os << (v1_1 ? "HOA: v1.1" : "HOA: v1") << nl;