From 31f327f5d2cb027d42eb68abbbc8c04e59504722 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 14 Jun 2018 14:59:47 +0200 Subject: [PATCH] remove AutomatonFeatures header --- alib2data/src/automaton/AutomatonFeatures.h | 67 ------------------- alib2data/src/automaton/FSM/CompactNFA.h | 30 ++++----- alib2data/src/automaton/FSM/DFA.h | 14 ++-- alib2data/src/automaton/FSM/EpsilonNFA.h | 29 ++++---- alib2data/src/automaton/FSM/ExtendedNFA.h | 30 ++++----- .../FSM/MultiInitialStateEpsilonNFA.h | 31 +++++---- .../src/automaton/FSM/MultiInitialStateNFA.h | 24 +++---- alib2data/src/automaton/FSM/NFA.h | 22 +++--- alib2data/src/automaton/PDA/DPDA.h | 15 +++-- alib2data/src/automaton/PDA/InputDrivenDPDA.h | 14 ++-- alib2data/src/automaton/PDA/InputDrivenNPDA.h | 14 ++-- alib2data/src/automaton/PDA/NPDA.h | 15 +++-- alib2data/src/automaton/PDA/NPDTA.h | 15 +++-- .../PDA/RealTimeHeightDeterministicDPDA.h | 15 +++-- .../PDA/RealTimeHeightDeterministicNPDA.h | 15 +++-- alib2data/src/automaton/PDA/SinglePopDPDA.h | 15 +++-- alib2data/src/automaton/PDA/SinglePopNPDA.h | 15 +++-- .../src/automaton/PDA/VisiblyPushdownDPDA.h | 15 +++-- .../src/automaton/PDA/VisiblyPushdownNPDA.h | 15 +++-- alib2data/src/automaton/TA/DFTA.h | 15 +++-- alib2data/src/automaton/TA/NFTA.h | 25 +++---- alib2data/src/automaton/TM/OneTapeDTM.h | 17 +++-- .../src/automaton/common/AutomatonNormalize.h | 13 ++-- 23 files changed, 223 insertions(+), 257 deletions(-) delete mode 100644 alib2data/src/automaton/AutomatonFeatures.h diff --git a/alib2data/src/automaton/AutomatonFeatures.h b/alib2data/src/automaton/AutomatonFeatures.h deleted file mode 100644 index 45eedc29f8..0000000000 --- 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 a4f1fbf8a9..62cf680ae6 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 abbe2f723a..2111bd08ee 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 f0b7e87086..3aedb47a82 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 aaeb716bcc..fbf5439c18 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 6436a09000..448fceb923 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 128cc9a2a9..d85e6d9960 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 214bb826ce..188f87a674 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 56e1c86fe7..6e02345328 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 8dda09be0a..734c5412dd 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 2c2935e218..b757aefaca 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 46fa9ac047..792b58e415 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 aeea0944f1..552f0cbac0 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 281279c062..66245f587d 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 4e7acbc054..1029e694b1 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 459170336e..e822a127f1 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 3ec9017c3b..fb25bc3ae2 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 e642b41f9f..0d63f0a816 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 877eae325a..82a2dc5fe0 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 197ba418ad..1c9e077737 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 8f82a1102f..48c16db748 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 3e60b20eba..cf4175bfff 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 b6a3f8f844..b6a373f24b 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; } -- GitLab