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

optimize normalisation

parent 4f937eca
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 60 additions and 0 deletions
...@@ -75,6 +75,9 @@ public: ...@@ -75,6 +75,9 @@ public:
virtual SymbolBase * inc ( ) &&; virtual SymbolBase * inc ( ) &&;
   
virtual SymbolBase * normalize ( ) && { virtual SymbolBase * normalize ( ) && {
if ( typeid ( NonlinearVariableSymbol < > ) == typeid ( NonlinearVariableSymbol < SymbolType > ) )
return this;
return new NonlinearVariableSymbol < > ( SymbolNormalize::normalizeSymbol ( std::move ( this->getSymbol ( ) ) ) ); return new NonlinearVariableSymbol < > ( SymbolNormalize::normalizeSymbol ( std::move ( this->getSymbol ( ) ) ) );
} }
}; };
......
...@@ -71,6 +71,9 @@ public: ...@@ -71,6 +71,9 @@ public:
} }
   
virtual SymbolBase * normalize ( ) && { virtual SymbolBase * normalize ( ) && {
if ( typeid ( RankedSymbol < > ) == typeid ( RankedSymbol < SymbolType, RankType > ) )
return this;
return new RankedSymbol < > ( normalizeRaw ( std::move ( *this ) ) ); return new RankedSymbol < > ( normalizeRaw ( std::move ( *this ) ) );
} }
}; };
......
...@@ -184,6 +184,9 @@ public: ...@@ -184,6 +184,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( CompactNFA < > ) == typeid ( CompactNFA < SymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) );
......
...@@ -175,6 +175,9 @@ public: ...@@ -175,6 +175,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( DFA < > ) == typeid ( DFA < SymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) );
......
...@@ -277,6 +277,9 @@ public: ...@@ -277,6 +277,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( EpsilonNFA < > ) == typeid ( EpsilonNFA < SymbolType, EpsilonType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) );
......
...@@ -188,6 +188,9 @@ public: ...@@ -188,6 +188,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( ExtendedNFA < > ) == typeid ( ExtendedNFA < SymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) );
......
...@@ -202,6 +202,9 @@ public: ...@@ -202,6 +202,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( MultiInitialStateNFA < > ) == typeid ( MultiInitialStateNFA < SymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
std::set < DefaultStateType > initialStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < InitialStates > ( ).get ( ) ) ); std::set < DefaultStateType > initialStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < InitialStates > ( ).get ( ) ) );
......
...@@ -194,6 +194,9 @@ public: ...@@ -194,6 +194,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( NFA < > ) == typeid ( NFA < SymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) );
......
...@@ -209,6 +209,9 @@ public: ...@@ -209,6 +209,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( DPDA < > ) == typeid ( DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -213,6 +213,9 @@ public: ...@@ -213,6 +213,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( InputDrivenDPDA < > ) == typeid ( InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -222,6 +222,9 @@ public: ...@@ -222,6 +222,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( InputDrivenNPDA < > ) == typeid ( InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -207,6 +207,9 @@ public: ...@@ -207,6 +207,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( NPDA < > ) == typeid ( NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -231,6 +231,9 @@ public: ...@@ -231,6 +231,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( NPDTA < > ) == typeid ( NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > outputAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < OutputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > outputAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < OutputAlphabet > ( ).get ( ) ) );
......
...@@ -235,6 +235,9 @@ public: ...@@ -235,6 +235,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( RealTimeHeightDeterministicDPDA < > ) == typeid ( RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) );
......
...@@ -276,6 +276,9 @@ public: ...@@ -276,6 +276,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( RealTimeHeightDeterministicNPDA < > ) == typeid ( RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) );
......
...@@ -200,6 +200,9 @@ public: ...@@ -200,6 +200,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( SinglePopDPDA < > ) == typeid ( SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -207,6 +207,9 @@ public: ...@@ -207,6 +207,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( SinglePopNPDA < > ) == typeid ( SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) );
DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) );
......
...@@ -268,6 +268,9 @@ public: ...@@ -268,6 +268,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( VisiblyPushdownDPDA < > ) == typeid ( VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) );
......
...@@ -303,6 +303,9 @@ public: ...@@ -303,6 +303,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( VisiblyPushdownNPDA < > ) == typeid ( VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) )
return this;
std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) );
std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) );
......
...@@ -151,6 +151,9 @@ public: ...@@ -151,6 +151,9 @@ public:
virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * inc ( ) &&;
   
virtual AutomatonBase * normalize ( ) && { virtual AutomatonBase * normalize ( ) && {
if ( typeid ( DFTA < > ) == typeid ( DFTA < SymbolType, RankType, StateType > ) )
return this;
std::set < std::ranked_symbol < DefaultSymbolType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) );
std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) );
std::set < DefaultStateType > finalStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < FinalStates > ( ).get ( ) ) ); std::set < DefaultStateType > finalStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < FinalStates > ( ).get ( ) ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment