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:
parent
da6fc955a3
commit
b3ee68310f
11 changed files with 24 additions and 38 deletions
|
|
@ -177,16 +177,15 @@ namespace spot
|
|||
|
||||
graph_t::state get_init_state_number() const
|
||||
{
|
||||
// If the kripke has no state, it has no initial state.
|
||||
if (num_states() == 0)
|
||||
const_cast<graph_t&>(g_).new_state();
|
||||
throw std::runtime_error("kripke has no state at all");
|
||||
return init_number_;
|
||||
}
|
||||
|
||||
virtual const kripke_graph_state* get_init_state() const override
|
||||
{
|
||||
if (num_states() == 0)
|
||||
const_cast<graph_t&>(g_).new_state();
|
||||
return state_from_number(init_number_);
|
||||
return state_from_number(get_init_state_number());
|
||||
}
|
||||
|
||||
/// \brief Allow to get an iterator on the state we passed in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue