diff --git a/alib2algo/src/automaton/convert/ToRegExpKleene.h b/alib2algo/src/automaton/convert/ToRegExpKleene.h index c5f3da9aa7cff01b1a77c5ad0597a8fefdf8d937..f238b9d2e38378a829d7ce23861faee51ea9d160 100644 --- a/alib2algo/src/automaton/convert/ToRegExpKleene.h +++ b/alib2algo/src/automaton/convert/ToRegExpKleene.h @@ -97,17 +97,17 @@ private: * @return the regular expression node representing the transitions between states @p from and @p to */ template < class SymbolType, class EpsilonType, class StateType > - static const regexp::UnboundedRegExpStructure < SymbolType > transitionsToRegExp ( const automaton::MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType > & automaton, const StateType & from, const StateType & to ); + static regexp::UnboundedRegExpStructure < SymbolType > transitionsToRegExp ( const automaton::MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType > & automaton, const StateType & from, const StateType & to ); /** * @return Wrapper for map.at ( ) that returns default value of UnboundedRegExpEmpty if key does not exist */ template < class SymbolType, class StateType > - static const regexp::UnboundedRegExpStructure < SymbolType > RGetDefault ( const std::map < std::pair < StateType, StateType >, regexp::UnboundedRegExpStructure < SymbolType > > & R, const std::pair < StateType, StateType > & key ); + static regexp::UnboundedRegExpStructure < SymbolType > RGetDefault ( const std::map < std::pair < StateType, StateType >, regexp::UnboundedRegExpStructure < SymbolType > > & R, const std::pair < StateType, StateType > & key ); }; template < class SymbolType, class StateType > -const regexp::UnboundedRegExpStructure < SymbolType > ToRegExpKleene::RGetDefault ( const std::map < std::pair < StateType, StateType >, regexp::UnboundedRegExpStructure < SymbolType > > & R, const std::pair < StateType, StateType > & key ) { +regexp::UnboundedRegExpStructure < SymbolType > ToRegExpKleene::RGetDefault ( const std::map < std::pair < StateType, StateType >, regexp::UnboundedRegExpStructure < SymbolType > > & R, const std::pair < StateType, StateType > & key ) { auto it = R.find ( key ); return it != R.end ( ) ? it -> second : regexp::UnboundedRegExpStructure < SymbolType > ( regexp::UnboundedRegExpEmpty < SymbolType > ( ) ); } @@ -176,7 +176,7 @@ regexp::UnboundedRegExp < SymbolType > ToRegExpKleene::convert ( const automaton template < class SymbolType, class EpsilonType, class StateType > -const regexp::UnboundedRegExpStructure < SymbolType > ToRegExpKleene::transitionsToRegExp ( const automaton::MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType > & automaton, const StateType & from, const StateType & to ) { +regexp::UnboundedRegExpStructure < SymbolType > ToRegExpKleene::transitionsToRegExp ( const automaton::MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType > & automaton, const StateType & from, const StateType & to ) { regexp::UnboundedRegExpStructure < SymbolType > ret ( regexp::UnboundedRegExpEmpty < SymbolType > { } ); if ( from == to ) diff --git a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h index 2b4f3f3ede6b2ff422da622f1e402df1c69e14ab..9e6321f6ce308e15540f5eecf34c7cf832ea9966 100644 --- a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h +++ b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h @@ -4,7 +4,6 @@ #include "common/DefaultStateType.h" #include "common/DefaultSymbolType.h" #include "common/DefaultEpsilonType.h" -#include <alib/variant> #include <alib/set> #include <alib/map> #include "automaton/PDA/VisiblyPushdownDPDA.h" diff --git a/alib2algo/src/automaton/transform/AutomatonIterationEpsilonTransition.h b/alib2algo/src/automaton/transform/AutomatonIterationEpsilonTransition.h index 1853ec4effefb45423db058f1b7d87267fd82597..a7352bef6876203a355f2d3d895ee5310215afaf 100644 --- a/alib2algo/src/automaton/transform/AutomatonIterationEpsilonTransition.h +++ b/alib2algo/src/automaton/transform/AutomatonIterationEpsilonTransition.h @@ -40,9 +40,6 @@ public: /** * Iteration of a finite automaton using epsilon transitions. * @tparam T Type of the finite automaton. - * @tparam SymbolType Type for input symbols. - * @tparam EpsilonType Type for epsilon symbol. Defaults to DefaultEpsilonType. - * @tparam StateType Type for states. * @param automaton automaton to iterate * @return epsilon nondeterministic FA representing the intersection of @p automaton */ diff --git a/alib2aux/src/convert/DotConverter.h b/alib2aux/src/convert/DotConverter.h index 506deca5cd37e56f24dc77736166057ba90f9b75..7cc73bd0c4d51de255c8a4edf7c3c1adb2ff73a6 100644 --- a/alib2aux/src/convert/DotConverter.h +++ b/alib2aux/src/convert/DotConverter.h @@ -999,7 +999,7 @@ void DotConverter::transitions(const automaton::CompactNFA < SymbolType, StateTy //put transitions from automaton to "transitions" for (const auto& transition : fsm.getTransitions()) { - std::string symbol = replace ( factory::StringDataFactory::toString ( string::stringFrom ( transition.first.second ) ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( string::stringFrom ( transition.first.second ) ), "\"", "\\\"" ); std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second); ext::map<std::pair<int, int>, std::string>::iterator mapit = transitions.find(key); @@ -1034,7 +1034,7 @@ void DotConverter::transitions(const automaton::ExtendedNFTA < SymbolType, RankT // print subgraph with the rte out << '\n'; out << "subgraph cluster_rte_" << auxNodeCnt << "{" << '\n'; - out << "label=\"rte_" << auxNodeCnt << "\"\n"; + out << "label=\"rte_" << auxNodeCnt << "\"\n"; out << "color = blue;\n"; out << convert::DotConverterRTE::convertInternal ( rte::FormalRTE < ext::variant < SymbolType, StateType >, RankType > ( transition.first.first ), "x" + ext::to_string ( auxNodeCnt ) + "x" ); out << "}\n" << std::endl; @@ -1210,7 +1210,7 @@ void DotConverter::transitions(const automaton::DPDA < InputSymbolType, EpsilonT for (std::pair<const std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; replaceInplace(transition.second, "\n", "\\n"); - out << "[label=\"" << transition.second << "\"]\n"; + out << "[label=\"" << transition.second << "\"]\n"; } } diff --git a/alib2aux/src/convert/TikZConverter.h b/alib2aux/src/convert/TikZConverter.h index dd3cdf0bc98a50afb6c23c830cffad8137af5911..3445d52bc448489a7f9767b2ca5d53ba74597312 100644 --- a/alib2aux/src/convert/TikZConverter.h +++ b/alib2aux/src/convert/TikZConverter.h @@ -106,8 +106,8 @@ class TikZConverter { template < class SymbolType, class StateType > static void transitions(const automaton::OneTapeDTM < SymbolType, StateType > & tm, const ext::map < StateType, int > & states, std::ostream & out); - template<typename TGrid> - static void grid(std::ostream &out, const TGrid &a); + template<typename TGrid> + static void grid(std::ostream &out, const TGrid &a); public: template < class SymbolType, class StateType > @@ -167,25 +167,25 @@ public: template < class SymbolType, class StateType > static void convert(std::ostream& out, const automaton::OneTapeDTM < SymbolType, StateType > & a); - template<typename TCoordinate, typename TEdge> - static void convert(std::ostream &out, const grid::SquareGrid4<TCoordinate, TEdge> &a) { - return grid(out, a); - } + template<typename TCoordinate, typename TEdge> + static void convert(std::ostream &out, const grid::SquareGrid4<TCoordinate, TEdge> &a) { + return grid(out, a); + } - template<typename TCoordinate, typename TEdge> - static void convert(std::ostream &out, const grid::SquareGrid8<TCoordinate, TEdge> &a) { - return grid(out, a); - } + template<typename TCoordinate, typename TEdge> + static void convert(std::ostream &out, const grid::SquareGrid8<TCoordinate, TEdge> &a) { + return grid(out, a); + } - template<typename TCoordinate, typename TEdge> - static void convert(std::ostream &out, const grid::WeightedSquareGrid4<TCoordinate, TEdge> &a) { - return grid(out, a); - } + template<typename TCoordinate, typename TEdge> + static void convert(std::ostream &out, const grid::WeightedSquareGrid4<TCoordinate, TEdge> &a) { + return grid(out, a); + } - template<typename TCoordinate, typename TEdge> - static void convert(std::ostream &out, const grid::WeightedSquareGrid8<TCoordinate, TEdge> &a) { - return grid(out, a); - } + template<typename TCoordinate, typename TEdge> + static void convert(std::ostream &out, const grid::WeightedSquareGrid8<TCoordinate, TEdge> &a) { + return grid(out, a); + } template < class T > static std::string convert ( const T & automaton ) { @@ -216,7 +216,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::EpsilonNFA < if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -244,7 +244,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::MultiInitialS if ( a.getInitialStates ( ).count ( state.first ) ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -272,7 +272,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::NFA < SymbolT if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -300,7 +300,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::DFA < SymbolT if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -328,7 +328,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::ExtendedNFA < if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -356,7 +356,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::CompactNFA < if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -381,7 +381,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::NFTA < Symbol if ( a.getFinalStates ( ).count ( state.first ) ) mods += ",accepting"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -406,7 +406,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::DFTA < Symbol if ( a.getFinalStates ( ).count ( state.first ) ) mods += ",accepting"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -434,7 +434,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::DPDA < InputS if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -462,7 +462,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::SinglePopDPDA if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -490,7 +490,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::InputDrivenDP if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -518,7 +518,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::InputDrivenNP if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -546,7 +546,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::VisiblyPushdo if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -574,7 +574,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::VisiblyPushdo if ( a.getInitialStates ( ).count ( state.first ) ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -602,7 +602,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::RealTimeHeigh if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -630,7 +630,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::RealTimeHeigh if ( a.getInitialStates ( ).count ( state.first ) ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -658,7 +658,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::NPDA < InputS if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -686,7 +686,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::SinglePopNPDA if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -714,7 +714,7 @@ void TikZConverter::convert ( std::ostream & out, const automaton::OneTapeDTM < if ( a.getInitialState ( ) == state.first ) mods += ",initial"; - out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; + out << "\\node[state" + mods + "] (" << state.second << ") {" << replace ( factory::StringDataFactory::toString ( state.first ), "\"", "\\\"" ) << "}\n"; } transitions ( a, states, out ); @@ -732,7 +732,7 @@ void TikZConverter::transitions ( const automaton::EpsilonNFA < SymbolType, Epsi if ( transition.first.second.template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < SymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < SymbolType > ( ) ), "\"", "\\\"" ); std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second )->second ); ext::map < std::pair < int, int >, std::string >::iterator mapit = transitions.find ( key ); @@ -773,7 +773,7 @@ void TikZConverter::transitions ( const automaton::MultiInitialStateNFA < Symbol // put transitions from automaton to "transitions" for ( const auto & transition : fsm.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second )->second ); ext::map < std::pair < int, int >, std::string >::iterator mapit = transitions.find ( key ); @@ -814,7 +814,7 @@ void TikZConverter::transitions ( const automaton::NFA < SymbolType, StateType > // put transitions from automaton to "transitions" for ( const auto & transition : fsm.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second )->second ); ext::map < std::pair < int, int >, std::string >::iterator mapit = transitions.find ( key ); @@ -855,7 +855,7 @@ void TikZConverter::transitions ( const automaton::DFA < SymbolType, StateType > // put transitions from automaton to "transitions" for ( const auto & transition : fsm.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second )->second ); ext::map < std::pair < int, int >, std::string >::iterator mapit = transitions.find ( key ); @@ -896,7 +896,7 @@ void TikZConverter::transitions ( const automaton::ExtendedNFA < SymbolType, Sta // put transitions from automaton to "transitions" for ( const auto & transition : fsm.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second )->second ); ext::map < std::pair < int, int >, std::string >::iterator mapit = transitions.find ( key ); @@ -978,7 +978,7 @@ void TikZConverter::transitions ( const automaton::NFTA < SymbolType, RankType, // put transitions from automaton to "transitions" for ( const auto & transition : fta.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.first.getSymbol ( ) ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.first.getSymbol ( ) ), "\"", "\\\"" ); symbol += ext::to_string ( transition.first.first.getRank ( ) ); std::pair < int, ext::vector < int > > key ( states.find ( transition.second )->second, { } ); @@ -1042,7 +1042,7 @@ void TikZConverter::transitions ( const automaton::DFTA < SymbolType, RankType, // put transitions from automaton to "transitions" for ( const auto & transition : fta.getTransitions ( ) ) { - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.first.getSymbol ( ) ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.first.getSymbol ( ) ), "\"", "\\\"" ); symbol += ext::to_string ( transition.first.first.getRank ( ) ); std::pair < int, ext::vector < int > > key ( states.find ( transition.second )->second, { } ); @@ -1111,7 +1111,7 @@ void TikZConverter::transitions ( const automaton::DPDA < InputSymbolType, Epsil if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1120,7 +1120,7 @@ void TikZConverter::transitions ( const automaton::DPDA < InputSymbolType, Epsil symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : std::get < 2 > ( transition.first ) ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); symbol += " ->"; @@ -1129,7 +1129,7 @@ void TikZConverter::transitions ( const automaton::DPDA < InputSymbolType, Epsil symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : transition.second.second ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( std::get < 0 > ( transition.first ) )->second, states.find ( transition.second.first )->second ); @@ -1176,12 +1176,12 @@ void TikZConverter::transitions ( const automaton::SinglePopDPDA < InputSymbolTy if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; @@ -1190,7 +1190,7 @@ void TikZConverter::transitions ( const automaton::SinglePopDPDA < InputSymbolTy symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : transition.second.second ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( std::get < 0 > ( transition.first ) )->second, states.find ( transition.second.first )->second ); @@ -1237,7 +1237,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenDPDA < InputSymbol const auto & push = symbolToPDSOperation.find ( transition.first.second )->second.second; // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1246,7 +1246,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenDPDA < InputSymbol symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : pop ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); symbol += " ->"; @@ -1257,7 +1257,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenDPDA < InputSymbol symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : push ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( to )->second ); @@ -1304,7 +1304,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenNPDA < InputSymbol const auto & push = symbolToPDSOperation.find ( transition.first.second )->second.second; // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1313,7 +1313,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenNPDA < InputSymbol symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : pop ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); symbol += " ->"; @@ -1327,7 +1327,7 @@ void TikZConverter::transitions ( const automaton::InputDrivenNPDA < InputSymbol symbol2 += " ε"; else for ( const PushdownStoreSymbolType & symb : push ) - symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( to )->second ); @@ -1370,7 +1370,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownDPDA < InputSy for ( const auto & transition : pda.getCallTransitions ( ) ) { // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1378,7 +1378,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownDPDA < InputSy symbol += " ε"; symbol += " ->"; - symbol += " " + replace ( factory::StringDataFactory::toString ( transition.second.second ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( transition.second.second ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second.first )->second ); @@ -1404,12 +1404,12 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownDPDA < InputSy for ( const auto & transition : pda.getReturnTransitions ( ) ) { // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ) ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; symbol += " ε"; @@ -1438,7 +1438,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownDPDA < InputSy for ( const auto & transition : pda.getLocalTransitions ( ) ) { // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1488,7 +1488,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownNPDA < InputSy for ( const auto & transition : pda.getCallTransitions ( ) ) { // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1500,7 +1500,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownNPDA < InputSy for ( const auto & to : transition.second ) { symbol2 = symbol; - symbol2 += " " + replace ( factory::StringDataFactory::toString ( to.second ), "\"", "\\\"" ); + symbol2 += " " + replace ( factory::StringDataFactory::toString ( to.second ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( to.first )->second ); @@ -1527,12 +1527,12 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownNPDA < InputSy for ( const auto & transition : pda.getReturnTransitions ( ) ) { // input symbol - std::string symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ) ), "\"", "\\\"" ); + std::string symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; std::string symbol2; @@ -1568,7 +1568,7 @@ void TikZConverter::transitions ( const automaton::VisiblyPushdownNPDA < InputSy std::string symbol; // input symbol - symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += " |"; @@ -1628,7 +1628,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicDP if ( transition.first.second.template is < EpsilonType > ( ) ) symbol = "&epsilon"; else - symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1636,7 +1636,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicDP symbol += " ε"; symbol += " ->"; - symbol += " " + replace ( factory::StringDataFactory::toString ( transition.second.second ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( transition.second.second ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( transition.second.first )->second ); @@ -1667,12 +1667,12 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicDP if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "&epsilon"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; symbol += " ε"; @@ -1706,7 +1706,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicDP if ( transition.first.second.template is < EpsilonType > ( ) ) symbol = "&epsilon"; else - symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1761,7 +1761,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicNP if ( transition.first.second.template is < EpsilonType > ( ) ) symbol = "&epsilon"; else - symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1773,7 +1773,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicNP for ( const auto & to : transition.second ) { symbol2 = symbol; - symbol2 += " " + replace ( factory::StringDataFactory::toString ( to.second ), "\"", "\\\"" ); + symbol2 += " " + replace ( factory::StringDataFactory::toString ( to.second ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( transition.first.first )->second, states.find ( to.first )->second ); @@ -1805,12 +1805,12 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicNP if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; std::string symbol2; @@ -1849,7 +1849,7 @@ void TikZConverter::transitions ( const automaton::RealTimeHeightDeterministicNP if ( transition.first.second.template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( transition.first.second.template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1909,7 +1909,7 @@ void TikZConverter::transitions ( const automaton::NPDA < InputSymbolType, Epsil if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; @@ -1918,7 +1918,7 @@ void TikZConverter::transitions ( const automaton::NPDA < InputSymbolType, Epsil symbol += " ε"; else for ( const PushdownStoreSymbolType & symb : std::get < 2 > ( transition.first ) ) - symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); symbol += " ->"; @@ -1932,7 +1932,7 @@ void TikZConverter::transitions ( const automaton::NPDA < InputSymbolType, Epsil symbol2 += " ε"; else for ( const PushdownStoreSymbolType & symb : to.second ) - symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( std::get < 0 > ( transition.first ) )->second, states.find ( to.first )->second ); @@ -1980,12 +1980,12 @@ void TikZConverter::transitions ( const automaton::SinglePopNPDA < InputSymbolTy if ( std::get < 1 > ( transition.first ).template is < EpsilonType > ( ) ) symbol = "ε"; else - symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); + symbol = replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.first ).template get < InputSymbolType > ( ) ), "\"", "\\\"" ); symbol += " |"; // Pop part - symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); + symbol += " " + replace ( factory::StringDataFactory::toString ( std::get < 2 > ( transition.first ) ), "\"", "\\\"" ); symbol += " ->"; @@ -1999,7 +1999,7 @@ void TikZConverter::transitions ( const automaton::SinglePopNPDA < InputSymbolTy symbol2 += " ε"; else for ( const PushdownStoreSymbolType & symb : to.second ) - symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); + symbol2 += " " + replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ); // Insert into map std::pair < int, int > key ( states.find ( std::get < 0 > ( transition.first ) )->second, states.find ( to.first )->second ); @@ -2045,9 +2045,9 @@ void TikZConverter::transitions ( const automaton::OneTapeDTM < SymbolType, Stat // input symbol symbol = "("; - symbol += replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); + symbol += replace ( factory::StringDataFactory::toString ( transition.first.second ), "\"", "\\\"" ); symbol += ", "; - symbol += replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.second ) ), "\"", "\\\"" ); + symbol += replace ( factory::StringDataFactory::toString ( std::get < 1 > ( transition.second ) ), "\"", "\\\"" ); symbol += " "; switch ( std::get < 2 > ( transition.second ) ) { diff --git a/alib2xml/src/core/xmlApi.cpp b/alib2xml/src/core/xmlApi.cpp index caa4332c331a6ea77152f6e99f5b6ca52824240d..569715b34deea4753c3224ba4ce04c0968b093e1 100644 --- a/alib2xml/src/core/xmlApi.cpp +++ b/alib2xml/src/core/xmlApi.cpp @@ -97,7 +97,7 @@ bool xmlApi < object::Object >::first ( const ext::deque < sax::Token >::const_i std::string xmlApi < object::Object >::xmlTagName ( ) { std::string target = ext::to_string < object::Object > ( ); - throw ::exception::CommonException ( "Type " + target + " does not have xmlTagName." ); + throw exception::CommonException ( "Type " + target + " does not have xmlTagName." ); } void xmlApi < object::Object >::composeRef ( xmlApiOutputContext & output, typename ext::map < object::Object, int >::iterator & elem ) {