Skip to content
Snippets Groups Projects
Commit da58f4e9 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

tidy: match parameter name in function declaration and definition

parent bf47751c
No related branches found
No related tags found
1 merge request!200clang tidy fixes
......@@ -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 > > (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment