diff --git a/alib2data/src/automaton/AutomatonFeatures.h b/alib2data/src/automaton/AutomatonFeatures.h deleted file mode 100644 index 45eedc29f83b3c86c5ebf73b0b18324e5701c23d..0000000000000000000000000000000000000000 --- a/alib2data/src/automaton/AutomatonFeatures.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * AutomatonFeatures.h - * - * Created on: Jun 19, 2014 - * Author: Jan Travnicek - */ - -#ifndef AUTOMATON_FEATURES_H_ -#define AUTOMATON_FEATURES_H_ - -#include <common/DefaultStateType.h> -#include <common/DefaultEpsilonType.h> -#include <common/DefaultSymbolType.h> -#include <common/DefaultRankType.h> - -namespace automaton { - -class Automaton; -class AutomatonBase; -enum class Shift; - -template<class SymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class StateType = DefaultStateType > -class MultiInitialStateEpsilonNFA; -template<class SymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class StateType = DefaultStateType > -class EpsilonNFA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class NFA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class MultiInitialStateNFA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class DFA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class CompactNFA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class ExtendedNFA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class DPDA; -template<class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class InputDrivenDPDA; -template<class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class InputDrivenNPDA; -template<class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class VisiblyPushdownDPDA; -template<class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class VisiblyPushdownNPDA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class RealTimeHeightDeterministicDPDA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class RealTimeHeightDeterministicNPDA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class NPDA; -template<class InputSymbolType = DefaultSymbolType, class OutputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class NPDTA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class SinglePopDPDA; -template<class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class SinglePopNPDA; -template<class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > -class OneTapeDTM; -template<class SymbolType = DefaultSymbolType, class RankType = DefaultRankType, class StateType = DefaultStateType > -class DFTA; -template<class SymbolType = DefaultSymbolType, class RankType = DefaultRankType, class StateType = DefaultStateType > -class NFTA; - -} /* namespace automaton */ - -#endif /* AUTOMATON_FEATURES_H_ */ diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h index a4f1fbf8a92e413d30843c8bb07acff174326800..62cf680ae6760c765d837bf9497478aa709eefd6 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.h +++ b/alib2data/src/automaton/FSM/CompactNFA.h @@ -34,15 +34,23 @@ #include <common/createUnique.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> #include <label/InitialStateLabel.h> +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> + #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "MultiInitialStateEpsilonNFA.h" +#include "EpsilonNFA.h" +#include "MultiInitialStateNFA.h" +#include "NFA.h" +#include "DFA.h" namespace automaton { @@ -67,7 +75,7 @@ class InitialState; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class CompactNFA final : public AutomatonBase, public core::Components < CompactNFA < SymbolType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times a list of input symbols on the left hand side to a set of states. @@ -435,16 +443,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "MultiInitialStateEpsilonNFA.h" -#include "EpsilonNFA.h" -#include "MultiInitialStateNFA.h" -#include "NFA.h" -#include "DFA.h" - -namespace automaton { - template < class SymbolType, class StateType > CompactNFA < SymbolType, StateType >::CompactNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates ) : core::Components < CompactNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) { } diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h index abbe2f723a1a1195cf3cf91a01fd1e925506c223..2111bd08eebbba6f916857c2effc5b76f5defada 100644 --- a/alib2data/src/automaton/FSM/DFA.h +++ b/alib2data/src/automaton/FSM/DFA.h @@ -33,13 +33,15 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -67,7 +69,7 @@ class InitialState; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class DFA final : public AutomatonBase, public core::Components < DFA < SymbolType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times an input symbol on the left hand side to a state. diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h index f0b7e8708690ea8f17566bc886d2c5d38545342f..3aedb47a822d1de511a4f6b8b7a5c61a2e370b26 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.h +++ b/alib2data/src/automaton/FSM/EpsilonNFA.h @@ -34,15 +34,22 @@ #include <common/createUnique.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <label/InitialStateLabel.h> -#include "../../label/InitialStateLabel.h" +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "MultiInitialStateNFA.h" +#include "NFA.h" +#include "DFA.h" namespace automaton { @@ -68,7 +75,7 @@ class InitialState; * \tparam EpsilonType used for the epislon in the automaton. * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class EpsilonType, class StateType > +template < class SymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class StateType = DefaultStateType > class EpsilonNFA final : public AutomatonBase, public core::Components < EpsilonNFA < SymbolType, EpsilonType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times an input symbol or epsilon on the left hand side to a set of states. @@ -561,14 +568,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "MultiInitialStateNFA.h" -#include "NFA.h" -#include "DFA.h" - -namespace automaton { - template<class SymbolType, class EpsilonType, class StateType > EpsilonNFA < SymbolType, EpsilonType, StateType >::EpsilonNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates ) : core::Components < EpsilonNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) { } diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h index aaeb716bccc069bedd6c682234f467d11edc9806..fbf5439c188f2c9ab1098b44275f3438acb7cadd 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.h +++ b/alib2data/src/automaton/FSM/ExtendedNFA.h @@ -34,18 +34,26 @@ #include <common/createUnique.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> #include <label/InitialStateLabel.h> #include <regexp/unbounded/UnboundedRegExpStructure.h> #include <regexp/unbounded/UnboundedRegExpConcatenation.h> #include <regexp/unbounded/UnboundedRegExpSymbol.h> +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> + #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "DFA.h" +#include "NFA.h" +#include "CompactNFA.h" +#include "EpsilonNFA.h" +#include "MultiInitialStateNFA.h" namespace automaton { @@ -70,7 +78,7 @@ class InitialState; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class ExtendedNFA final : public AutomatonBase, public core::Components < ExtendedNFA < SymbolType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times a regular expression on the left hand side to a set of states. @@ -445,16 +453,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "DFA.h" -#include "NFA.h" -#include "CompactNFA.h" -#include "EpsilonNFA.h" -#include "MultiInitialStateNFA.h" - -namespace automaton { - template<class SymbolType, class StateType > ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates ) : core::Components < ExtendedNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) { } diff --git a/alib2data/src/automaton/FSM/MultiInitialStateEpsilonNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateEpsilonNFA.h index 6436a0900034214a3c06fe79956145b8c141482c..448fceb923d3facdbe809dd18b5310cc9f4d5db7 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateEpsilonNFA.h +++ b/alib2data/src/automaton/FSM/MultiInitialStateEpsilonNFA.h @@ -34,15 +34,23 @@ #include <common/createUnique.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <label/InitialStateLabel.h> -#include "../../label/InitialStateLabel.h" +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "EpsilonNFA.h" +#include "MultiInitialStateNFA.h" +#include "NFA.h" +#include "DFA.h" namespace automaton { @@ -68,7 +76,7 @@ class InitialStates; * \tparam EpsilonType used for the epislon in the automaton. * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class EpsilonType, class StateType > +template < class SymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class StateType = DefaultStateType > class MultiInitialStateEpsilonNFA final : public AutomatonBase, public core::Components < MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > { /** * Transition function as mapping from a state times an input symbol or epsilon on the left hand side to a set of states. @@ -597,15 +605,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "EpsilonNFA.h" -#include "MultiInitialStateNFA.h" -#include "NFA.h" -#include "DFA.h" - -namespace automaton { - template<class SymbolType, class EpsilonType, class StateType > MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType >::MultiInitialStateEpsilonNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, ext::set < StateType > initialStates, ext::set < StateType > finalStates ) : core::Components < MultiInitialStateEpsilonNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( initialStates ), std::move ( finalStates ) ) { } diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h index 128cc9a2a9ab8b95ba01f945f6af4dbce56f70f5..d85e6d9960a521054237100ccd7c6630b3763d55 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h @@ -32,13 +32,18 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "NFA.h" +#include "DFA.h" namespace automaton { @@ -63,7 +68,7 @@ class InitialStates; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class MultiInitialStateNFA final : public AutomatonBase, public core::Components < MultiInitialStateNFA < SymbolType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > { /** * Transition function as mapping from a state times an input symbol on the left hand side to a set of states. @@ -453,13 +458,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "NFA.h" -#include "DFA.h" - -namespace automaton { - template < class SymbolType, class StateType > MultiInitialStateNFA < SymbolType, StateType >::MultiInitialStateNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, ext::set < StateType > initialStates, ext::set < StateType > finalStates ) : core::Components < MultiInitialStateNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( initialStates ), std::move ( finalStates ) ) { } diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h index 214bb826ce210c3a86549abfacb5450c8572672b..188f87a6744d7018c9997cbab2a59ed9ec41a4a9 100644 --- a/alib2data/src/automaton/FSM/NFA.h +++ b/alib2data/src/automaton/FSM/NFA.h @@ -30,13 +30,17 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "DFA.h" namespace automaton { @@ -61,7 +65,7 @@ class InitialState; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class NFA final : public AutomatonBase, public core::Components < NFA < SymbolType, StateType >, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times an input symbol on the left hand side to a set of states. @@ -423,12 +427,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "DFA.h" - -namespace automaton { - template<class SymbolType, class StateType > NFA < SymbolType, StateType >::NFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates ) : core::Components < NFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) { } diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h index 56e1c86fe7d44212efc9e98fb7f69135d771de58..6e02345328f25952698de0ebf2e6549c721d5dea 100644 --- a/alib2data/src/automaton/PDA/DPDA.h +++ b/alib2data/src/automaton/PDA/DPDA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -76,7 +79,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class DPDA final : public AutomatonBase, public core::Components < DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h index 8dda09be0a30fb71b177d12fa1f607d4953af310..734c5412dd56635b75fc81fe99a2b926a12407a7 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h @@ -34,13 +34,15 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -74,7 +76,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class InputDrivenDPDA final : public AutomatonBase, public core::Components < InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h index 2c2935e218571e397b3e250a289c50355f584921..b757aefacacb54567d2627a964d5b540ed20a213 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h @@ -34,13 +34,15 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -74,7 +76,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class InputDrivenNPDA final : public AutomatonBase, public core::Components < InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h index 46fa9ac047ee7c399fd68b1369a486c696b5429d..792b58e41519e12f87d00d431440c42ba35562d4 100644 --- a/alib2data/src/automaton/PDA/NPDA.h +++ b/alib2data/src/automaton/PDA/NPDA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -70,7 +73,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class NPDA final : public AutomatonBase, public core::Components < NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times an input symbol or epsilon times string of pushdown store symbols on the left hand side to a state times string of pushdown store symbols. diff --git a/alib2data/src/automaton/PDA/NPDTA.h b/alib2data/src/automaton/PDA/NPDTA.h index aeea0944f1018ad4256c77e8b1a070977b9d56c8..552f0cbac07f96161f7ae934623e1fc9f5873eca 100644 --- a/alib2data/src/automaton/PDA/NPDTA.h +++ b/alib2data/src/automaton/PDA/NPDTA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -73,7 +76,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class OutputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class NPDTA final : public AutomatonBase, public core::Components < NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < OutputSymbolType >, component::Set, OutputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state times an input symbol or epsilon times string of pushdown store symbols on the left hand side to a state times string of pushdown store symbols times string of output symbols. diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h index 281279c062db908d3b5a0d4d32ce5bd014ec6485..66245f587dcd81a0cd7ad269254dbfc3336fc68d 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -87,7 +90,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class RealTimeHeightDeterministicDPDA final : public AutomatonBase, public core::Components < RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, BottomOfTheStackSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h index 4e7acbc0548fb0d0a1360c9270a851b47c943688..1029e694b1eb84212cf3d7b6463fd81fa3fbbef2 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -74,7 +77,7 @@ class InitialStates; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class RealTimeHeightDeterministicNPDA final : public AutomatonBase, public core::Components < RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, BottomOfTheStackSymbol, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > { protected: /** diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h index 459170336ee246a203f45215b207e80724483a79..e822a127f1d2532df1b73ec5d7bf22bf3ba100e8 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h @@ -35,13 +35,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -76,7 +79,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class SinglePopDPDA final : public AutomatonBase, public core::Components < SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h index 3ec9017c3b41eec5034cbe59340899fd98212e05..fb25bc3ae2e9350b13907519f8bbb1afee54c746 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h @@ -34,13 +34,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -70,7 +73,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class EpsilonType = DefaultEpsilonType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class SinglePopNPDA final : public AutomatonBase, public core::Components < SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h index e642b41f9f761bd236800e283814d3058ef3c3df..0d63f0a81630e5fe03cdf1bf22c748c487b9de8e 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h @@ -33,13 +33,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -82,7 +85,7 @@ class InitialState; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class VisiblyPushdownDPDA final : public AutomatonBase, public core::Components < VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, std::tuple < CallAlphabet, ReturnAlphabet, LocalAlphabet >, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, BottomOfTheStackSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { protected: /** diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h index 877eae325ab61a5fa9e92e577f4343babc3ffe8f..82a2dc5fe0cbc8a62a50f9baced6fc7f329adbd5 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h @@ -33,13 +33,16 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -78,7 +81,7 @@ class InitialStates; * \tparam PushdownSymbolType used for the pushdown store alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class InputSymbolType, class PushdownStoreSymbolType, class StateType > +template < class InputSymbolType = DefaultSymbolType, class PushdownStoreSymbolType = DefaultSymbolType, class StateType = DefaultStateType > class VisiblyPushdownNPDA final : public AutomatonBase, public core::Components < VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, ext::set < InputSymbolType >, component::Set, std::tuple < CallAlphabet, ReturnAlphabet, LocalAlphabet >, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, BottomOfTheStackSymbol, ext::set < StateType >, component::Set, std::tuple < States, InitialStates, FinalStates > > { protected: /** diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h index 197ba418ad9effdf27d3ce2f465c68418c82bcdb..1c9e077737b4a5600b7e34204194fa600f060f3a 100644 --- a/alib2data/src/automaton/TA/DFTA.h +++ b/alib2data/src/automaton/TA/DFTA.h @@ -34,13 +34,16 @@ #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> +#include <common/DefaultRankType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -71,7 +74,7 @@ class FinalStates; * \tparam RankType used for the rank part of the ranked symbol * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class RankType, class StateType > +template < class SymbolType = DefaultSymbolType, class RankType = DefaultRankType, class StateType = DefaultStateType > class DFTA final : public AutomatonBase, public core::Components < DFTA < SymbolType, RankType, StateType >, ext::set < common::ranked_symbol < SymbolType, RankType > >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates > > { /** * Transition function as mapping from a list of states times an input symbol on the left hand side to a state. diff --git a/alib2data/src/automaton/TA/NFTA.h b/alib2data/src/automaton/TA/NFTA.h index 8f82a1102f931c705956eaed1ef2263af1d07267..48c16db748fabbf32a195bb293cbf294bee694d8 100644 --- a/alib2data/src/automaton/TA/NFTA.h +++ b/alib2data/src/automaton/TA/NFTA.h @@ -33,13 +33,20 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../AutomatonException.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <core/normalize.hpp> + +#include <common/DefaultStateType.h> +#include <common/DefaultSymbolType.h> +#include <common/DefaultRankType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> + +#include "DFTA.h" namespace automaton { @@ -65,7 +72,7 @@ class FinalStates; * \tparam RankType used for the rank part of the ranked symbol * \tparam StateType used to the states, and the initial state of the automaton. */ -template < class SymbolType, class RankType, class StateType > +template < class SymbolType = DefaultSymbolType, class RankType = DefaultRankType, class StateType = DefaultStateType > class NFTA final : public AutomatonBase, public core::Components < NFTA < SymbolType, RankType, StateType >, ext::set < common::ranked_symbol < SymbolType, RankType > >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates > > { /** * Transition function as mapping from a list of states times an input symbol on the left hand side to a set of states. @@ -381,12 +388,6 @@ public: virtual object::ObjectBase * inc ( ) && override; }; -} /* namespace automaton */ - -#include "DFTA.h" - -namespace automaton { - template < class SymbolType, class RankType, class StateType > NFTA < SymbolType, RankType, StateType >::NFTA ( ext::set < StateType > states, ext::set < common::ranked_symbol < SymbolType, RankType > > inputAlphabet, ext::set < StateType > finalStates ) : core::Components < NFTA, ext::set < common::ranked_symbol < SymbolType, RankType > >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates > > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ) ) { } diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h index 3e60b20eba8b9bcb2858784e68e434e5ef638140..cf4175bfff2b539d2d82a0bc1745524180247dd7 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.h +++ b/alib2data/src/automaton/TM/OneTapeDTM.h @@ -33,14 +33,17 @@ #include <core/components.hpp> #include <object/UniqueObject.h> -#include "../AutomatonException.h" -#include "../AutomatonBase.h" -#include "../AutomatonFeatures.h" -#include "../common/Shift.h" -#include "../common/AutomatonNormalize.h" -#include <alphabet/common/SymbolNormalize.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + +#include <automaton/AutomatonException.h> +#include <automaton/AutomatonBase.h> +#include <automaton/common/Shift.h> #include <core/normalize.hpp> +#include <alphabet/common/SymbolNormalize.h> +#include <automaton/common/AutomatonNormalize.h> namespace automaton { @@ -69,7 +72,7 @@ class InitialState; * \tparam SymbolType used for the terminal alphabet * \tparam StateType used to the states, and the initial state of the automaton. */ -template<class SymbolType, class StateType > +template < class SymbolType = DefaultSymbolType, class StateType = DefaultStateType > class OneTapeDTM final : public AutomatonBase, public core::Components < OneTapeDTM < SymbolType, StateType >, ext::set < SymbolType >, component::Set, std::tuple < TapeAlphabet, InputAlphabet >, SymbolType, component::Value, BlankSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > { /** * Transition function as mapping from a state \times a tape symbol on the left hand side to a state \times tape symbol \times shift on tape. diff --git a/alib2data/src/automaton/common/AutomatonNormalize.h b/alib2data/src/automaton/common/AutomatonNormalize.h index b6a3f8f84449b222d81e536b9774aaa94b069281..b6a373f24bcda66104707f55a46f2a145e00541a 100644 --- a/alib2data/src/automaton/common/AutomatonNormalize.h +++ b/alib2data/src/automaton/common/AutomatonNormalize.h @@ -15,10 +15,13 @@ #include <alib/map> #include <regexp/unbounded/UnboundedRegExpStructure.h> -#include <alphabet/RankedSymbol.h> #include <alphabet/common/SymbolNormalize.h> #include <object/ObjectFactory.h> +#include <common/DefaultStateType.h> +#include <common/DefaultEpsilonType.h> +#include <common/DefaultSymbolType.h> + namespace automaton { /** @@ -46,18 +49,18 @@ public: template < class StateType > ext::set < DefaultStateType > AutomatonNormalize::normalizeStates ( ext::set < StateType > && states ) { ext::set < DefaultStateType > res; - for ( StateType && state : ext::make_moveable_set ( states ) ) { + for ( StateType && state : ext::make_moveable_set ( states ) ) res.insert ( normalizeState ( std::move ( state ) ) ); - } + return res; } template < class StateType > ext::vector < DefaultStateType > AutomatonNormalize::normalizeStates ( ext::vector < StateType > && states ) { ext::vector < DefaultStateType > res; - for ( StateType & state : states ) { + for ( StateType & state : states ) res.push_back ( normalizeState ( std::move ( state ) ) ); - } + return res; }