diff --git a/alib2algo/src/automaton/convert/ToRTEStateElimination.h b/alib2algo/src/automaton/convert/ToRTEStateElimination.h index 4ac0ee16aa6ed9eeaf220eac4a1e8ef5dc58765f..e6a80f9197fb9dcb202c2bf85efda66ec7f430a7 100644 --- a/alib2algo/src/automaton/convert/ToRTEStateElimination.h +++ b/alib2algo/src/automaton/convert/ToRTEStateElimination.h @@ -132,13 +132,13 @@ rte::FormalRTEStructure< ext::variant< SymbolType, StateType > > ToRTEStateElimi } template < class SymbolType, class StateType > -automaton::ExtendedNFTA< SymbolType, StateType > ToRTEStateElimination::eliminateState ( const automaton::ExtendedNFTA< SymbolType, StateType >& automaton, const StateType& q ) { +automaton::ExtendedNFTA< SymbolType, StateType > ToRTEStateElimination::eliminateState ( const automaton::ExtendedNFTA< SymbolType, StateType >& automaton, const StateType & state ) { // create state symbol in RTE's K alphabet - const rte::FormalRTESymbolSubst< ext::variant< SymbolType, StateType > > stateSymbol ( common::ranked_symbol< ext::variant< SymbolType, StateType > > ( q, 0 ) ); + const rte::FormalRTESymbolSubst< ext::variant< SymbolType, StateType > > stateSymbol ( common::ranked_symbol< ext::variant< SymbolType, StateType > > ( state, 0 ) ); // create new automaton, without state Q automaton::ExtendedNFTA< SymbolType, StateType > newAutomaton ( automaton.getStates ( ), automaton.getInputAlphabet ( ), automaton.getFinalStates ( ) ); - newAutomaton.removeState ( q ); // preserve all states but q (the one to eliminate) + newAutomaton.removeState ( state ); // preserve all states but state (the one to eliminate) // divide transitions into the following groups: // - loop(Q) - Q is in sources AND Q is a target @@ -159,8 +159,8 @@ automaton::ExtendedNFTA< SymbolType, StateType > ToRTEStateElimination::eliminat for ( const StateType& target : transition.second ) { const ext::vector< StateType >& src_states = transition.first.second; - const bool is_source = std::find ( src_states.begin ( ), src_states.end ( ), q ) != src_states.end ( ); - const bool is_target = target == q; + const bool is_source = std::find ( src_states.begin ( ), src_states.end ( ), state ) != src_states.end ( ); + const bool is_target = target == state; if ( is_source && is_target ) { // loop loop.push_back ( ext::make_pair ( transition.first, target ) ); @@ -193,7 +193,7 @@ automaton::ExtendedNFTA< SymbolType, StateType > ToRTEStateElimination::eliminat prevStates.insert ( prev_loop.begin ( ), prev_loop.end ( ) ); prevStates.insert ( prev_incoming.begin ( ), prev_incoming.end ( ) ); prevStates.insert ( tr_src_states.begin ( ), tr_src_states.end ( ) ); - prevStates.erase ( q ); + prevStates.erase ( state ); rte::FormalRTEStructure< ext::variant< SymbolType, StateType > > rte ( rte::FormalRTESubstitution< ext::variant< SymbolType, StateType > > (