tgbagraph: fix detection of dead transitions
* src/graph/graph.hh (digraph::digraph): Mark transition 0 as dead. (digraph::is_dead_transition): Fix prototype. * src/tgba/tgbagraph.hh (tgba_digraph::is_dead_transition): Fix prototype.
This commit is contained in:
parent
645ecce1c9
commit
1696fac80c
2 changed files with 4 additions and 3 deletions
|
|
@ -415,6 +415,8 @@ namespace spot
|
||||||
// Transition number 0 is not used, because we use this index
|
// Transition number 0 is not used, because we use this index
|
||||||
// to mark the absence of a transition.
|
// to mark the absence of a transition.
|
||||||
transitions_.resize(1);
|
transitions_.resize(1);
|
||||||
|
// This causes transition 0 to be considered as dead.
|
||||||
|
transitions_[0].next_succ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned num_states() const
|
unsigned num_states() const
|
||||||
|
|
@ -604,7 +606,7 @@ namespace spot
|
||||||
return transitions_[t].next_succ == t;
|
return transitions_[t].next_succ == t;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_dead_transition(trans_storage_t& t) const
|
bool is_dead_transition(const trans_storage_t& t) const
|
||||||
{
|
{
|
||||||
return t.next_succ == index_of_transition(t);
|
return t.next_succ == index_of_transition(t);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -361,8 +361,7 @@ namespace spot
|
||||||
auto transitions()
|
auto transitions()
|
||||||
SPOT_RETURN(g_.transitions());
|
SPOT_RETURN(g_.transitions());
|
||||||
|
|
||||||
template<typename T>
|
auto is_dead_transition(const graph_t::trans_storage_t& t) const
|
||||||
auto is_dead_transition(T t) const
|
|
||||||
SPOT_RETURN(g_.is_dead_transition(t));
|
SPOT_RETURN(g_.is_dead_transition(t));
|
||||||
|
|
||||||
/// \brief Copy the acceptance conditions of another tgba.
|
/// \brief Copy the acceptance conditions of another tgba.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue